Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChristian Walther2018-05-07 05:20:18 -0400
committerWilliam Riley2018-10-22 06:16:24 -0400
commitebc9420473438b88af03e6f2d0dd3cb4da6cf581 (patch)
tree393ed272adc9ed72c089a6a47a23afe8ddb738f7 /core
parentc9eee479b4c714509e1b006063a4cbdaeed9cdc4 (diff)
downloadorg.eclipse.cdt-ebc9420473438b88af03e6f2d0dd3cb4da6cf581.tar.gz
org.eclipse.cdt-ebc9420473438b88af03e6f2d0dd3cb4da6cf581.tar.xz
org.eclipse.cdt-ebc9420473438b88af03e6f2d0dd3cb4da6cf581.zip
Bug 534423 - Sort configurations in the Exclude from build dialog
Sort the configuration list in the same order as used by the project property pages (case-insensitive nonlocalized), almost the same order as used in the Project > Build Configurations > Set Active menu (case-sensitive nonlocalized), not in the internal order coming from the .cproject file. Change-Id: Ia05bd163043f762dd96da4c69d409ecee9accb8c Signed-off-by: Christian Walther <walther@indel.ch>
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
index f912be127f..8edce2d3ad 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
@@ -12,6 +12,7 @@
package org.eclipse.cdt.internal.ui.actions;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
@@ -45,6 +46,7 @@ import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.core.model.util.CDTListComparator;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.ICSourceEntry;
@@ -188,7 +190,9 @@ public class ExcludeFromBuildHandler extends AbstractHandler {
if (!CoreModel.getDefault().isNewStyleProject(p)) return null;
ICProjectDescription prjd = CoreModel.getDefault().getProjectDescription(p, false);
if (prjd == null) return null;
- return prjd.getConfigurations();
+ ICConfigurationDescription[] cfgs = prjd.getConfigurations();
+ Arrays.sort(cfgs, CDTListComparator.getInstance());
+ return cfgs;
}
private void openDialog() {

Back to the top