mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
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
This commit is contained in:
parent
d98733e23d
commit
7a9163ba6c
3 changed files with 10 additions and 23 deletions
|
@ -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">
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue