Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChin Huat Ang2017-10-23 18:16:05 +0000
committerDoug Schaefer2017-10-30 18:33:06 +0000
commita974ba9c9ee7372f98bdb5f561c3d49aeeb10eab (patch)
treea034f78820fdd6e193ba413d5c351a10f8218197 /build/org.eclipse.cdt.core.autotools.ui
parent4bf930decba90d8740e015a9318a960f70ec1a59 (diff)
downloadorg.eclipse.cdt-a974ba9c9ee7372f98bdb5f561c3d49aeeb10eab.tar.gz
org.eclipse.cdt-a974ba9c9ee7372f98bdb5f561c3d49aeeb10eab.tar.xz
org.eclipse.cdt-a974ba9c9ee7372f98bdb5f561c3d49aeeb10eab.zip
Bug 525591: autotools: Initial core build implementation
Add core, UI and feature plugins for the new autotools project which uses template wizard and core build. The template wizard currently supports generating a simple autotools project as described using a template manifest. The project generator sets new autotools nature associated with new autotools build config provider. The generated autotools project has been tested to compile fine with gcc (x86_64-linux-gnu-gcc) toolchain. Change-Id: I8349999d551bb693725a246340cf46266150fadc Signed-off-by: Chin Huat Ang <chin.huat.ang@intel.com>
Diffstat (limited to 'build/org.eclipse.cdt.core.autotools.ui')
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/.classpath7
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/.project28
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/META-INF/MANIFEST.MF16
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/about.html24
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/build.properties7
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/plugin.properties12
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/plugin.xml19
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Activator.java61
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Messages.java27
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/NewAutotoolsProjectWizard.java51
-rw-r--r--build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/messages.properties9
12 files changed, 268 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.core.autotools.ui/.classpath b/build/org.eclipse.cdt.core.autotools.ui/.classpath
new file mode 100644
index 0000000000..eca7bdba8f
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/build/org.eclipse.cdt.core.autotools.ui/.project b/build/org.eclipse.cdt.core.autotools.ui/.project
new file mode 100644
index 0000000000..8522cebb30
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.cdt.core.autotools.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/build/org.eclipse.cdt.core.autotools.ui/.settings/org.eclipse.jdt.core.prefs b/build/org.eclipse.cdt.core.autotools.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..0c68a61dca
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/build/org.eclipse.cdt.core.autotools.ui/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.core.autotools.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..2f3498c3f5
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.cdt.core.autotools.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.cdt.core.autotools.ui.internal.Activator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.tools.templates.ui;bundle-version="1.1.1",
+ org.eclipse.ui.ide;bundle-version="3.13.0",
+ org.eclipse.cdt.core.autotools.core;bundle-version="1.0.0",
+ org.eclipse.tools.templates.freemarker;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/build/org.eclipse.cdt.core.autotools.ui/about.html b/build/org.eclipse.cdt.core.autotools.ui/about.html
new file mode 100644
index 0000000000..d7c511887d
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 22, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/build/org.eclipse.cdt.core.autotools.ui/build.properties b/build/org.eclipse.cdt.core.autotools.ui/build.properties
new file mode 100644
index 0000000000..e398e4efb7
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
diff --git a/build/org.eclipse.cdt.core.autotools.ui/plugin.properties b/build/org.eclipse.cdt.core.autotools.ui/plugin.properties
new file mode 100644
index 0000000000..b17c46c6a1
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2017 Intel Corporation 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
+###############################################################################
+
+pluginName=CDT Autotools UI
+providerName=Eclipse CDT
+autotoolsTemplate.label=Autotools Project
+autotoolsTemplate.description=An Autotools project with a Hello World executable build using the CDT's core build system. Can be built using toolchain containers.
diff --git a/build/org.eclipse.cdt.core.autotools.ui/plugin.xml b/build/org.eclipse.cdt.core.autotools.ui/plugin.xml
new file mode 100644
index 0000000000..e4abf4678a
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/plugin.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.tools.templates.ui.templates">
+ <template
+ id="org.eclipse.cdt.core.autotools.ui.template1"
+ label="%autotoolsTemplate.label"
+ wizard="org.eclipse.cdt.core.autotools.ui.internal.NewAutotoolsProjectWizard">
+ <tagReference
+ id="org.eclipse.cdt.ui.cdtTag">
+ </tagReference>
+ <description>
+ %autotoolsTemplate.description
+ </description>
+ </template>
+ </extension>
+
+</plugin>
diff --git a/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Activator.java b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Activator.java
new file mode 100644
index 0000000000..5109d0c6a1
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Activator.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Intel Corporation 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
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.autotools.ui.internal;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.cdt.core.autotools.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Messages.java b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Messages.java
new file mode 100644
index 0000000000..e24b2335db
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/Messages.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Intel Corporation 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
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.autotools.ui.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.core.autotools.ui.internal.messages"; //$NON-NLS-1$
+ public static String NewAutotoolsProjectWizard_Description;
+ public static String NewAutotoolsProjectWizard_Title;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/NewAutotoolsProjectWizard.java b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/NewAutotoolsProjectWizard.java
new file mode 100644
index 0000000000..1d492ce88f
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/NewAutotoolsProjectWizard.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2017 Intel Corporation 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
+ *
+ * Contributors:
+ * Intel Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.cdt.core.autotools.ui.internal;
+
+import org.eclipse.cdt.core.autotools.core.AutotoolsProjectGenerator;
+import org.eclipse.jface.dialogs.Dialog;
+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 NewAutotoolsProjectWizard extends TemplateWizard {
+
+ private WizardNewProjectCreationPage mainPage;
+
+ @Override
+ public void addPages() {
+ mainPage = new WizardNewProjectCreationPage("basicNewProjectPage") { //$NON-NLS-1$
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ createWorkingSetGroup((Composite) getControl(), getSelection(),
+ new String[] { "org.eclipse.ui.resourceWorkingSetPage" }); //$NON-NLS-1$
+ Dialog.applyDialogFont(getControl());
+ }
+ };
+ mainPage.setTitle(Messages.NewAutotoolsProjectWizard_Title);
+ mainPage.setDescription(Messages.NewAutotoolsProjectWizard_Description);
+ this.addPage(mainPage);
+ }
+
+ @Override
+ protected IGenerator getGenerator() {
+ AutotoolsProjectGenerator generator = new AutotoolsProjectGenerator("templates/autotools/manifest.xml"); //$NON-NLS-1$
+ generator.setProjectName(mainPage.getProjectName());
+ if (!mainPage.useDefaults()) {
+ generator.setLocationURI(mainPage.getLocationURI());
+ }
+ return generator;
+ }
+
+}
diff --git a/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/messages.properties b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/messages.properties
new file mode 100644
index 0000000000..e24e11786f
--- /dev/null
+++ b/build/org.eclipse.cdt.core.autotools.ui/src/org/eclipse/cdt/core/autotools/ui/internal/messages.properties
@@ -0,0 +1,9 @@
+###############################################################################
+# Copyright (c) 2017 Intel Corporation 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
+###############################################################################
+NewAutotoolsProjectWizard_Description=Specify properties of new Autotools project.
+NewAutotoolsProjectWizard_Title=New Autotools Project

Back to the top