Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'build/org.eclipse.cdt.make.ui')
-rw-r--r--build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF4
-rw-r--r--build/org.eclipse.cdt.make.ui/icons/cdt_logo_48.pngbin0 -> 3654 bytes
-rw-r--r--build/org.eclipse.cdt.make.ui/plugin.xml22
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java78
4 files changed, 103 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF
index 69cc08e6ad7..aa7adc5bd1d 100644
--- a/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF
@@ -35,7 +35,9 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui.navigator;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
org.eclipse.compare;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="1.2.0"
+ org.eclipse.core.filesystem;bundle-version="1.2.0",
+ org.eclipse.tools.templates.ui;bundle-version="1.1.1",
+ org.eclipse.tools.templates.freemarker;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.ibm.icu.text
diff --git a/build/org.eclipse.cdt.make.ui/icons/cdt_logo_48.png b/build/org.eclipse.cdt.make.ui/icons/cdt_logo_48.png
new file mode 100644
index 00000000000..4f2aecee517
--- /dev/null
+++ b/build/org.eclipse.cdt.make.ui/icons/cdt_logo_48.png
Binary files differ
diff --git a/build/org.eclipse.cdt.make.ui/plugin.xml b/build/org.eclipse.cdt.make.ui/plugin.xml
index 0554661e404..430a7a35fd2 100644
--- a/build/org.eclipse.cdt.make.ui/plugin.xml
+++ b/build/org.eclipse.cdt.make.ui/plugin.xml
@@ -629,4 +629,26 @@
</includes>
</viewerActionBinding>
</extension>
+ <extension
+ point="org.eclipse.tools.templates.ui.templates">
+ <template
+ icon="icons/cdt_logo_48.png"
+ id="org.eclipse.cdt.make.ui.template"
+ label="Makefile Project"
+ wizard="org.eclipse.cdt.make.internal.ui.wizards.NewMakefileProjectWizard">
+ <description>
+ Create a new project that builds with the &apos;make&apos; build tool.
+ </description>
+ <tagReference
+ id="org.eclipse.cdt.ui.cdtTag">
+ </tagReference>
+ <tagReference
+ id="org.eclipse.cdt.make.ui.tag">
+ </tagReference>
+ </template>
+ <tag
+ id="org.eclipse.cdt.make.ui.tag"
+ label="Make">
+ </tag>
+ </extension>
</plugin>
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java
new file mode 100644
index 00000000000..183556dfe68
--- /dev/null
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/wizards/NewMakefileProjectWizard.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2017 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.make.internal.ui.wizards;
+
+import org.eclipse.cdt.make.core.MakefileProjectGenerator;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.tools.templates.core.IGenerator;
+import org.eclipse.tools.templates.ui.TemplateWizard;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+
+public class NewMakefileProjectWizard extends TemplateWizard {
+
+ private WizardNewProjectCreationPage mainPage;
+ private boolean generateSource = true;
+
+ @Override
+ public void setContainer(IWizardContainer wizardContainer) {
+ super.setContainer(wizardContainer);
+ setWindowTitle("New Makefile Project");
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new WizardNewProjectCreationPage("basicNewProjectPage") { //$NON-NLS-1$
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ Composite comp = (Composite) getControl();
+ createWorkingSetGroup(comp, getSelection(),
+ new String[] { "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$
+
+ Composite buttonComp = new Composite(comp, SWT.NONE);
+ buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ buttonComp.setLayout(new GridLayout());
+
+ Button genSourceButton = new Button(buttonComp, SWT.CHECK);
+ genSourceButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ genSourceButton.setText("Generate Source and Makefile");
+ genSourceButton.setSelection(generateSource);
+ genSourceButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ generateSource = genSourceButton.getSelection();
+ }
+ });
+ Dialog.applyDialogFont(getControl());
+ }
+ };
+ mainPage.setTitle("New Makefile Project");
+ mainPage.setDescription("Specify properties of new Makefile project.");
+ this.addPage(mainPage);
+ }
+
+ @Override
+ protected IGenerator getGenerator() {
+ String manifest = generateSource ? "templates/simple/manifest.xml" : null; //$NON-NLS-1$
+ MakefileProjectGenerator generator = new MakefileProjectGenerator(manifest);
+ generator.setProjectName(mainPage.getProjectName());
+ if (!mainPage.useDefaults()) {
+ generator.setLocationURI(mainPage.getLocationURI());
+ }
+ return generator;
+ }
+
+}

Back to the top