Skip to content

Commit

Permalink
Fixes #118 - [Performance] Excel-like filter for huge data sets
Browse files Browse the repository at this point in the history
Switched from IntList to IntSet in NatCombo#select(int[])

Signed-off-by: Dirk Fauth <[email protected]>
  • Loading branch information
fipro78 committed Sep 30, 2024
1 parent 3e8bf12 commit adcb22a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import java.util.Map;
import java.util.stream.Collectors;

import org.eclipse.collections.api.list.primitive.IntList;
import org.eclipse.collections.api.map.primitive.MutableObjectIntMap;
import org.eclipse.collections.impl.factory.primitive.IntLists;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.impl.factory.primitive.IntSets;
import org.eclipse.collections.impl.factory.primitive.ObjectIntMaps;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
Expand Down Expand Up @@ -1293,9 +1293,9 @@ public void select(int index) {
public void select(int[] indices) {
if (!getDropdownTable().isDisposed()) {
getDropdownTable().select(indices);
IntList indicesList = IntLists.immutable.of(indices);
IntSet indicesSet = IntSets.immutable.of(indices);
for (int i = 0; i < this.itemList.size(); i++) {
this.selectionStateMap.put(this.itemList.get(i), indicesList.contains(i));
this.selectionStateMap.put(this.itemList.get(i), indicesSet.contains(i));
}
this.text.setText(getTransformedTextForSelection());
} else {
Expand Down

0 comments on commit adcb22a

Please sign in to comment.