[yocto] [PATCHv2 2/9] plugins/sdk.ide: Added a new YoctoSDKAutotoolsProjectNature
Atanas Gegov
atanas.gegov.oss at gmail.com
Thu Apr 11 04:25:24 PDT 2013
From: Atanas Gegov <atanas.gegov at bmw-carit.de>
This nature is intended for Yocto projects that use
Autotools as a build system. It requires the YoctoSDKProjectNature
and will be used by the existing templates.
---
.../OSGI-INF/l10n/bundle.properties | 1 +
plugins/org.yocto.sdk.ide/plugin.xml | 18 ++++++++-
.../natures/YoctoSDKAutotoolsProjectNature.java | 41 ++++++++++++++++++++
3 files changed, 59 insertions(+), 1 deletion(-)
create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java
diff --git a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties
index a7172be..3d491fb 100644
--- a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties
+++ b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties
@@ -1,6 +1,7 @@
#Properties file for org.Yocto.sdk.ide
page.name.0 = Yocto Project ADT
extension.name.0 = YoctoSDKNature
+extension.name.1 = YoctoSDKAutotoolsNature
command.name = ReconfigureYoctoProject
command.label.0 = Change Yocto Project Settings
command.mnemonic = C
diff --git a/plugins/org.yocto.sdk.ide/plugin.xml b/plugins/org.yocto.sdk.ide/plugin.xml
index 1fbca80..f21434b 100644
--- a/plugins/org.yocto.sdk.ide/plugin.xml
+++ b/plugins/org.yocto.sdk.ide/plugin.xml
@@ -19,12 +19,25 @@
id="YoctoSDKNature"
name="%extension.name.0"
point="org.eclipse.core.resources.natures">
+ <runtime>
+ <run
+ class="org.yocto.sdk.ide.natures.YoctoSDKProjectNature">
+ </run>
+ </runtime>
+ </extension>
+ <extension
+ id="YoctoSDKAutotoolsNature"
+ name="%extension.name.1"
+ point="org.eclipse.core.resources.natures">
+ <requires-nature
+ id="org.yocto.sdk.ide.YoctoSDKNature">
+ </requires-nature>
<requires-nature
id="org.eclipse.cdt.autotools.core.autotoolsNatureV2">
</requires-nature>
<runtime>
<run
- class="org.yocto.sdk.ide.natures.YoctoSDKProjectNature">
+ class="org.yocto.sdk.ide.natures.YoctoSDKAutotoolsProjectNature">
</run>
</runtime>
<builder
@@ -34,6 +47,9 @@
<extension
id="YoctoSDKEmptyNature"
point="org.eclipse.core.resources.natures">
+ <requires-nature
+ id="org.yocto.sdk.ide.YoctoSDKNature">
+ </requires-nature>
<runtime>
<run
class="org.yocto.sdk.ide.natures.YoctoSDKEmptyProjectNature">
diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java
new file mode 100644
index 0000000..ac73878
--- /dev/null
+++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Intel Corporation.
+ * 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 - initial API and implementation
+ *******************************************************************************/
+package org.yocto.sdk.ide.natures;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.yocto.sdk.ide.YoctoSDKPlugin;
+
+public class YoctoSDKAutotoolsProjectNature implements IProjectNature {
+ public static final String YoctoSDK_AUTOTOOLS_NATURE_ID = YoctoSDKPlugin.getUniqueIdentifier() + ".YoctoSDKAutotoolsNature";
+
+ private IProject proj;
+
+ public void configure() throws CoreException {
+ }
+
+ public void deconfigure() throws CoreException {
+ }
+
+ public IProject getProject() {
+ return proj;
+ }
+
+ public void setProject(IProject project) {
+ this.proj = project;
+ }
+
+ public static void addYoctoSDKAutotoolsNature(IProject project, IProgressMonitor monitor) throws CoreException {
+ YoctoSDKNatureUtils.addNature(project, YoctoSDK_AUTOTOOLS_NATURE_ID, monitor);
+ }
+}
--
1.7.9.5
More information about the yocto
mailing list