mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 322204: Sort order of build configurations is chronological and not alphabetical in the toolbar
This commit is contained in:
parent
19646e5f50
commit
418504cb70
1 changed files with 8 additions and 12 deletions
|
@ -11,10 +11,10 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.ui.actions;
|
package org.eclipse.cdt.ui.actions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.SortedSet;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -63,12 +63,11 @@ public class ChangeBuildConfigActionBase {
|
||||||
for (MenuItem item2 : items)
|
for (MenuItem item2 : items)
|
||||||
item2.dispose();
|
item2.dispose();
|
||||||
|
|
||||||
List<String> configNames = new ArrayList<String>();
|
SortedSet<String> configNames = new TreeSet<String>();
|
||||||
Iterator<IProject> projIter = fProjects.iterator();
|
|
||||||
String sCurrentConfig = null;
|
String sCurrentConfig = null;
|
||||||
boolean bCurrentConfig = true;
|
boolean bCurrentConfig = true;
|
||||||
while (projIter.hasNext()) {
|
for (IProject prj : fProjects) {
|
||||||
ICConfigurationDescription[] cfgDescs = getCfgs(projIter.next());
|
ICConfigurationDescription[] cfgDescs = getCfgs(prj);
|
||||||
|
|
||||||
String sActiveConfig = null;
|
String sActiveConfig = null;
|
||||||
// Store names and detect active configuration
|
// Store names and detect active configuration
|
||||||
|
@ -91,17 +90,14 @@ public class ChangeBuildConfigActionBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator<String> confIter = configNames.iterator();
|
|
||||||
int accel = 0;
|
int accel = 0;
|
||||||
while (confIter.hasNext()) {
|
for (String sName : configNames) {
|
||||||
String sName = confIter.next();
|
|
||||||
String sDesc = null;
|
String sDesc = null;
|
||||||
projIter = fProjects.iterator();
|
|
||||||
boolean commonName = true;
|
boolean commonName = true;
|
||||||
boolean commonDesc = true;
|
boolean commonDesc = true;
|
||||||
boolean firstProj = true;
|
boolean firstProj = true;
|
||||||
while (projIter.hasNext()) {
|
for (IProject prj : fProjects) {
|
||||||
ICConfigurationDescription[] cfgDescs = getCfgs(projIter.next());
|
ICConfigurationDescription[] cfgDescs = getCfgs(prj);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (; i < cfgDescs.length; i++) {
|
for (; i < cfgDescs.length; i++) {
|
||||||
if (cfgDescs[i].getName().equals(sName)) {
|
if (cfgDescs[i].getName().equals(sName)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue