Skip to content

Commit

Permalink
Sort classes alphabetically in launch configuration view #665
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwvj committed Feb 20, 2018
1 parent ac66c4b commit 65d88cb
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -758,6 +759,18 @@ protected void chooseOperation() throws CoreException
dialog.setTitle(getModuleLabelName()
+ " and function/operation selection");
dialog.setMessage("Select a function or operation");

dialog.setComparator(new ViewerComparator(new Comparator<String>() {

@Override
public int compare(String str1, String str2) {
int res = String.CASE_INSENSITIVE_ORDER.compare(str1, str2);
if (res == 0) {
res = str1.compareTo(str2);
}
return res;
}
}));

dialog.addFilter(new ExecutableFilter());
dialog.setAllowMultiple(false);
Expand Down

0 comments on commit 65d88cb

Please sign in to comment.