1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Fix to make all old-stile project type's tool-chains to be displayed in the NPW

This commit is contained in:
Mikhail Sennikovsky 2007-05-07 14:26:21 +00:00
parent 2a45a83078
commit af3aff231f

View file

@ -19,7 +19,6 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyManager;
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyType; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyType;
import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue; import org.eclipse.cdt.managedbuilder.buildproperties.IBuildPropertyValue;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IProjectType; import org.eclipse.cdt.managedbuilder.core.IProjectType;
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.managedbuilder.core.ManagedBuildManager;
@ -72,19 +71,29 @@ public class ManagedBuildWizard extends AbstractCWizard {
String nattr = pt.getNameAttribute(); String nattr = pt.getNameAttribute();
if (nattr == null || nattr.length() == 0) continue; // new proj style if (nattr == null || nattr.length() == 0) continue; // new proj style
MBSWizardHandler h = new MBSWizardHandler(pt, parent, wizard); MBSWizardHandler h = new MBSWizardHandler(pt, parent, wizard);
IConfiguration[] cfgs = pt.getConfigurations(); IToolChain[] tcs = ManagedBuildManager.getExtensionToolChains(pt);
if (cfgs == null || cfgs.length == 0) continue; for(int i = 0; i < tcs.length; i++){
IToolChain tc = null; IToolChain t = tcs[i];
for (int i=0; i<cfgs.length; i++) { if(t.isSystemObject())
if (cfgs[i].isSystemObject()) continue; continue;
IToolChain t = cfgs[i].getToolChain(); if (!isValid(t, supportedOnly, wizard))
if (isValid(t, supportedOnly, wizard)) { continue;
tc = t;
break; h.addTc(t);
} }
} // IConfiguration[] cfgs = pt.getConfigurations();
if (tc == null) continue; // if (cfgs == null || cfgs.length == 0) continue;
h.addTc(tc); // IToolChain tc = null;
// for (int i=0; i<cfgs.length; i++) {
// if (cfgs[i].isSystemObject()) continue;
// IToolChain t = cfgs[i].getToolChain();
// if (isValid(t, supportedOnly, wizard)) {
// tc = t;
// break;
// }
// }
// if (tc == null) continue;
// h.addTc(tc);
String pId = null; String pId = null;
if (CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS)) { if (CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS)) {