1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 02:15:31 +02:00

Add templates that map to old new project wizards.

Change-Id: I23a01ca9adcb73aa684d3be5932975e75f1a2462
This commit is contained in:
Doug Schaefer 2016-08-10 16:06:49 -04:00
parent cc5287f548
commit 30cde08c83
6 changed files with 187 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -4958,6 +4958,30 @@
id="org.eclipse.cdt.ui.cdtTag"
label="C/C++">
</tag>
<template
icon="icons/cdt_logo_48.png"
id="org.eclipse.cdt.ui.managed.c"
label="C Managed Build"
wizard="org.eclipse.cdt.internal.ui.wizards.CProjectWizard2">
<description>
A C Project build using the CDT&apos;s managed build system.
</description>
<tagReference
id="org.eclipse.cdt.ui.cdtTag">
</tagReference>
</template>
<template
icon="icons/cdt_logo_48.png"
id="org.eclipse.cdt.ui.managed.cpp"
label="C++ Managed Build"
wizard="org.eclipse.cdt.internal.ui.wizards.CCProjectWizard2">
<description>
A C++ Project build using the CDT&apos;s managed build system.
</description>
<tagReference
id="org.eclipse.cdt.ui.cdtTag">
</tagReference>
</template>
</extension>
</plugin>

View file

@ -290,8 +290,8 @@ ProjectContentsArea_9=File with given name already exists
CDTCommonProjectWizard_0=Old project will be overridden
CDTCommonProjectWizard_1=Existing project settings will be overridden.\nImport feature can be used instead to preserve old settings.\nOK to override ?
CDTCommonProjectWizard_creatingProject=Creating project
NewModelProjectWizard_0=CDT Project
NewModelProjectWizard_1=Create CDT project of selected type
NewModelProjectWizard_0=C/C++ Project
NewModelProjectWizard_1=Create C/C++ project of selected type
NewModelProjectWizard_2=C++ Project
NewModelProjectWizard_3=Create C++ project of selected type
NewModelProjectWizard_4=C Project

View file

@ -0,0 +1,18 @@
/*******************************************************************************
* Copyright (c) 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.cdt.internal.ui.wizards;
import org.eclipse.cdt.ui.wizards.CCProjectWizard;
public class CCProjectWizard2 extends CDTProjectWizard2 {
public CCProjectWizard2() {
super(new CCProjectWizard());
}
}

View file

@ -0,0 +1,125 @@
/*******************************************************************************
* Copyright (c) 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.cdt.internal.ui.wizards;
import java.net.URI;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.tools.templates.core.IGenerator;
import org.eclipse.tools.templates.ui.TemplateWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard;
public class CDTProjectWizard2 extends TemplateWizard implements IGenerator, ICDTCommonProjectWizard {
private final CDTCommonProjectWizard cdtWizard;
protected CDTProjectWizard2(CDTCommonProjectWizard cdtWizard) {
this.cdtWizard = cdtWizard;
}
@Override
public void addPages() {
cdtWizard.addPages();
for (IWizardPage page : cdtWizard.getPages()) {
addPage(page);
}
}
@Override
public void init(IWorkbench theWorkbench, IStructuredSelection currentSelection) {
super.init(theWorkbench, currentSelection);
cdtWizard.init(theWorkbench, currentSelection);
}
@Override
public void setContainer(IWizardContainer wizardContainer) {
super.setContainer(wizardContainer);
cdtWizard.setContainer(wizardContainer);
}
@Override
public boolean performFinish() {
return cdtWizard.performFinish();
}
@Override
public boolean performCancel() {
return cdtWizard.performCancel();
}
@Override
protected IGenerator getGenerator() {
return this;
}
@Override
public void generate(IProgressMonitor monitor) throws CoreException {
// Nothing to do for now, the performFinish already did it
}
@Override
public IProject createIProject(String name, URI location) throws CoreException {
return cdtWizard.createIProject(name, location);
}
@Override
public IProject createIProject(String name, URI location, IProgressMonitor monitor) throws CoreException {
return createIProject(name, location, monitor);
}
@Override
public String[] getContentTypeIDs() {
return cdtWizard.getContentTypeIDs();
}
@Override
public String[] getExtensions() {
return cdtWizard.getExtensions();
}
@Override
public String[] getLanguageIDs() {
return cdtWizard.getLanguageIDs();
}
@Override
public IProject getLastProject() {
return cdtWizard.getLastProject();
}
@Override
public String[] getNatures() {
return cdtWizard.getNatures();
}
@Override
public IProject getProject(boolean defaults) {
return cdtWizard.getProject(defaults);
}
@Override
public IProject getProject(boolean defaults, boolean onFinish) {
return cdtWizard.getProject(defaults, onFinish);
}
@Override
public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
throws CoreException {
setInitializationData(config, propertyName, data);
}
}

View file

@ -0,0 +1,18 @@
/*******************************************************************************
* Copyright (c) 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.cdt.internal.ui.wizards;
import org.eclipse.cdt.ui.wizards.CProjectWizard;
public class CProjectWizard2 extends CDTProjectWizard2 {
public CProjectWizard2() {
super(new CProjectWizard());
}
}