mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug #201653 : Problem with Configuration management in Makefile Project
This commit is contained in:
parent
a881c07eec
commit
60eb714db0
2 changed files with 28 additions and 5 deletions
|
@ -269,12 +269,13 @@ public class CDTConfigWizardPage extends WizardPage {
|
||||||
for (int i=0; i < tc.length; i++) {
|
for (int i=0; i < tc.length; i++) {
|
||||||
s = s + ((tc[i] == null) ?
|
s = s + ((tc[i] == null) ?
|
||||||
"" : //$NON-NLS-1$
|
"" : //$NON-NLS-1$
|
||||||
tc[i].getName());
|
tc[i].getUniqueRealName());
|
||||||
if (i < tc.length - 1) s = s + ", "; //$NON-NLS-1$
|
if (i < tc.length - 1) s = s + "\n"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
l_chains.setText(s);
|
l_chains.setText(s);
|
||||||
l_projtype.setText(handler.getName());
|
l_projtype.setText(handler.getName());
|
||||||
setPageComplete(isCustomPageComplete());
|
setPageComplete(isCustomPageComplete());
|
||||||
|
l_chains.getParent().pack();
|
||||||
}
|
}
|
||||||
parent.setVisible(visible);
|
parent.setVisible(visible);
|
||||||
if (visible) update();
|
if (visible) update();
|
||||||
|
@ -282,10 +283,11 @@ public class CDTConfigWizardPage extends WizardPage {
|
||||||
|
|
||||||
//------------------------
|
//------------------------
|
||||||
private Label setupLabel(Composite c, String name, int span, int mode) {
|
private Label setupLabel(Composite c, String name, int span, int mode) {
|
||||||
Label l = new Label(c, SWT.NONE);
|
Label l = new Label(c, SWT.WRAP);
|
||||||
l.setText(name);
|
l.setText(name);
|
||||||
GridData gd = new GridData(mode);
|
GridData gd = new GridData(mode);
|
||||||
gd.horizontalSpan = span;
|
gd.horizontalSpan = span;
|
||||||
|
gd.verticalAlignment = SWT.TOP;
|
||||||
l.setLayoutData(gd);
|
l.setLayoutData(gd);
|
||||||
Composite p = l.getParent();
|
Composite p = l.getParent();
|
||||||
l.setFont(p.getFont());
|
l.setFont(p.getFont());
|
||||||
|
|
|
@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||||
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.ui.newui.UIMessages;
|
import org.eclipse.cdt.ui.newui.UIMessages;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -24,6 +25,8 @@ import org.eclipse.cdt.ui.newui.UIMessages;
|
||||||
*/
|
*/
|
||||||
public class CfgHolder {
|
public class CfgHolder {
|
||||||
private static final String DELIMITER = "_with_"; //$NON-NLS-1$
|
private static final String DELIMITER = "_with_"; //$NON-NLS-1$
|
||||||
|
private static final String LBR = " (v "; //$NON-NLS-1$
|
||||||
|
private static final String RBR = ")"; //$NON-NLS-1$
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private IConfiguration cfg;
|
private IConfiguration cfg;
|
||||||
|
@ -70,10 +73,28 @@ public class CfgHolder {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CfgHolder[] unique(CfgHolder[] its) {
|
public static CfgHolder[] unique(CfgHolder[] its) {
|
||||||
// if names are not unique, add toolchain name
|
// if names are not unique, add version name
|
||||||
if (hasDoubles(its)) {
|
if (hasDoubles(its)) {
|
||||||
for (int k=0; k<its.length; k++) {
|
for (int k=0; k<its.length; k++) {
|
||||||
its[k].name = its[k].name + DELIMITER + its[k].cfg.getToolChain().getName();
|
if (its[k].tc != null) {
|
||||||
|
String ver = ManagedBuildManager.getVersionFromIdAndVersion(its[k].tc.getId());
|
||||||
|
if(ver != null)
|
||||||
|
its[k].name = its[k].name + LBR + ver + RBR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if names are still not unique, add toolchain name
|
||||||
|
if (hasDoubles(its)) {
|
||||||
|
for (int k=0; k<its.length; k++) {
|
||||||
|
String s = its[k].name;
|
||||||
|
int x = s.indexOf(LBR);
|
||||||
|
if (x >= 0)
|
||||||
|
s = s.substring(0, x);
|
||||||
|
IToolChain tc = its[k].tc;
|
||||||
|
if (tc == null && its[k].cfg != null)
|
||||||
|
tc = its[k].cfg.getToolChain();
|
||||||
|
if (tc != null)
|
||||||
|
its[k].name = s + DELIMITER + tc.getUniqueRealName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if names are still not unique, add index
|
// if names are still not unique, add index
|
||||||
|
|
Loading…
Add table
Reference in a new issue