From: Atanas Gegov <atanas.ge...@bmw-carit.de> This plugin will implement the CMake managed builder (CMake toolchain for Eclipse) and will also provide CMake template projects. --- plugins/org.yocto.cmake.managedbuilder/.classpath | 7 +++ plugins/org.yocto.cmake.managedbuilder/.project | 28 ++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 8 +++ .../META-INF/MANIFEST.MF | 16 ++++++ .../OSGI-INF/l10n/bundle.properties | 13 +++++ .../build.properties | 6 +++ plugins/org.yocto.cmake.managedbuilder/plugin.xml | 4 ++ .../org/yocto/cmake/managedbuilder/Activator.java | 50 +++++++++++++++++ .../cmake/managedbuilder/YoctoCMakeMessages.java | 57 ++++++++++++++++++++ 9 files changed, 189 insertions(+) create mode 100644 plugins/org.yocto.cmake.managedbuilder/.classpath create mode 100644 plugins/org.yocto.cmake.managedbuilder/.project create mode 100644 plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF create mode 100644 plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/build.properties create mode 100644 plugins/org.yocto.cmake.managedbuilder/plugin.xml create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java create mode 100644 plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java
diff --git a/plugins/org.yocto.cmake.managedbuilder/.classpath b/plugins/org.yocto.cmake.managedbuilder/.classpath new file mode 100644 index 0000000..ad32c83 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/.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.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.yocto.cmake.managedbuilder/.project b/plugins/org.yocto.cmake.managedbuilder/.project new file mode 100644 index 0000000..67c7f68 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.yocto.cmake.managedbuilder</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/plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs b/plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..c1a4ce9 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Wed Jul 14 11:43:59 CEST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF b/plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF new file mode 100644 index 0000000..2ed5451 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: org.yocto.cmake.managedbuilder;singleton:=true +Bundle-Version: 1.4.0.qualifier +Bundle-Activator: org.yocto.cmake.managedbuilder.Activator +Bundle-Vendor: %Bundle-Vendor +Require-Bundle: org.eclipse.cdt.managedbuilder.core, + org.eclipse.cdt.core;bundle-version="5.2.1", + org.eclipse.core.resources;bundle-version="3.6.0", + org.eclipse.core.runtime;bundle-version="3.6.0", + org.eclipse.ui.console;bundle-version="3.5.0", + org.eclipse.ui;bundle-version="3.6.2", + org.yocto.sdk.ide +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy diff --git a/plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties b/plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000..86125e4 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,13 @@ +#/******************************************************************************* +# * 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 implementation +# *******************************************************************************/ + +Bundle-Vendor = yoctoproject.org +Bundle-Name = Yocto CMake Plugin diff --git a/plugins/org.yocto.cmake.managedbuilder/build.properties b/plugins/org.yocto.cmake.managedbuilder/build.properties new file mode 100644 index 0000000..3e5f9ad --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + OSGI-INF/ diff --git a/plugins/org.yocto.cmake.managedbuilder/plugin.xml b/plugins/org.yocto.cmake.managedbuilder/plugin.xml new file mode 100644 index 0000000..f422d55 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/plugin.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<plugin> +</plugin> diff --git a/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java new file mode 100644 index 0000000..6d4e28f --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/Activator.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * 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.cmake.managedbuilder; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; + +public class Activator extends Plugin { + + /** The plug-in ID. */ + public static final String PLUGIN_ID = "org.yocto.cmake.managedbuilder"; //$NON-NLS-1$ + + /** The shared activator instance. */ + private static Activator plugin; + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + 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) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * @return the shared instance of the Activator + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java new file mode 100644 index 0000000..1bd8b46 --- /dev/null +++ b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMessages.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * 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.cmake.managedbuilder; + +import java.text.MessageFormat; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +public class YoctoCMakeMessages { + + private static final String RESOURCE_BUNDLE= YoctoCMakeMessages.class.getName(); + private static ResourceBundle fgResourceBundle; + static { + try { + fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE); + } catch (MissingResourceException x) { + fgResourceBundle = null; + } + } + + private YoctoCMakeMessages() { + } + + public static String getString(String key) { + try { + return fgResourceBundle.getString(key); + } catch (MissingResourceException e) { + return '!' + key + '!'; + } catch (NullPointerException e) { + return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * Gets a string from the resource bundle and formats it with the argument + * + * @param key the string used to get the bundle value, must not be null + */ + public static String getFormattedString(String key, Object arg) { + return MessageFormat.format(getString(key), new Object[] { arg }); + } + + /** + * Gets a string from the resource bundle and formats it with arguments + */ + public static String getFormattedString(String key, Object[] args) { + return MessageFormat.format(getString(key), args); + } +} -- 1.7.9.5 _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto