diff --git a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml index e5358f05bab..644c7b0866b 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml +++ b/build/org.eclipse.cdt.managedbuilder.ui/plugin.xml @@ -411,51 +411,6 @@ </wizard> </extension> -<!-- Custom wizard pages - for testing only - <extension - point="org.eclipse.cdt.managedbuilder.ui.newWizardPages"> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.AlwaysPresentWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.AlwaysPresentWizardPage"/> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureAWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.NatureAWizardPage"> - <nature natureID="org.eclipse.cdt.core.cnature"/> - </wizardPage> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.NatureBWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.NatureBWizardPage"> - <nature natureID="org.eclipse.cdt.core.ccnature"/> - </wizardPage> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.ToolchainCWizardPage"> - <toolchain toolchainID="cdt.managedbuild.toolchain.gnu.exe.debug"/> - </wizardPage> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainCv20WizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.ToolchainCv20WizardPage"> - <toolchain - toolchainID="C" - versionsSupported="2.0.0"/> - </wizardPage> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeDWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.ProjectTypeDWizardPage"> - <projectType projectTypeID="D"/> - </wizardPage> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ProjectTypeEWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.ProjectTypeEWizardPage"> - <projectType projectTypeID="E"/> - </wizardPage> - <wizardPage - ID="org.eclipse.cdt.managedbuilder.ui.tests.wizardPages.ToolchainFWizardPage" - pageClass="org.eclipse.cdt.managedbuilder.ui.test.ToolchainFWizardPage"> - <toolchain toolchainID="F"/> - </wizardPage> - </extension> ---> <extension point="org.eclipse.cdt.ui.newCfgDialog"> <dialog @@ -677,4 +632,7 @@ name="%MBSPerProjectProfile.name" profileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"/> </extension> + + + </plugin> diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java index e3916771494..add4d166c1c 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CDTConfigWizardPage.java @@ -347,18 +347,29 @@ public class CDTConfigWizardPage extends WizardPage { for (int i=0; i<natures.length; i++) x.add(natures[i]); MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, x); } - if (handler.getProjectType() != null) { + // Project type can be obtained either from Handler (for old-style projects), + // or multiple values will be got from separate ToolChains (for new-style). + boolean ptIsNull = (handler.getProjectType() == null); + if (!ptIsNull) MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, handler.getProjectType().getId()); - } else { - MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, null); - } + IToolChain[] tcs = handler.getSelectedToolChains(); int n = (tcs == null) ? 0 : tcs.length; Set x = new TreeSet(); + Set y = new TreeSet(); for (int i=0; i<n; i++) { - x.add(tcs[i]); + x.add(tcs[i]); + if (ptIsNull && tcs[i] != null && tcs[i].getParent() != null) { + y.add(tcs[i].getParent().getProjectType().getId()); + } } MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.TOOLCHAIN, x); + if (ptIsNull) { + if (y.size() > 0) + MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, y); + else + MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.PROJECT_TYPE, null); + } } }