From 7a9163ba6cd10deb981e4d22778a1088f4a3b627 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Wed, 8 Nov 2017 15:54:32 -0500 Subject: Bug 512550 - Hide C and C++ Project Wizards and fix canFinish(). Hides the C Project and C++ Project wizards in the wizard shortcuts for the CPerspective. Also removes them from the shortcut list in the project navigator. Adds the C/C++ wizard that was missing from the project navigator. Also makes sure we pass along the call to canFinish from the new wizards to the old ones. Change-Id: I0a5505542fcf9d0eb34fb5fef790fd1e777524b5 --- core/org.eclipse.cdt.ui/plugin.xml | 23 +--------------------- .../cdt/internal/ui/CPerspectiveFactory.java | 5 ++++- .../cdt/internal/ui/wizards/CDTProjectWizard2.java | 5 +++++ 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index b30990a3dd7..1238dad5ed8 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -3940,28 +3940,7 @@ associatedExtensionId="org.eclipse.cdt.ui.navigator.content" menuGroupId="org.eclipse.cdt.ui.newProject" type="new" - wizardId="org.eclipse.cdt.ui.wizards.NewCWizard1"> - - - - - - - - - - - - - - - + wizardId="org.eclipse.cdt.ui.wizard.project"> diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java index 0c7bc220d93..33633bbef17 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java @@ -78,7 +78,10 @@ public class CPerspectiveFactory implements IPerspectiveFactory { // new actions - C project creation wizard String[] wizIDs = CWizardRegistry.getProjectWizardIDs(); for (int i = 0; i < wizIDs.length; ++i) { - layout.addNewWizardShortcut(wizIDs[i]); + // Hide the C Project and C++ Project wizards until we can remove them + if (!wizIDs[i].endsWith(".NewCWizard1") && !wizIDs[i].endsWith(".NewCWizard2")) { //$NON-NLS-1$ //$NON-NLS-2$ + layout.addNewWizardShortcut(wizIDs[i]); + } } // new actions - C folder creation wizard wizIDs = CWizardRegistry.getFolderWizardIDs(); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CDTProjectWizard2.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CDTProjectWizard2.java index e65c0a22972..bb465843498 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CDTProjectWizard2.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CDTProjectWizard2.java @@ -51,6 +51,11 @@ public class CDTProjectWizard2 extends TemplateWizard implements IGenerator, ICD cdtWizard.setContainer(wizardContainer); } + @Override + public boolean canFinish() { + return cdtWizard.canFinish(); + } + @Override public boolean performFinish() { return cdtWizard.performFinish(); -- cgit v1.2.3