[Models Tree Search] Sort list of Properties in Search drop-down
package com.archimatetool.editor.views.tree.search;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
@@ -308,6 +310,14 @@ public class SearchWidget extends Composite {
getAllUniquePropertyKeysForModel(model, list);
}
+ // Sort alphapetically
+ Collections.sort(list, new Comparator<String>() {
+ @Override
+ public int compare(String s1, String s2) {
+ return s1.toLowerCase().compareTo(s2.toLowerCase());
+ }
+ });
+
for(final String key : list) {
IAction action = new Action(key, IAction.AS_CHECK_BOX) {
@Override
