[yocto] [RFC 2/6] plugins/sdk.ide: Added a new YoctoSDKCMakeProjectNature

Atanas Gegov atanas.gegov.oss at gmail.com
Mon Apr 22 05:05:59 PDT 2013


From: Atanas Gegov <atanas.gegov at bmw-carit.de>

This nature is intended for Yocto projects that
use CMake as a build system. It requires the
YoctoSDKProjectNature and can be used by upcoming
CMake project templates. It excludes the
YoctoSDKAutotoolsProjectNature, e.g. their
relation in plugin.xml is declared as
"one-of-nature".
---
 .../OSGI-INF/l10n/bundle.properties                |    1 +
 plugins/org.yocto.sdk.ide/plugin.xml               |   19 +++++++++++++++++++
 .../ide/natures/YoctoSDKCMakeProjectNature.java    |   20 ++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKCMakeProjectNature.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 1a4e3c9..48eb653 100644
--- a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties
+++ b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties
@@ -2,6 +2,7 @@
 page.name.0 = Yocto Project ADT
 extension.name.0 = YoctoSDKNature
 extension.name.1 = YoctoSDKAutotoolsNature
+extension.name.2 = YoctoSDKCMakeNature
 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 dd75532..2d6b941 100644
--- a/plugins/org.yocto.sdk.ide/plugin.xml
+++ b/plugins/org.yocto.sdk.ide/plugin.xml
@@ -40,11 +40,30 @@
                class="org.yocto.sdk.ide.natures.YoctoSDKAutotoolsProjectNature">
          </run>
       </runtime>
+      <one-of-nature
+            id="org.yocto.sdk.ide.buildsystemNaturesSet">
+      </one-of-nature>
       <builder
             id="org.eclipse.cdt.autotools.core.genmakebuilderV2">
       </builder>
    </extension>
    <extension
+         id="YoctoSDKCMakeNature"
+         name="%extension.name.2"
+         point="org.eclipse.core.resources.natures">
+      <requires-nature
+            id="org.yocto.sdk.ide.YoctoSDKNature">
+      </requires-nature>
+      <runtime>
+         <run
+               class="org.yocto.sdk.ide.natures.YoctoSDKCMakeProjectNature">
+         </run>
+      </runtime>
+      <one-of-nature
+            id="org.yocto.sdk.ide.buildsystemNaturesSet">
+      </one-of-nature>
+   </extension>
+   <extension
          id="YoctoSDKEmptyNature"
          point="org.eclipse.core.resources.natures">
       <requires-nature
diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKCMakeProjectNature.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKCMakeProjectNature.java
new file mode 100644
index 0000000..86a9d45
--- /dev/null
+++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKCMakeProjectNature.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2013 BMW Car IT GmbH.
+ * 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:
+ * BMW Car IT - initial API and implementation
+ *******************************************************************************/
+package org.yocto.sdk.ide.natures;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.yocto.sdk.ide.YoctoSDKPlugin;
+
+public class YoctoSDKCMakeProjectNature extends YoctoSDKProjectNature {
+	public static final  String YoctoSDK_CMAKE_NATURE_ID = YoctoSDKPlugin.getUniqueIdentifier() + ".YoctoSDKCMakeNature";
+
+}
-- 
1.7.9.5




More information about the yocto mailing list