mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug #200710 : new project wizard custom pages don't appear
This commit is contained in:
parent
259d11d79b
commit
c288c84fc8
2 changed files with 19 additions and 50 deletions
|
@ -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>
|
||||
|
|
|
@ -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]);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue