Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2017-11-08 15:54:32 -0500
committerDoug Schaefer2017-11-08 16:18:18 -0500
commit7a9163ba6cd10deb981e4d22778a1088f4a3b627 (patch)
treedadaed3c62311f4b3aacde2fccd1c8612d40851f
parentd98733e23dba4bbf0f40145e6fe7d5923dceeff1 (diff)
downloadorg.eclipse.cdt-7a9163ba6cd10deb981e4d22778a1088f4a3b627.tar.gz
org.eclipse.cdt-7a9163ba6cd10deb981e4d22778a1088f4a3b627.tar.xz
org.eclipse.cdt-7a9163ba6cd10deb981e4d22778a1088f4a3b627.zip
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
-rw-r--r--core/org.eclipse.cdt.ui/plugin.xml23
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPerspectiveFactory.java5
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/CDTProjectWizard2.java5
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 b30990a3dd..1238dad5ed 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">
- <enablement>
- <or>
- <with variable="activeWorkbenchWindow.activePerspective">
- <equals
- value="org.eclipse.cdt.ui.CPerspective">
- </equals>
- </with>
- <instanceof value="org.eclipse.cdt.core.model.ICElement" />
- <and>
- <instanceof value="org.eclipse.core.resources.IProject"/>
- <test property="org.eclipse.core.resources.projectNature"
- value="org.eclipse.cdt.core.cnature"/>
- </and>
- </or>
- </enablement>
- </commonWizard>
- <commonWizard
- associatedExtensionId="org.eclipse.cdt.ui.navigator.content"
- menuGroupId="org.eclipse.cdt.ui.newProject"
- type="new"
- wizardId="org.eclipse.cdt.ui.wizards.NewCWizard2">
+ wizardId="org.eclipse.cdt.ui.wizard.project">
<enablement>
<or>
<with variable="activeWorkbenchWindow.activePerspective">
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 0c7bc220d9..33633bbef1 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 e65c0a2297..bb46584349 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
@@ -52,6 +52,11 @@ public class CDTProjectWizard2 extends TemplateWizard implements IGenerator, ICD
}
@Override
+ public boolean canFinish() {
+ return cdtWizard.canFinish();
+ }
+
+ @Override
public boolean performFinish() {
return cdtWizard.performFinish();
}

Back to the top