From 65d88cb08003f63cb0beabd5e11eacf1de1460e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20W=2E=20V=2E=20Tran-J=C3=B8rgensen?= Date: Tue, 20 Feb 2018 09:17:00 +0100 Subject: [PATCH] Sort classes alphabetically in launch configuration view #665 --- .../AbstractVdmMainLaunchConfigurationTab.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ide/debug/src/main/java/org/overture/ide/debug/ui/launching/AbstractVdmMainLaunchConfigurationTab.java b/ide/debug/src/main/java/org/overture/ide/debug/ui/launching/AbstractVdmMainLaunchConfigurationTab.java index ae4ee0d34f..fefa29a515 100644 --- a/ide/debug/src/main/java/org/overture/ide/debug/ui/launching/AbstractVdmMainLaunchConfigurationTab.java +++ b/ide/debug/src/main/java/org/overture/ide/debug/ui/launching/AbstractVdmMainLaunchConfigurationTab.java @@ -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; @@ -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() { + + @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);