Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2015-08-17 15:16:51 +0000
committerPierre-Charles David2015-08-19 08:50:54 +0000
commit9ed874c7757b6d3754558b5c59c72af19b40038f (patch)
treec71caca64f3f0ec4fbc96d428f8905b4514204ab
parent41103ec770492bbe54529720353c7487329227c0 (diff)
downloadorg.eclipse.sirius-9ed874c7757b6d3754558b5c59c72af19b40038f.tar.gz
org.eclipse.sirius-9ed874c7757b6d3754558b5c59c72af19b40038f.tar.xz
org.eclipse.sirius-9ed874c7757b6d3754558b5c59c72af19b40038f.zip
[472057] Add required infrastructure for i18n
* Add missing plugin & activator classes to all plug-ins which contain strings we want to be translatable, and make sure they all follow the same pattern as EMF: a "plugin" class which extends EMF's EMFPlugin, and an internal Implementation class which extends EMF's EclipsePlugin (or EclipseUIPlugin). * Also add common helper I18N class and the associated @TranslatableMessage in oes.ext.base, which can be used to initialize static fields in a Messages class from the locale-specific properties file, using EMF's ResourceLocator logic. * Rename some of the "Activator" classes, as once they follow the EMF pattern, the enclosing class is not the actual OSGi activator (the *$Implementation class is), so the name would cause confusion. Bug: 472057 Change-Id: Id030bdf628f0e7b46356213e7e4e9bdd990a4662 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/AqlIdeSupportPlugin.java64
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java5
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.mtl.ide/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.mtl.ide/src/org/eclipse/sirius/common/acceleo/mtl/ide/AcceleoMTLInterpreterIDEPlugin.java50
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.mtl/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.common.acceleo.mtl/src/org/eclipse/sirius/common/acceleo/mtl/AcceleoMTLInterpreterPlugin.java78
-rw-r--r--plugins/org.eclipse.sirius.common.ocl/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/DslOclPlugin.java74
-rw-r--r--plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/business/internal/interpreter/OclInterpreter.java2
-rw-r--r--plugins/org.eclipse.sirius.common.ui.ext/src/org/eclipse/sirius/common/ui/ext/Activator.java10
-rw-r--r--plugins/org.eclipse.sirius.common.ui/src/org/eclipse/sirius/common/ui/SiriusTransPlugin.java6
-rw-r--r--plugins/org.eclipse.sirius.common.xtext/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.common.xtext/src/org/eclipse/sirius/common/xtext/internal/XtextIntegrationPlugin.java64
-rw-r--r--plugins/org.eclipse.sirius.common/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.common/src/org/eclipse/sirius/common/tools/DslCommonPlugin.java217
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/src/org/eclipse/sirius/diagram/layoutdata/LayoutDataPlugin.java65
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence.ui/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramPlugin.java94
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramUIPlugin.java107
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/business/internal/refresh/VisibilityEventHandler.java4
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/SequenceDiagramPlugin.java65
-rw-r--r--plugins/org.eclipse.sirius.diagram/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/DiagramPlugin.java219
-rw-r--r--plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/preferences/DiagramPreferenceInitializer.java6
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.html138
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile31
-rw-r--r--plugins/org.eclipse.sirius.ecore.extender/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/ExtenderPlugin.java189
-rw-r--r--plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/common/ExtenderProviderDescriptor.java2
-rw-r--r--plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/tool/api/ModelUtils.java4
-rw-r--r--plugins/org.eclipse.sirius.eef.adapters/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/Activator.java58
-rw-r--r--plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/EEFAdapterPlugin.java70
-rw-r--r--plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/section/SiriusFilteringSectionDescriptor.java56
-rw-r--r--plugins/org.eclipse.sirius.ext.base/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.sirius.ext.base/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/BasePlugin.java65
-rw-r--r--plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/I18N.java114
-rw-r--r--plugins/org.eclipse.sirius.ext.draw2d/META-INF/MANIFEST.MF6
-rw-r--r--plugins/org.eclipse.sirius.ext.draw2d/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/Draw2DExtPlugin.java65
-rw-r--r--plugins/org.eclipse.sirius.ext.e3.ui/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.sirius.ext.e3.ui/src/org/eclipse/sirius/ext/e3/ui/Eclipse3UIExtPlugin.java64
-rw-r--r--plugins/org.eclipse.sirius.ext.emf/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.ext.emf/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.ext.emf/src/org/eclipse/sirius/ext/emf/EMFExtPlugin.java65
-rw-r--r--plugins/org.eclipse.sirius.interpreter/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/Activator.java42
-rw-r--r--plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/InterpreterViewPlugin.java69
-rw-r--r--plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/SiriusEvaluationTask.java8
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/SynchronizerPlugin.java74
-rw-r--r--plugins/org.eclipse.sirius.table.ui.ext/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.sirius.table.ui.ext/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/Activator.java35
-rw-r--r--plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/TableUIExtPlugin.java66
-rw-r--r--plugins/org.eclipse.sirius.table.ui/src-gen/org/eclipse/sirius/table/metamodel/table/provider/TableUIPlugin.java4
-rw-r--r--plugins/org.eclipse.sirius.table/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/TablePlugin.java83
-rw-r--r--plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/export/TableExportHelperImpl.java6
-rw-r--r--plugins/org.eclipse.sirius.tree.ui.ext/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.tree.ui.ext/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/Activator.java35
-rw-r--r--plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/TreeUIExtPlugin.java70
-rw-r--r--plugins/org.eclipse.sirius.tree/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/TreePlugin.java70
-rw-r--r--plugins/org.eclipse.sirius.ui.ext/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.sirius.ui.ext/build.properties1
-rw-r--r--plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/Activator.java35
-rw-r--r--plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/SiriusUIExtPlugin.java71
-rw-r--r--plugins/org.eclipse.sirius.ui/src-gen/org/eclipse/sirius/viewpoint/provider/SiriusEditPlugin.java4
76 files changed, 1996 insertions, 805 deletions
diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF
index 202976131c..9123001a73 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF
@@ -9,9 +9,12 @@ Require-Bundle: org.eclipse.sirius.common;bundle-version="2.0.0",
org.eclipse.emf.ecore;bundle-version="2.8.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %providerName
-Export-Package: org.eclipse.sirius.common.acceleo.aql.ide.proposal;x-internal:=true;version="3.0.0"
+Export-Package: org.eclipse.sirius.common.acceleo.aql.ide;version="3.1.0",
+ org.eclipse.sirius.common.acceleo.aql.ide.proposal;version="3.0.0";x-internal:=true
Import-Package: org.eclipse.acceleo.query.runtime;version="[3.6.0,4.0.0)",
org.eclipse.acceleo.query.validation.type;version="[3.6.0,4.0.0)",
org.eclipse.sirius.ecore.extender.business.api.accessor;version="[3.0.0,4.0.0)"
Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.sirius.common.acceleo.aql.ide.AqlIdeSupportPlugin$Implementation
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties
index b67e795478..195f1c4055 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties
+++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/build.properties
@@ -19,3 +19,4 @@ bin.includes = META-INF/,\
about.html,\
about.ini
javacProjectSettings = true
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/AqlIdeSupportPlugin.java b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/AqlIdeSupportPlugin.java
new file mode 100644
index 0000000000..3f124858f4
--- /dev/null
+++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/src/org/eclipse/sirius/common/acceleo/aql/ide/AqlIdeSupportPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.common.acceleo.aql.ide;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in/activator class.
+ *
+ * @author pcdavid
+ */
+public class AqlIdeSupportPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final AqlIdeSupportPlugin INSTANCE = new AqlIdeSupportPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public AqlIdeSupportPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java
index 6976f9dece..bee95a87d0 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java
+++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/AQLSiriusPlugin.java
@@ -13,6 +13,11 @@ package org.eclipse.sirius.common.acceleo.aql.business;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
+/**
+ * Plug-in class for <em>org.eclipse.sirius.common.acceleo.aql</em>.
+ *
+ * @author pcdavid
+ */
public final class AQLSiriusPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
diff --git a/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/META-INF/MANIFEST.MF
index 7315175efc..96de4cc02b 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.common.acceleo.mtl.ide;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoMTLInterpreterIDEPlugin
+Bundle-Activator: org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoMTLInterpreterIDEPlugin$Implementation
Require-Bundle: org.eclipse.sirius.common.acceleo.mtl;bundle-version="2.0.0",
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.core.runtime;bundle-version="3.5.0",
diff --git a/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/src/org/eclipse/sirius/common/acceleo/mtl/ide/AcceleoMTLInterpreterIDEPlugin.java b/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/src/org/eclipse/sirius/common/acceleo/mtl/ide/AcceleoMTLInterpreterIDEPlugin.java
index a75baef0fa..53b2e1f47c 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/src/org/eclipse/sirius/common/acceleo/mtl/ide/AcceleoMTLInterpreterIDEPlugin.java
+++ b/plugins/org.eclipse.sirius.common.acceleo.mtl.ide/src/org/eclipse/sirius/common/acceleo/mtl/ide/AcceleoMTLInterpreterIDEPlugin.java
@@ -10,33 +10,59 @@
*******************************************************************************/
package org.eclipse.sirius.common.acceleo.mtl.ide;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
/**
* The activator class controls the plug-in life cycle.
*
* @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
*/
-public class AcceleoMTLInterpreterIDEPlugin implements BundleActivator {
+public class AcceleoMTLInterpreterIDEPlugin extends EMFPlugin {
/** The plug-in ID. */
public static final String PLUGIN_ID = "org.eclipse.sirius.common.acceleo.mtl.ide"; //$NON-NLS-1$
/**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ * Keep track of the singleton.
+ */
+ public static final AcceleoMTLInterpreterIDEPlugin INSTANCE = new AcceleoMTLInterpreterIDEPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
*/
- public void start(BundleContext bundleContext) throws Exception {
- // empty implementation
+ public AcceleoMTLInterpreterIDEPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
}
/**
- * {@inheritDoc}
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ * @return the singleton instance.
*/
- public void stop(BundleContext bundleContext) throws Exception {
- // empty implementation
+ public static Implementation getPlugin() {
+ return plugin;
}
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
}
diff --git a/plugins/org.eclipse.sirius.common.acceleo.mtl/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.mtl/META-INF/MANIFEST.MF
index a4c8ba1a72..38ab322963 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.mtl/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.common.acceleo.mtl/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.common.acceleo.mtl;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.sirius.common.acceleo.mtl.AcceleoMTLInterpreterPlugin
+Bundle-Activator: org.eclipse.sirius.common.acceleo.mtl.AcceleoMTLInterpreterPlugin$Implementation
Require-Bundle: org.eclipse.sirius.common;bundle-version="2.0.0",
org.eclipse.sirius.ecore.extender;bundle-version="2.0.0",
org.eclipse.acceleo.engine;bundle-version="3.4.1",
diff --git a/plugins/org.eclipse.sirius.common.acceleo.mtl/src/org/eclipse/sirius/common/acceleo/mtl/AcceleoMTLInterpreterPlugin.java b/plugins/org.eclipse.sirius.common.acceleo.mtl/src/org/eclipse/sirius/common/acceleo/mtl/AcceleoMTLInterpreterPlugin.java
index 7f4bf98c07..3f5f8b54f0 100644
--- a/plugins/org.eclipse.sirius.common.acceleo.mtl/src/org/eclipse/sirius/common/acceleo/mtl/AcceleoMTLInterpreterPlugin.java
+++ b/plugins/org.eclipse.sirius.common.acceleo.mtl/src/org/eclipse/sirius/common/acceleo/mtl/AcceleoMTLInterpreterPlugin.java
@@ -10,11 +10,11 @@
*******************************************************************************/
package org.eclipse.sirius.common.acceleo.mtl;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.sirius.common.acceleo.mtl.business.internal.extension.AcceleoRegistryListener;
import org.eclipse.sirius.common.acceleo.mtl.business.internal.extension.ImportHandlerRegistry;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
@@ -22,58 +22,66 @@ import org.osgi.framework.BundleContext;
*
* @author mporhel
*/
-public class AcceleoMTLInterpreterPlugin extends Plugin {
+public class AcceleoMTLInterpreterPlugin extends EMFPlugin {
/** The plug-in ID. */
public static final String PLUGIN_ID = "org.eclipse.sirius.common.acceleo.mtl"; //$NON-NLS-1$
- /** This plug-in's shared instance. */
- private static AcceleoMTLInterpreterPlugin plugin;
+ /** Keep track of the singleton.. */
+ public static final AcceleoMTLInterpreterPlugin INSTANCE = new AcceleoMTLInterpreterPlugin();
- /**
- * The registry listener that will be used for extensions to the acceleo
- * interpreter.
- */
- private final AcceleoRegistryListener registryListener = new AcceleoRegistryListener();
+ /** This plug-in's shared instance. */
+ private static Implementation plugin;
/**
* Default constructor for the plugin.
*/
public AcceleoMTLInterpreterPlugin() {
- // Empty implementation
+ super(new ResourceLocator[0]);
}
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static AcceleoMTLInterpreterPlugin getDefault() {
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
- * {@inheritDoc}
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ * @return the singleton instance.
*/
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- Platform.getExtensionRegistry().addListener(registryListener, AcceleoRegistryListener.IMPORT_HANDLER_EXTENSION_POINT);
- registryListener.parseInitialContributions();
+ public static Implementation getDefault() {
+ return plugin;
}
/**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ * The actual implementation of the Eclipse <b>Plugin</b>.
*/
- @Override
- public void stop(final BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- Platform.getExtensionRegistry().removeListener(registryListener);
- ImportHandlerRegistry.clearRegistry();
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * The registry listener that will be used for extensions to the acceleo
+ * interpreter.
+ */
+ private final AcceleoRegistryListener registryListener = new AcceleoRegistryListener();
+
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+
+ @Override
+ public void start(final BundleContext context) throws Exception {
+ super.start(context);
+ Platform.getExtensionRegistry().addListener(registryListener, AcceleoRegistryListener.IMPORT_HANDLER_EXTENSION_POINT);
+ registryListener.parseInitialContributions();
+ }
+
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ super.stop(context);
+ Platform.getExtensionRegistry().removeListener(registryListener);
+ ImportHandlerRegistry.clearRegistry();
+ }
}
}
diff --git a/plugins/org.eclipse.sirius.common.ocl/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.ocl/META-INF/MANIFEST.MF
index c7fb3bf6ba..5ef2926b26 100644
--- a/plugins/org.eclipse.sirius.common.ocl/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.common.ocl/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.common.ocl;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.sirius.common.ocl.DslOclPlugin
+Bundle-Activator: org.eclipse.sirius.common.ocl.DslOclPlugin$Implementation
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.sirius.common;bundle-version="2.0.0",
org.eclipse.ocl.ecore;bundle-version="3.2.0",
diff --git a/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/DslOclPlugin.java b/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/DslOclPlugin.java
index 55ce7cb56d..7e1d0a1c8c 100644
--- a/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/DslOclPlugin.java
+++ b/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/DslOclPlugin.java
@@ -12,71 +12,73 @@ package org.eclipse.sirius.common.ocl;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
/**
* The activator class controls the plug-in life cycle.
*
* @author ymortier
*/
-public class DslOclPlugin extends Plugin {
+public class DslOclPlugin extends EMFPlugin {
/** The plug-in ID. */
public static final String PLUGIN_ID = "org.eclipse.sirius.common.ocl";
- // The shared instance
- private static DslOclPlugin plugin;
-
/**
- * The constructor.
+ * Keep track of the singleton.
*/
- public DslOclPlugin() {
- }
+ public static final DslOclPlugin INSTANCE = new DslOclPlugin();
/**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ * Keep track of the singleton.
*/
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
+ private static Implementation plugin;
/**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ * The constructor.
*/
+ public DslOclPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
@Override
- public void stop(final BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
}
/**
- * Returns the shared instance.
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @return the shared instance
+ * @return the singleton instance.
*/
- public static DslOclPlugin getDefault() {
+ public static Implementation getPlugin() {
return plugin;
}
/**
- * Log a an error in the error log view.
- *
- * @param message
- * the message.
- * @param t
- * the optional exception.
+ * The actual implementation of the Eclipse <b>Plugin</b>.
*/
- public void error(final String message, final Throwable t) {
- final IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, t);
- Platform.getLog(this.getBundle()).log(status);
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+
+ /**
+ * Log a an error in the error log view.
+ *
+ * @param message
+ * the message.
+ * @param t
+ * the optional exception.
+ */
+ public void error(final String message, final Throwable t) {
+ final IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, t);
+ Platform.getLog(this.getBundle()).log(status);
+ }
}
-
}
diff --git a/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/business/internal/interpreter/OclInterpreter.java b/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/business/internal/interpreter/OclInterpreter.java
index 243b5cc563..cdc2e954d8 100644
--- a/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/business/internal/interpreter/OclInterpreter.java
+++ b/plugins/org.eclipse.sirius.common.ocl/src/org/eclipse/sirius/common/ocl/business/internal/interpreter/OclInterpreter.java
@@ -239,7 +239,7 @@ public class OclInterpreter implements IInterpreter, IInterpreterProvider, IProp
try {
result = new Integer((String) value);
} catch (final NumberFormatException nfe) {
- DslOclPlugin.getDefault().error("The value returned by the OCL evaluation is not a number", nfe);
+ DslOclPlugin.getPlugin().error("The value returned by the OCL evaluation is not a number", nfe);
}
}
return result;
diff --git a/plugins/org.eclipse.sirius.common.ui.ext/src/org/eclipse/sirius/common/ui/ext/Activator.java b/plugins/org.eclipse.sirius.common.ui.ext/src/org/eclipse/sirius/common/ui/ext/Activator.java
index 1266350191..6285dc9e80 100644
--- a/plugins/org.eclipse.sirius.common.ui.ext/src/org/eclipse/sirius/common/ui/ext/Activator.java
+++ b/plugins/org.eclipse.sirius.common.ui.ext/src/org/eclipse/sirius/common/ui/ext/Activator.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.common.ui.ext;
import org.osgi.framework.BundleActivator;
diff --git a/plugins/org.eclipse.sirius.common.ui/src/org/eclipse/sirius/common/ui/SiriusTransPlugin.java b/plugins/org.eclipse.sirius.common.ui/src/org/eclipse/sirius/common/ui/SiriusTransPlugin.java
index fe406787c9..47b37a5893 100644
--- a/plugins/org.eclipse.sirius.common.ui/src/org/eclipse/sirius/common/ui/SiriusTransPlugin.java
+++ b/plugins/org.eclipse.sirius.common.ui/src/org/eclipse/sirius/common/ui/SiriusTransPlugin.java
@@ -301,12 +301,6 @@ public final class SiriusTransPlugin extends EMFPlugin {
getLog().log(status);
}
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- * @generated-not
- */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
diff --git a/plugins/org.eclipse.sirius.common.xtext/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.xtext/META-INF/MANIFEST.MF
index ea1d7bcdc4..8465097f3f 100644
--- a/plugins/org.eclipse.sirius.common.xtext/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.common.xtext/META-INF/MANIFEST.MF
@@ -12,3 +12,5 @@ Require-Bundle: org.eclipse.xtext.ui;bundle-version="2.1.1",
org.eclipse.emf.transaction;bundle-version="1.4.0"
Bundle-Localization: plugin
Export-Package: org.eclipse.sirius.common.xtext.internal;x-internal:=true;version="2.0.4"
+Bundle-Activator: org.eclipse.sirius.common.xtext.internal.XtextIntegrationPlugin$Implementation
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.common.xtext/src/org/eclipse/sirius/common/xtext/internal/XtextIntegrationPlugin.java b/plugins/org.eclipse.sirius.common.xtext/src/org/eclipse/sirius/common/xtext/internal/XtextIntegrationPlugin.java
new file mode 100644
index 0000000000..5784f2370f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.common.xtext/src/org/eclipse/sirius/common/xtext/internal/XtextIntegrationPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.common.xtext.internal;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.common.xtext</em>.
+ */
+public class XtextIntegrationPlugin extends EMFPlugin {
+
+ /**
+ * Keep track of the singleton.
+ */
+ public static final XtextIntegrationPlugin INSTANCE = new XtextIntegrationPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public XtextIntegrationPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common/META-INF/MANIFEST.MF
index bf7ed6636d..8d290cbfac 100644
--- a/plugins/org.eclipse.sirius.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.common/META-INF/MANIFEST.MF
@@ -23,7 +23,7 @@ Export-Package: org.eclipse.sirius.common.tools;version="2.0.4",
org.eclipse.sirius.common.tools.internal.editing;x-internal:=true;version="2.0.4",
org.eclipse.sirius.common.tools.internal.interpreter;x-internal:=true;version="3.0.0",
org.eclipse.sirius.common.tools.internal.resource;x-internal:=true;version="2.0.4"
-Bundle-Activator: org.eclipse.sirius.common.tools.DslCommonPlugin
+Bundle-Activator: org.eclipse.sirius.common.tools.DslCommonPlugin$Implementation
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.sirius.common/src/org/eclipse/sirius/common/tools/DslCommonPlugin.java b/plugins/org.eclipse.sirius.common/src/org/eclipse/sirius/common/tools/DslCommonPlugin.java
index 15a2d19f17..090b1e867f 100644
--- a/plugins/org.eclipse.sirius.common/src/org/eclipse/sirius/common/tools/DslCommonPlugin.java
+++ b/plugins/org.eclipse.sirius.common/src/org/eclipse/sirius/common/tools/DslCommonPlugin.java
@@ -13,8 +13,9 @@ package org.eclipse.sirius.common.tools;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.sirius.common.tools.api.editing.EditingDomainFactoryRegistry;
import org.eclipse.sirius.common.tools.api.profiler.TimeProfiler;
import org.eclipse.sirius.common.tools.api.profiler.TimeProfiler2;
@@ -29,7 +30,7 @@ import org.osgi.framework.BundleContext;
*
* @author ymortier
*/
-public class DslCommonPlugin extends Plugin {
+public class DslCommonPlugin extends EMFPlugin {
/** The plugin id. */
public static final String PLUGIN_ID = "org.eclipse.sirius.common";
@@ -37,129 +38,129 @@ public class DslCommonPlugin extends Plugin {
/** The profiler. */
public static final TimeProfiler PROFILER = new TimeProfiler2();
- // The shared instance
- private static DslCommonPlugin plugin;
-
- /** The registry listener that will be used to listen to extension changes. */
- private EditingDomainFactoryRegistryListener editingDomainFactoryRegistryListener = new EditingDomainFactoryRegistryListener();
-
- /**
- * The registry listener that will be used to react to changes against the
- * proposal providers extension point.
- */
- private final ProposalProviderRegistryListener proposalProviderRegistryListener = new ProposalProviderRegistryListener();
-
-
+ private static Implementation plugin;
/**
* The constructor.
*/
public DslCommonPlugin() {
+ super(new ResourceLocator[0]);
}
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
-
- initExtensionRegistries();
-
- new DynamicPackageRegistryReader().readRegistry();
-
-
- }
-
- /**
- * Initializes the extension registries and their listeners for this plugin.
- */
- private void initExtensionRegistries() {
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- registry.addRegistryChangeListener(editingDomainFactoryRegistryListener, EditingDomainFactoryRegistryListener.EDITING_DOMAIN_FACTORY_EXTENSION_POINT);
- editingDomainFactoryRegistryListener.parseInitialContributions();
-
- registry.addListener(proposalProviderRegistryListener, ProposalProviderRegistryListener.PROPOSAL_PROVIDER_EXTENSION_POINT);
- proposalProviderRegistryListener.parseInitialContributions();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
@Override
- public void stop(final BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
-
- clearExtensionRegistries();
-
- }
-
- /**
- * Clears the extension registries for this plugin and remove their
- * corresponding listeners.
- */
- private void clearExtensionRegistries() {
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
-
- registry.removeRegistryChangeListener(editingDomainFactoryRegistryListener);
- EditingDomainFactoryRegistry.clearRegistry();
-
- registry.removeListener(proposalProviderRegistryListener);
- ProposalProviderRegistry.clearRegistry();
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance.
- */
- public static DslCommonPlugin getDefault() {
+ public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
- * Logs the given message and throwable as an error.
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @param message
- * the message.
- * @param t
- * the exception.
+ * @return the singleton instance.
*/
- public void error(final String message, final Throwable t) {
- final IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, t);
- this.getLog().log(status);
- }
-
- /**
- * Logs the given message and throwable as a warning.
- *
- * @param message
- * the message.
- * @param t
- * the exception.
- */
- public void warning(final String message, final Throwable t) {
- final IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message, t);
- this.getLog().log(status);
+ public static Implementation getDefault() {
+ return plugin;
}
/**
- * Logs the given message as an information.
- *
- * @param message
- * the message.
+ * The actual implementation of the Eclipse <b>Plugin</b>.
*/
- public void info(final String message) {
- final IStatus status = new Status(IStatus.INFO, PLUGIN_ID, message);
- this.getLog().log(status);
+ public static class Implementation extends EclipsePlugin {
+
+ /**
+ * The registry listener that will be used to listen to extension
+ * changes.
+ */
+ private EditingDomainFactoryRegistryListener editingDomainFactoryRegistryListener = new EditingDomainFactoryRegistryListener();
+
+ /**
+ * The registry listener that will be used to react to changes against
+ * the proposal providers extension point.
+ */
+ private final ProposalProviderRegistryListener proposalProviderRegistryListener = new ProposalProviderRegistryListener();
+
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ initExtensionRegistries();
+ new DynamicPackageRegistryReader().readRegistry();
+ }
+
+ /**
+ * Initializes the extension registries and their listeners for this
+ * plugin.
+ */
+ private void initExtensionRegistries() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+
+ registry.addRegistryChangeListener(editingDomainFactoryRegistryListener, EditingDomainFactoryRegistryListener.EDITING_DOMAIN_FACTORY_EXTENSION_POINT);
+ editingDomainFactoryRegistryListener.parseInitialContributions();
+
+ registry.addListener(proposalProviderRegistryListener, ProposalProviderRegistryListener.PROPOSAL_PROVIDER_EXTENSION_POINT);
+ proposalProviderRegistryListener.parseInitialContributions();
+ }
+
+ @Override
+ public void stop(final BundleContext context) throws Exception {
+ super.stop(context);
+ clearExtensionRegistries();
+ }
+
+ /**
+ * Clears the extension registries for this plugin and remove their
+ * corresponding listeners.
+ */
+ private void clearExtensionRegistries() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+
+ registry.removeRegistryChangeListener(editingDomainFactoryRegistryListener);
+ EditingDomainFactoryRegistry.clearRegistry();
+
+ registry.removeListener(proposalProviderRegistryListener);
+ ProposalProviderRegistry.clearRegistry();
+ }
+
+ /**
+ * Logs the given message and throwable as an error.
+ *
+ * @param message
+ * the message.
+ * @param t
+ * the exception.
+ */
+ public void error(String message, Throwable t) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, t);
+ this.getLog().log(status);
+ }
+
+ /**
+ * Logs the given message and throwable as a warning.
+ *
+ * @param message
+ * the message.
+ * @param t
+ * the exception.
+ */
+ public void warning(String message, Throwable t) {
+ IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message, t);
+ this.getLog().log(status);
+ }
+
+ /**
+ * Logs the given message as an information.
+ *
+ * @param message
+ * the message.
+ */
+ public void info(String message) {
+ IStatus status = new Status(IStatus.INFO, PLUGIN_ID, message);
+ this.getLog().log(status);
+ }
}
-
-
}
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF
index e55518ce71..ad75c45888 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF
@@ -22,3 +22,4 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.emf.ecore;bundle-version="2.8.3";visibility:=reexport,
org.eclipse.sirius.common;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
+Bundle-Activator: org.eclipse.sirius.diagram.layoutdata.LayoutDataPlugin$Implementation
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/src/org/eclipse/sirius/diagram/layoutdata/LayoutDataPlugin.java b/plugins/org.eclipse.sirius.diagram.layoutdata/src/org/eclipse/sirius/diagram/layoutdata/LayoutDataPlugin.java
new file mode 100644
index 0000000000..c285a8e41b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/src/org/eclipse/sirius/diagram/layoutdata/LayoutDataPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.diagram.layoutdata;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.diagram.layoutdata</em>.
+ *
+ * @author pcdavid
+ */
+public class LayoutDataPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final LayoutDataPlugin INSTANCE = new LayoutDataPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public LayoutDataPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram.sequence.ui/META-INF/MANIFEST.MF
index 995e824048..86bce59e40 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram.sequence.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.diagram.sequence.ui;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramPlugin
+Bundle-Activator: org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramUIPlugin$Implementation
Bundle-Vendor: %providerName
Require-Bundle: com.google.guava;bundle-version="[11.0.2,16.0)",
org.eclipse.sirius.common;bundle-version="2.0.0",
@@ -11,7 +11,8 @@ Require-Bundle: com.google.guava;bundle-version="[11.0.2,16.0)",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
org.eclipse.ui.ide;bundle-version="3.8.2",
org.eclipse.sirius.diagram.ui;bundle-version="2.0.0",
- org.eclipse.sirius.diagram.ui.ext;bundle-version="3.0.0"
+ org.eclipse.sirius.diagram.ui.ext;bundle-version="3.0.0",
+ org.eclipse.emf.common.ui;bundle-version="2.7.0"
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramPlugin.java b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramPlugin.java
deleted file mode 100644
index 524adf244b..0000000000
--- a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramPlugin.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 THALES GLOBAL SERVICES.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.sirius.diagram.sequence.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- *
- * @author pcdavid
- */
-public class SequenceDiagramPlugin extends AbstractUIPlugin {
- /**
- * The plug-in ID.
- */
- public static final String PLUGIN_ID = "org.eclipse.sirius.diagram.sequence.ui";
-
- /**
- * The shared instance.
- */
- private static SequenceDiagramPlugin plugin;
-
- /**
- * The constructor.
- */
- public SequenceDiagramPlugin() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance.
- */
- public static SequenceDiagramPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Logs a warning.
- *
- * @param message
- * the message.
- * @param e
- * the exception.
- */
- public void warning(String message, EvaluationException e) {
- IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message, e);
- getLog().log(status);
- }
-
- /**
- * Logs an error.
- *
- * @param message
- * the message.
- * @param e
- * the exception.
- */
- public void error(String message, EvaluationException e) {
- IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
- getLog().log(status);
- }
-
-}
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramUIPlugin.java b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramUIPlugin.java
new file mode 100644
index 0000000000..f0fb14a6f1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/SequenceDiagramUIPlugin.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 THALES GLOBAL SERVICES.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.diagram.sequence.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.sirius.common.tools.api.interpreter.EvaluationException;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author pcdavid
+ */
+public class SequenceDiagramUIPlugin extends EMFPlugin {
+ /**
+ * The plug-in ID.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.sirius.diagram.sequence.ui";
+
+ /**
+ * Keep track of the singleton.
+ */
+ public static final SequenceDiagramUIPlugin INSTANCE = new SequenceDiagramUIPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * The constructor.
+ */
+ public SequenceDiagramUIPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ super();
+ plugin = this;
+ }
+
+ /**
+ * Logs a warning.
+ *
+ * @param message
+ * the message.
+ * @param e
+ * the exception.
+ */
+ public void warning(String message, EvaluationException e) {
+ IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message, e);
+ getLog().log(status);
+ }
+
+ /**
+ * Logs an error.
+ *
+ * @param message
+ * the message.
+ * @param e
+ * the exception.
+ */
+ public void error(String message, EvaluationException e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+ getLog().log(status);
+ }
+
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/business/internal/refresh/VisibilityEventHandler.java b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/business/internal/refresh/VisibilityEventHandler.java
index 716aca9870..3ae1974a8c 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/business/internal/refresh/VisibilityEventHandler.java
+++ b/plugins/org.eclipse.sirius.diagram.sequence.ui/src/org/eclipse/sirius/diagram/sequence/ui/business/internal/refresh/VisibilityEventHandler.java
@@ -20,7 +20,7 @@ import org.eclipse.emf.transaction.RollbackException;
import org.eclipse.sirius.diagram.DDiagram;
import org.eclipse.sirius.diagram.DDiagramElement;
import org.eclipse.sirius.diagram.sequence.SequenceDDiagram;
-import org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramPlugin;
+import org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramUIPlugin;
import org.eclipse.sirius.diagram.sequence.ui.business.api.diagramtype.SequenceDiagramTypeProvider;
import org.eclipse.sirius.diagram.ui.tools.internal.util.NotificationQuery;
@@ -59,7 +59,7 @@ public class VisibilityEventHandler extends ResourceSetListenerImpl {
@Override
public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException {
if (containsVisibilityEvent(event)) {
- throw new RollbackException(new Status(IStatus.ERROR, SequenceDiagramPlugin.PLUGIN_ID, "Hide/Reveal is not supported in Sequence Diagrams"));
+ throw new RollbackException(new Status(IStatus.ERROR, SequenceDiagramUIPlugin.PLUGIN_ID, "Hide/Reveal is not supported in Sequence Diagrams"));
}
return null;
}
diff --git a/plugins/org.eclipse.sirius.diagram.sequence/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram.sequence/META-INF/MANIFEST.MF
index 10a8a28806..79197351e8 100644
--- a/plugins/org.eclipse.sirius.diagram.sequence/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram.sequence/META-INF/MANIFEST.MF
@@ -58,3 +58,4 @@ Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
org.eclipse.sirius.ext.emf;version="2.0.0"
+Bundle-Activator: org.eclipse.sirius.diagram.sequence.SequenceDiagramPlugin$Implementation
diff --git a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/SequenceDiagramPlugin.java b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/SequenceDiagramPlugin.java
new file mode 100644
index 0000000000..d745f6680c
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/SequenceDiagramPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.diagram.sequence;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.diagram.sequence</em>.
+ *
+ * @author pcdavid
+ */
+public class SequenceDiagramPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final SequenceDiagramPlugin INSTANCE = new SequenceDiagramPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public SequenceDiagramPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.diagram/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram/META-INF/MANIFEST.MF
index 23eb84e068..854174090b 100644
--- a/plugins/org.eclipse.sirius.diagram/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.diagram;singleton:=true
Bundle-Version: 3.1.0.qualifier
Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.sirius.diagram.DiagramPlugin
+Bundle-Activator: org.eclipse.sirius.diagram.DiagramPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: com.google.guava;bundle-version="[11.0.2,16.0)",
diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/DiagramPlugin.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/DiagramPlugin.java
index 3374fc5651..5eed0f251b 100644
--- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/DiagramPlugin.java
+++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/DiagramPlugin.java
@@ -11,10 +11,10 @@
package org.eclipse.sirius.diagram;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
import org.osgi.framework.BundleContext;
/**
@@ -22,143 +22,164 @@ import org.osgi.framework.BundleContext;
*
* @was-generated
*/
-public class DiagramPlugin extends Plugin {
+public class DiagramPlugin extends EMFPlugin {
/** The id. */
public static final String ID = "org.eclipse.sirius.diagram"; //$NON-NLS-1$
- /** The shared instance. */
- private static DiagramPlugin defaultPlugin;
-
/**
- * Creates a new plugin.
- *
- * @was-generated
+ * Keep track of the singleton.
*/
- public DiagramPlugin() {
- defaultPlugin = this;
- }
+ public static final DiagramPlugin INSTANCE = new DiagramPlugin();
/**
- * Returns the shared instance.
- *
- * @return the shared instance.
+ * Keep track of the singleton.
*/
- public static DiagramPlugin getDefault() {
- return DiagramPlugin.defaultPlugin;
- }
+ private static Implementation plugin;
/**
- * Returns string from plug-in's resource bundle.
+ * Creates a new plugin.
*
- * @param key
- * the property name
- * @return the corresponding property value
* @was-generated
*/
- public static String getString(String key) {
- return Platform.getResourceString(getDefault().getBundle(), "%" + key); //$NON-NLS-1$
+ public DiagramPlugin() {
+ super(new ResourceLocator[0]);
}
- /**
- * Logs an error.
- *
- * @param error
- * the error message.
- */
- public void logError(String error) {
- logError(error, null);
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
}
/**
- * Logs an error.
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @param error
- * the error message.
- * @param throwable
- * the throwable.
+ * @return the singleton instance.
*/
- public void logError(String error, Throwable throwable) {
- logMessage(error, throwable, IStatus.ERROR);
+ public static Implementation getPlugin() {
+ return plugin;
}
/**
- * Logs an info.
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @param message
- * the info message.
+ * @return the singleton instance.
*/
- public void logInfo(String message) {
- logInfo(message, null);
+ public static Implementation getDefault() {
+ return plugin;
}
/**
- * Logs an info.
- *
- * @param message
- * the info message.
- * @param throwable
- * the throwable.
+ * The actual implementation of the Eclipse <b>Plugin</b>.
*/
- public void logInfo(String message, Throwable throwable) {
- logMessage(message, throwable, IStatus.INFO);
- }
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
- /**
- * Logs a warning.
- *
- * @param message
- * the warning message.
- */
- public void logWarning(String message) {
- logWarning(message, null);
- }
+ /**
+ * Logs an error.
+ *
+ * @param error
+ * the error message.
+ */
+ public void logError(String error) {
+ logError(error, null);
+ }
- /**
- * Logs a warning.
- *
- * @param message
- * the warning message.
- * @param throwable
- * the throwable.
- */
- public void logWarning(String message, Throwable throwable) {
- logMessage(message, throwable, IStatus.WARNING);
- }
+ /**
+ * Logs an error.
+ *
+ * @param error
+ * the error message.
+ * @param throwable
+ * the throwable.
+ */
+ public void logError(String error, Throwable throwable) {
+ logMessage(error, throwable, IStatus.ERROR);
+ }
- private void logMessage(String message, Throwable throwable, int code) {
- String msg = message;
- if (message == null && throwable != null) {
- msg = throwable.getMessage();
+ /**
+ * Logs an info.
+ *
+ * @param message
+ * the info message.
+ */
+ public void logInfo(String message) {
+ logInfo(message, null);
}
- getLog().log(new Status(code, DiagramPlugin.ID, IStatus.OK, msg, throwable));
- debug(msg, throwable);
- }
+ /**
+ * Logs an info.
+ *
+ * @param message
+ * the info message.
+ * @param throwable
+ * the throwable.
+ */
+ public void logInfo(String message, Throwable throwable) {
+ logMessage(message, throwable, IStatus.INFO);
+ }
- /**
- * @was-generated
- */
- private void debug(String message, Throwable throwable) {
- if (!isDebugging()) {
- return;
+ /**
+ * Logs a warning.
+ *
+ * @param message
+ * the warning message.
+ */
+ public void logWarning(String message) {
+ logWarning(message, null);
}
- // CHECKSTYLE:OFF
- if (message != null) {
- System.err.println(message);
+
+ /**
+ * Logs a warning.
+ *
+ * @param message
+ * the warning message.
+ * @param throwable
+ * the throwable.
+ */
+ public void logWarning(String message, Throwable throwable) {
+ logMessage(message, throwable, IStatus.WARNING);
}
- if (throwable != null) {
- throwable.printStackTrace();
+
+ private void logMessage(String message, Throwable throwable, int code) {
+ String msg = message;
+ if (message == null && throwable != null) {
+ msg = throwable.getMessage();
+ }
+
+ getLog().log(new Status(code, DiagramPlugin.ID, IStatus.OK, msg, throwable));
+ debug(msg, throwable);
}
- // CHECKSTYLE:ON
- }
- @Override
- public void stop(BundleContext context) throws Exception {
- try {
- InstanceScope.INSTANCE.getNode(ID).flush();
- } finally {
- super.stop(context);
+ /**
+ * @was-generated
+ */
+ private void debug(String message, Throwable throwable) {
+ if (!isDebugging()) {
+ return;
+ }
+ // CHECKSTYLE:OFF
+ if (message != null) {
+ System.err.println(message);
+ }
+ if (throwable != null) {
+ throwable.printStackTrace();
+ }
+ // CHECKSTYLE:ON
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ try {
+ InstanceScope.INSTANCE.getNode(ID).flush();
+ } finally {
+ super.stop(context);
+ }
}
}
}
diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/preferences/DiagramPreferenceInitializer.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/preferences/DiagramPreferenceInitializer.java
index 3b3d53b32b..b096a2de2b 100644
--- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/preferences/DiagramPreferenceInitializer.java
+++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/internal/preferences/DiagramPreferenceInitializer.java
@@ -24,10 +24,6 @@ import org.eclipse.sirius.diagram.tools.internal.preferences.SiriusDiagramIntern
* @author mporhel
*/
public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /**
- * {@inheritDoc}
- */
@Override
public void initializeDefaultPreferences() {
final IEclipsePreferences diagramCoreDefaultPreferences = DefaultScope.INSTANCE.getNode(DiagramPlugin.ID);
@@ -44,7 +40,7 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer
}
private boolean getValue(final String key) {
- final String value = DiagramPlugin.getString(key);
+ final String value = DiagramPlugin.getPlugin().getString(key);
return Boolean.valueOf(value);
}
}
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index 2fc67550a1..02c35953bf 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -86,6 +86,144 @@
</li>
</ul>
<h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3>
+ <h4 id="Partialsupportforinternationalization">Partial support for internationalization</h4>
+ <p>Sirius 3.1 introduces partial support for internationalization: all literal strings from the runtime part of Sirius are now externalized and can be localized by third parties by providing the appropriate &#171;language packs&#187; as OSGi fragments. Note that this does not concern the VSM editor&#8217;s UI, the VSMs themselves, or the parts of the UI inherited from Eclipse/EMF/GEF/GMF and other libraries and frameworks used by Sirius.</p>
+ <p>Some API changes were required to enable this. While technically breaking changes if interpreting strictly the OSGi versioning rules, the major version number of the impacted bundles was not incremented as the changes only concern classes that should not impact the vast majority of users. Most breaking changes concern the plug-in/activator classes from each bundle. They are:</p>
+ <ul>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.diagram.layoutdata.LayoutDataPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>LayoutDataPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.diagram.sequence.SequenceDiagramPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>SequenceDiagramPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.common.xtext.internal.XtextIntegrationPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>XtextIntegrationPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.ext.base.BasePlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>BasePlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.ext.draw2d.Draw2DExtPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>Draw2DExtPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.ext.e3.ui.Eclipse3UIExtPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>Eclipse3UIExtPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.ext.emf.EMFExtPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>EMFExtPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.synchronizer.internal.SynchronizerPlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>SynchronizerPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.tree.tools.internal.TreePlugin</code>, a subclass of
+ <code>org.eclipse.emf.common.EMFPlugin</code> has been added. The corresponding OSGi bundle activator is the internal class
+ <code>TreePlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoMTLInterpreterIDEPlugin</code> is no longer an OSGi
+ <code>BundleActivator</code>, and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>AcceleoMTLInterpreterIDEPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoMTLInterpreterPlugin</code> is no longer an OSGi
+ <code>BundleActivator</code>, and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>AcceleoMTLInterpreterPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.common.ocl.DslOclPlugin</code> is no longer a
+ <code>org.eclipse.core.runtime.Plugin</code> (nor an OSGi
+ <code>BundleActivator</code>), and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>DslOclPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.common.tools.DslCommonPlugin</code> is no longer a
+ <code>org.eclipse.core.runtime.Plugin</code> (nor an OSGi
+ <code>BundleActivator</code>), and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>DslCommonPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.diagram.DiagramPlugin</code> is no longer a
+ <code>org.eclipse.core.runtime.Plugin</code> (nor an OSGi
+ <code>BundleActivator</code>), and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>DiagramPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.ecore.extender.business.internal.ExtenderPlugin</code> is no longer a
+ <code>org.eclipse.core.runtime.Plugin</code> (nor an OSGi
+ <code>BundleActivator</code>), and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>ExtenderPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Modified</span>
+ <code>org.eclipse.sirius.table.tools.internal.TablePlugin</code> is no longer a
+ <code>org.eclipse.core.runtime.Plugin</code> (nor an OSGi
+ <code>BundleActivator</code>), and instead extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>TablePlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Renamed, Modified</span>
+ <code>org.eclipse.sirius.eef.adapters.Activator</code> has been renamed into
+ <code>org.eclipse.sirius.eef.adapters.EEFAdapterPlugin</code> and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>EEFAdapterPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Renamed, Modified</span>
+ <code>org.eclipse.sirius.common.acceleo.interpreter.Activator</code> has been renamed into
+ <code>org.eclipse.sirius.common.acceleo.interpreter.InterpreterViewPlugin</code> and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>InterpreterViewPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Renamed, Modified</span>
+ <code>org.eclipse.sirius.table.ui.ext.Activator</code> has been renamed into
+ <code>org.eclipse.sirius.table.ui.ext.TableUIExtPlugin</code> and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>TableUIExtPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Renamed, Modified</span>
+ <code>org.eclipse.sirius.ui.ext.Activator</code> has been renamed into
+ <code>org.eclipse.sirius.ui.ext.SiriusUIExtPlugin</code> and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>SiriusUIExtPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Renamed, Modified</span>
+ <code>org.eclipse.sirius.tree.ui.ext.Activator</code> has been renamed into
+ <code>org.eclipse.sirius.tree.ui.ext.TreeUIExtPlugin</code> and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends
+ <code>org.eclipse.emf.common.EMFPlugin</code>. The actual bundle activator is the new internal class
+ <code>TreeUIExtPlugin.Implementation</code>.
+ </li>
+ <li><span class="label label-info">Renamed</span>
+ <code>org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramPlugin</code> has been renamed into
+ <code>org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramUIPlugin</code> for consistency and to avoid potential name clashes with the new
+ <code>org.eclipse.sirius.diagram.sequence.SequenceDiagramPlugin</code>.
+ </li>
+ </ul>
+ <p>Additional non-breaking changes:</p>
+ <ul>
+ <li><span class="label label-success">Added</span>
+ <code>org.eclipse.sirius.ext.base.I18N</code> has been added. It provides common utility code to support internationalization.
+ </li>
+ </ul>
<h4 id="Changesinorg.eclipse.sirius.ext.gef">Changes in
<code>org.eclipse.sirius.ext.gef</code>
</h4>
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index 3566b08612..c632d392bb 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -18,6 +18,37 @@ h3. Specifier-Visible Changes
h3. Developer-Visible Changes
+h4. Partial support for internationalization
+
+Sirius 3.1 introduces partial support for internationalization: all literal strings from the runtime part of Sirius are now externalized and can be localized by third parties by providing the appropriate "language packs" as OSGi fragments. Note that this does not concern the VSM editor's UI, the VSMs themselves, or the parts of the UI inherited from Eclipse/EMF/GEF/GMF and other libraries and frameworks used by Sirius.
+
+Some API changes were required to enable this. While technically breaking changes if interpreting strictly the OSGi versioning rules, the major version number of the impacted bundles was not incremented as the changes only concern classes that should not impact the vast majority of users. Most breaking changes concern the plug-in/activator classes from each bundle. They are:
+* <span class="label label-success">Added</span>@org.eclipse.sirius.diagram.layoutdata.LayoutDataPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @LayoutDataPlugin.Implementation@.
+* <span class="label label-success">Added</span>@org.eclipse.sirius.diagram.sequence.SequenceDiagramPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @SequenceDiagramPlugin.Implementation@.
+* <span class="label label-success">Added</span>@org.eclipse.sirius.common.xtext.internal.XtextIntegrationPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @XtextIntegrationPlugin.Implementation@.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.ext.base.BasePlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @BasePlugin.Implementation@.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.ext.draw2d.Draw2DExtPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @Draw2DExtPlugin.Implementation@.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.ext.e3.ui.Eclipse3UIExtPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @Eclipse3UIExtPlugin.Implementation@.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.ext.emf.EMFExtPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @EMFExtPlugin.Implementation@.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.synchronizer.internal.SynchronizerPlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @SynchronizerPlugin.Implementation@.
+* <span class="label label-success">Added</span> @org.eclipse.sirius.tree.tools.internal.TreePlugin@, a subclass of @org.eclipse.emf.common.EMFPlugin@ has been added. The corresponding OSGi bundle activator is the internal class @TreePlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoMTLInterpreterIDEPlugin@ is no longer an OSGi @BundleActivator@, and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @AcceleoMTLInterpreterIDEPlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoMTLInterpreterPlugin@ is no longer an OSGi @BundleActivator@, and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @AcceleoMTLInterpreterPlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.common.ocl.DslOclPlugin@ is no longer a @org.eclipse.core.runtime.Plugin@ (nor an OSGi @BundleActivator@), and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @DslOclPlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.common.tools.DslCommonPlugin@ is no longer a @org.eclipse.core.runtime.Plugin@ (nor an OSGi @BundleActivator@), and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @DslCommonPlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.diagram.DiagramPlugin@ is no longer a @org.eclipse.core.runtime.Plugin@ (nor an OSGi @BundleActivator@), and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @DiagramPlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.ecore.extender.business.internal.ExtenderPlugin@ is no longer a @org.eclipse.core.runtime.Plugin@ (nor an OSGi @BundleActivator@), and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @ExtenderPlugin.Implementation@.
+* <span class="label label-info">Modified</span> @org.eclipse.sirius.table.tools.internal.TablePlugin@ is no longer a @org.eclipse.core.runtime.Plugin@ (nor an OSGi @BundleActivator@), and instead extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @TablePlugin.Implementation@.
+* <span class="label label-info">Renamed, Modified</span> @org.eclipse.sirius.eef.adapters.Activator@ has been renamed into @org.eclipse.sirius.eef.adapters.EEFAdapterPlugin@ and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @EEFAdapterPlugin.Implementation@.
+* <span class="label label-info">Renamed, Modified</span> @org.eclipse.sirius.common.acceleo.interpreter.Activator@ has been renamed into @org.eclipse.sirius.common.acceleo.interpreter.InterpreterViewPlugin@ and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @InterpreterViewPlugin.Implementation@.
+* <span class="label label-info">Renamed, Modified</span> @org.eclipse.sirius.table.ui.ext.Activator@ has been renamed into @org.eclipse.sirius.table.ui.ext.TableUIExtPlugin@ and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @TableUIExtPlugin.Implementation@.
+* <span class="label label-info">Renamed, Modified</span> @org.eclipse.sirius.ui.ext.Activator@ has been renamed into @org.eclipse.sirius.ui.ext.SiriusUIExtPlugin@ and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @SiriusUIExtPlugin.Implementation@.
+* <span class="label label-info">Renamed, Modified</span> @org.eclipse.sirius.tree.ui.ext.Activator@ has been renamed into @org.eclipse.sirius.tree.ui.ext.TreeUIExtPlugin@ and is no longer an OSGi bundle activator (hence the name change, to avoid confusion). Instead it extends @org.eclipse.emf.common.EMFPlugin@. The actual bundle activator is the new internal class @TreeUIExtPlugin.Implementation@.
+* <span class="label label-info">Renamed</span> @org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramPlugin@ has been renamed into @org.eclipse.sirius.diagram.sequence.ui.SequenceDiagramUIPlugin@ for consistency and to avoid potential name clashes with the new @org.eclipse.sirius.diagram.sequence.SequenceDiagramPlugin@.
+
+Additional non-breaking changes:
+* <span class="label label-success">Added</span> @org.eclipse.sirius.ext.base.I18N@ has been added. It provides common utility code to support internationalization.
+
h4. Changes in @org.eclipse.sirius.ext.gef@
* <span class="label label-success">Added</span> The new class @org.eclipse.sirius.ext.gef.query.EditPartQuery@ has been added. It allows to retrieve all children of the current part.
diff --git a/plugins/org.eclipse.sirius.ecore.extender/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ecore.extender/META-INF/MANIFEST.MF
index 2c51a6ab3c..63a311a4f8 100644
--- a/plugins/org.eclipse.sirius.ecore.extender/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ecore.extender/META-INF/MANIFEST.MF
@@ -19,7 +19,7 @@ Export-Package: org.eclipse.sirius.ecore.extender.business.api.accessor;version=
org.eclipse.sirius.ecore.extender.business.internal.permission.descriptors;x-internal:=true;version="2.0.4",
org.eclipse.sirius.ecore.extender.tool.api;version="2.1.0",
org.eclipse.sirius.ecore.extender.tool.internal;x-internal:=true;version="2.0.4"
-Bundle-Activator: org.eclipse.sirius.ecore.extender.business.internal.ExtenderPlugin
+Bundle-Activator: org.eclipse.sirius.ecore.extender.business.internal.ExtenderPlugin$Implementation
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/ExtenderPlugin.java b/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/ExtenderPlugin.java
index f0cefb551b..6bb6df7e31 100644
--- a/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/ExtenderPlugin.java
+++ b/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/ExtenderPlugin.java
@@ -11,129 +11,140 @@
package org.eclipse.sirius.ecore.extender.business.internal;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
/**
* Extender plug-in.
*
* @author mchauvin
*/
-public class ExtenderPlugin extends Plugin {
+public class ExtenderPlugin extends EMFPlugin {
/** The id. */
public static final String ID = "org.eclipse.sirius.ecore.extender"; //$NON-NLS-1$
- private static ExtenderPlugin instance;
-
/**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+ * Keep track of the singleton.
*/
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- instance = this;
- }
+ public static final ExtenderPlugin INSTANCE = new ExtenderPlugin();
+
+ private static Implementation plugin;
/**
- * {@inheritDoc}
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ * Create the instance.
*/
- @Override
- public void stop(final BundleContext context) throws Exception {
- instance = null;
- super.stop(context);
+ public ExtenderPlugin() {
+ super(new ResourceLocator[0]);
}
- /**
- * Get the plugin instance.
- *
- * @return the plugin instance
- */
- public static ExtenderPlugin getInstance() {
- return instance;
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
}
/**
- * Log an error.
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @param error
- * the error message to log
+ * @return the singleton instance.
*/
- public void logError(final String error) {
- logError(error, null);
+ public static Implementation getPlugin() {
+ return plugin;
}
/**
- * Log an error.
- *
- * @param message
- * the error message to log
- * @param throwable
- * a low-level exception, or <code>null</code> if not applicable
+ * The actual implementation of the Eclipse <b>Plugin</b>.
*/
- public void logError(final String message, final Throwable throwable) {
- String err = message;
- if (message == null && throwable != null) {
- err = throwable.getMessage();
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
}
- getLog().log(new Status(IStatus.ERROR, ID, IStatus.OK, err, throwable));
- }
- /**
- * Log an info.
- *
- * @param message
- * the info message
- */
- public void logInfo(final String message) {
- logInfo(message, null);
- }
+ /**
+ * Log an error.
+ *
+ * @param error
+ * the error message to log
+ */
+ public void logError(final String error) {
+ logError(error, null);
+ }
- /**
- * Log an info.
- *
- * @param message
- * the info message
- * @param throwable
- * a low-level exception, or <code>null</code> if not applicable
- */
- public void logInfo(final String message, final Throwable throwable) {
- String info = message;
- if (message == null && throwable != null) {
- info = throwable.getMessage();
+ /**
+ * Log an error.
+ *
+ * @param message
+ * the error message to log
+ * @param throwable
+ * a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public void logError(final String message, final Throwable throwable) {
+ String err = message;
+ if (message == null && throwable != null) {
+ err = throwable.getMessage();
+ }
+ getLog().log(new Status(IStatus.ERROR, ID, IStatus.OK, err, throwable));
}
- getLog().log(new Status(IStatus.INFO, ID, IStatus.OK, info, throwable));
- }
- /**
- * Log a warning.
- *
- * @param message
- * the warning message.
- */
- public void logWarning(final String message) {
- logWarning(message, null);
- }
+ /**
+ * Log an info.
+ *
+ * @param message
+ * the info message
+ */
+ public void logInfo(final String message) {
+ logInfo(message, null);
+ }
- /**
- * Log a warning.
- *
- * @param message
- * the warning message.
- * @param throwable
- * a low-level exception, or <code>null</code> if not applicable
- */
- public void logWarning(final String message, final Throwable throwable) {
- String warning = message;
- if (message == null && throwable != null) {
- warning = throwable.getMessage();
+ /**
+ * Log an info.
+ *
+ * @param message
+ * the info message
+ * @param throwable
+ * a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public void logInfo(final String message, final Throwable throwable) {
+ String info = message;
+ if (message == null && throwable != null) {
+ info = throwable.getMessage();
+ }
+ getLog().log(new Status(IStatus.INFO, ID, IStatus.OK, info, throwable));
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param message
+ * the warning message.
+ */
+ public void logWarning(final String message) {
+ logWarning(message, null);
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param message
+ * the warning message.
+ * @param throwable
+ * a low-level exception, or <code>null</code> if not
+ * applicable
+ */
+ public void logWarning(final String message, final Throwable throwable) {
+ String warning = message;
+ if (message == null && throwable != null) {
+ warning = throwable.getMessage();
+ }
+ getLog().log(new Status(IStatus.WARNING, ID, IStatus.OK, warning, throwable));
}
- getLog().log(new Status(IStatus.WARNING, ID, IStatus.OK, warning, throwable));
+
}
}
diff --git a/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/common/ExtenderProviderDescriptor.java b/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/common/ExtenderProviderDescriptor.java
index cb13decee7..85fd902ae5 100644
--- a/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/common/ExtenderProviderDescriptor.java
+++ b/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/business/internal/common/ExtenderProviderDescriptor.java
@@ -46,7 +46,7 @@ public class ExtenderProviderDescriptor extends AbstractProviderDescriptor {
provider = (IExtenderProvider) element.createExecutableExtension("providerClass"); //$NON-NLS-1$
} catch (final CoreException e) {
/* log an error */
- ExtenderPlugin.getInstance().logError("An extender provider could not be loaded", e);
+ ExtenderPlugin.getPlugin().logError("An extender provider could not be loaded", e);
}
}
return provider;
diff --git a/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/tool/api/ModelUtils.java b/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/tool/api/ModelUtils.java
index 9b5a3e1634..af55919cb1 100644
--- a/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/tool/api/ModelUtils.java
+++ b/plugins/org.eclipse.sirius.ecore.extender/src/org/eclipse/sirius/ecore/extender/tool/api/ModelUtils.java
@@ -310,8 +310,8 @@ public final class ModelUtils {
try {
resource = resourceSet.getResource(resourceURI, true);
} catch (WrappedException e) {
- if (ExtenderPlugin.getInstance().isDebugging()) {
- ExtenderPlugin.getInstance().getLog().log(new Status(IStatus.WARNING, ExtenderPlugin.ID, e.getMessage(), e));
+ if (ExtenderPlugin.getPlugin().isDebugging()) {
+ ExtenderPlugin.getPlugin().getLog().log(new Status(IStatus.WARNING, ExtenderPlugin.ID, e.getMessage(), e));
}
// Warning: as getResource has been called with loadOnDemand to
// true, the resource is created with errors but is set on
diff --git a/plugins/org.eclipse.sirius.eef.adapters/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.eef.adapters/META-INF/MANIFEST.MF
index 17570659f3..9da0bf504f 100644
--- a/plugins/org.eclipse.sirius.eef.adapters/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.eef.adapters/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.eef.adapters;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.sirius.eef.adapters.Activator
+Bundle-Activator: org.eclipse.sirius.eef.adapters.EEFAdapterPlugin$Implementation
Require-Bundle: org.eclipse.ui;bundle-version="3.8.2",
org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.help;bundle-version="3.6.0",
diff --git a/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/Activator.java b/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/Activator.java
deleted file mode 100644
index 3a0b3e3b8e..0000000000
--- a/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/Activator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009-2012 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.sirius.eef.adapters;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- *
- * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
- */
-public class Activator extends AbstractUIPlugin {
-
- /**
- * The plug-in ID.
- */
- public static final String PLUGIN_ID = "org.eclipse.sirius.eef.adapters";
-
- /**
- * The shared instance.
- */
- private static Activator plugin;
-
- /**
- * {@inheritDoc}
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /**
- * {@inheritDoc}
- */
- 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/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/EEFAdapterPlugin.java b/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/EEFAdapterPlugin.java
new file mode 100644
index 0000000000..0c9f847401
--- /dev/null
+++ b/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/adapters/EEFAdapterPlugin.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2012 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.eef.adapters;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.eef.adapters</em>.
+ *
+ * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
+ */
+public class EEFAdapterPlugin extends EMFPlugin {
+
+ /**
+ * The plug-in ID.
+ */
+ public static final String PLUGIN_ID = "org.eclipse.sirius.eef.adapters";
+
+ /**
+ * Keep track of the singleton.
+ */
+ public static final EEFAdapterPlugin INSTANCE = new EEFAdapterPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+ /**
+ * Create the instance.
+ */
+ public EEFAdapterPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/section/SiriusFilteringSectionDescriptor.java b/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/section/SiriusFilteringSectionDescriptor.java
index 216b898332..9b9a8ad64f 100644
--- a/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/section/SiriusFilteringSectionDescriptor.java
+++ b/plugins/org.eclipse.sirius.eef.adapters/src/org/eclipse/sirius/eef/section/SiriusFilteringSectionDescriptor.java
@@ -4,7 +4,7 @@
* 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:
* Obeo - initial API and implementation
*******************************************************************************/
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.sirius.eef.adapters.Activator;
+import org.eclipse.sirius.eef.adapters.EEFAdapterPlugin;
import org.eclipse.ui.views.properties.tabbed.AbstractSectionDescriptor;
import org.eclipse.ui.views.properties.tabbed.ISection;
import org.eclipse.ui.views.properties.tabbed.ISectionDescriptor;
@@ -33,13 +33,13 @@ import org.eclipse.ui.views.properties.tabbed.ITabDescriptor;
* {@link org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyRegistry}
* when parameterized in a <code>sectionDescriptorProvider</code> attribute of a
* <code>propertyContributor</code> entry.
- *
+ *
* <p>
* This class is intended to be used with the <code></code> extension which
* allows to list several section identifiers that have to be hidden from the
* tabbed property sheet view.
* </p>
- *
+ *
* @author jbrazeau
*/
@SuppressWarnings("restriction")
@@ -53,20 +53,16 @@ public class SiriusFilteringSectionDescriptor implements ISectionDescriptorProvi
/** The section descriptors */
private ISectionDescriptor[] sectionDescriptors;
- /**
- * {@inheritDoc}
- */
+ @Override
public ISectionDescriptor[] getSectionDescriptors() {
return sectionDescriptors;
}
- /**
- * {@inheritDoc}
- */
+ @Override
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
propertyContributorId = config.getAttribute(SiriusFilteringSectionDescriptor.CONTRIBUTOR_ID);
if (propertyContributorId == null) {
- Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The section filter must be associated to a property contributor id"));
+ EEFAdapterPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, EEFAdapterPlugin.PLUGIN_ID, "The section filter must be associated to a property contributor id"));
} else {
// Filters loading
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.sirius.eef.adapters.sectionFilters");
@@ -101,7 +97,7 @@ public class SiriusFilteringSectionDescriptor implements ISectionDescriptorProvi
/**
* A section descriptor.
- *
+ *
* @author jbrazeau
*/
class SectionDescriptor extends AbstractSectionDescriptor {
@@ -129,7 +125,7 @@ class SectionDescriptor extends AbstractSectionDescriptor {
/**
* Default constructor.
- *
+ *
* @param cfgElement
* the configuration element.
*/
@@ -145,8 +141,9 @@ class SectionDescriptor extends AbstractSectionDescriptor {
if (cfgElement.getAttribute("enablesFor") != null) {
try {
enablesFor = Integer.parseInt(cfgElement.getAttribute("enablesFor"));
- if (enablesFor < 0)
+ if (enablesFor < 0) {
enablesFor = ISectionDescriptor.ENABLES_FOR_ANY;
+ }
} catch (NumberFormatException e) {
enablesFor = ISectionDescriptor.ENABLES_FOR_ANY;
}
@@ -156,69 +153,50 @@ class SectionDescriptor extends AbstractSectionDescriptor {
filter = (IFilter) cfgElement.createExecutableExtension("filter");
}
IConfigurationElement[] elements = cfgElement.getChildren("input");
- for (int i = 0; i < elements.length; i++) {
- IConfigurationElement element = elements[i];
+ for (IConfigurationElement element : elements) {
inputTypes.add(element.getAttribute("type"));
}
} catch (CoreException e) {
- Activator.getDefault().getLog().log(e.getStatus());
+ EEFAdapterPlugin.getPlugin().getLog().log(e.getStatus());
}
}
- /**
- * {@inheritDoc}
- */
+ @Override
public String getId() {
return id;
}
- /**
- * {@inheritDoc}
- */
@Override
public IFilter getFilter() {
return filter;
}
- /**
- * {@inheritDoc}
- */
@Override
public List<String> getInputTypes() {
return inputTypes;
}
- /**
- * {@inheritDoc}
- */
+ @Override
public ISection getSectionClass() {
ISection section = null;
try {
section = (ISection) configurationElement.createExecutableExtension("class");
} catch (CoreException exception) {
- Activator.getDefault().getLog().log(exception.getStatus());
+ EEFAdapterPlugin.getPlugin().getLog().log(exception.getStatus());
}
return section;
}
- /**
- * {@inheritDoc}
- */
+ @Override
public String getTargetTab() {
return targetTab;
}
- /**
- * {@inheritDoc}
- */
@Override
public int getEnablesFor() {
return enablesFor;
}
- /**
- * {@inheritDoc}
- */
@Override
public String getAfterSection() {
return afterSection;
diff --git a/plugins/org.eclipse.sirius.ext.base/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ext.base/META-INF/MANIFEST.MF
index bb50202787..7da04b7118 100644
--- a/plugins/org.eclipse.sirius.ext.base/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ext.base/META-INF/MANIFEST.MF
@@ -12,3 +12,6 @@ Export-Package: org.eclipse.sirius.ext.base;version="2.0.4",
org.eclipse.sirius.ext.base.cache;version="2.0.4",
org.eclipse.sirius.ext.base.collect;version="2.0.4",
org.eclipse.sirius.ext.base.relations;version="2.0.4"
+Bundle-Activator: org.eclipse.sirius.ext.base.BasePlugin$Implementation
+Require-Bundle: org.eclipse.emf.common;bundle-version="2.8.0"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.ext.base/build.properties b/plugins/org.eclipse.sirius.ext.base/build.properties
index ba784f20fd..8d9ae6399b 100644
--- a/plugins/org.eclipse.sirius.ext.base/build.properties
+++ b/plugins/org.eclipse.sirius.ext.base/build.properties
@@ -5,3 +5,4 @@ bin.includes = META-INF/,\
plugin.properties,\
about.html
javacProjectSettings = true
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/BasePlugin.java b/plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/BasePlugin.java
new file mode 100644
index 0000000000..2e7257f349
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/BasePlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.base;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.ext.base</em>.
+ *
+ * @author pcdavid
+ */
+public class BasePlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final BasePlugin INSTANCE = new BasePlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public BasePlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/I18N.java b/plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/I18N.java
new file mode 100644
index 0000000000..0dd69a7630
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.base/src/org/eclipse/sirius/ext/base/I18N.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.base;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+/**
+ * Helper class with bundle-independent code, that can be reused by other I18N
+ * classes local to each plug-in.
+ *
+ * @author pcdavid
+ */
+public final class I18N {
+ /**
+ * Used to mark a {@code public static String} field of a class as an
+ * externalized string, whose actual value will depend on the locale used at
+ * runtime. The optional value corresponds to the key in the
+ * {@code ResourceLocator}; if absent, the name of the field itself is used
+ * as key.
+ *
+ * @author pcdavid
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.FIELD)
+ public @interface TranslatableMessage {
+ /**
+ * The (optional) value of the message key. If absent, the key is
+ * assumed to be the same as the Java field's name.
+ */
+ String[] value() default {};
+ }
+
+ private I18N() {
+ // Prevent instantiation
+ }
+
+ /**
+ * Initializes the value of a class's {@code TranslatableMessage}s using the
+ * specified plugin as {@code ResourceLocator}.
+ *
+ * @param messagesClass
+ * the class which defines the fields to initialize.
+ * @param plugin
+ * the plugin from which to obtain the localized value of the
+ * fields.
+ */
+ public static void initializeMessages(final Class<?> messagesClass, final EMFPlugin plugin) {
+ if (System.getSecurityManager() == null) {
+ load(plugin, messagesClass);
+ return;
+ }
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ public Void run() {
+ load(plugin, messagesClass);
+ return null;
+ }
+ });
+ }
+
+ private static void load(EMFPlugin plugin, Class<?> messagesClass) {
+ for (Field field : messagesClass.getDeclaredFields()) {
+ if (isMessageField(field)) {
+ initialize(field, plugin);
+ }
+ }
+ }
+
+ private static boolean isMessageField(Field field) {
+ int mods = field.getModifiers();
+ boolean modsOK = Modifier.isPublic(mods) && Modifier.isStatic(mods) && !Modifier.isFinal(mods);
+ return modsOK && field.isAnnotationPresent(I18N.TranslatableMessage.class) && field.getType() == String.class;
+ }
+
+ private static void initialize(Field field, EMFPlugin plugin) {
+ String key = getKey(field);
+ String value = plugin.getString(key);
+ if (!field.isAccessible()) {
+ field.setAccessible(true);
+ }
+ try {
+ field.set(null, value);
+ } catch (IllegalArgumentException e) {
+ plugin.log(e);
+ } catch (IllegalAccessException e) {
+ plugin.log(e);
+ }
+ }
+
+ private static String getKey(Field field) {
+ I18N.TranslatableMessage annot = field.getAnnotation(I18N.TranslatableMessage.class);
+ String[] key = annot.value();
+ if (key == null || key.length == 0) {
+ key = new String[] { field.getName() };
+ }
+ return key[0];
+ }
+}
diff --git a/plugins/org.eclipse.sirius.ext.draw2d/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ext.draw2d/META-INF/MANIFEST.MF
index d2e3781407..4777f8fed6 100644
--- a/plugins/org.eclipse.sirius.ext.draw2d/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ext.draw2d/META-INF/MANIFEST.MF
@@ -15,4 +15,8 @@ Import-Package: org.eclipse.draw2d,
org.eclipse.draw2d.text,
org.eclipse.draw2d.widgets,
org.eclipse.swt.graphics
-Export-Package: org.eclipse.sirius.ext.draw2d.figure;version="2.0.4"
+Export-Package: org.eclipse.sirius.ext.draw2d;version="3.1.0",
+ org.eclipse.sirius.ext.draw2d.figure;version="2.0.4"
+Bundle-Activator: org.eclipse.sirius.ext.draw2d.Draw2DExtPlugin$Implementation
+Require-Bundle: org.eclipse.emf.common;bundle-version="2.8.0"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.ext.draw2d/build.properties b/plugins/org.eclipse.sirius.ext.draw2d/build.properties
index ba784f20fd..8d9ae6399b 100644
--- a/plugins/org.eclipse.sirius.ext.draw2d/build.properties
+++ b/plugins/org.eclipse.sirius.ext.draw2d/build.properties
@@ -5,3 +5,4 @@ bin.includes = META-INF/,\
plugin.properties,\
about.html
javacProjectSettings = true
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/Draw2DExtPlugin.java b/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/Draw2DExtPlugin.java
new file mode 100644
index 0000000000..f7c89a8bfc
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.draw2d/src/org/eclipse/sirius/ext/draw2d/Draw2DExtPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.draw2d;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.ext.draw2d</em>.
+ *
+ * @author pcdavid
+ */
+public class Draw2DExtPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final Draw2DExtPlugin INSTANCE = new Draw2DExtPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public Draw2DExtPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.ext.e3.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ext.e3.ui/META-INF/MANIFEST.MF
index f6e4a74037..c711163dfe 100644
--- a/plugins/org.eclipse.sirius.ext.e3.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ext.e3.ui/META-INF/MANIFEST.MF
@@ -7,7 +7,11 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Import-Package: com.ibm.icu.text;version="4.4.2.2"
-Export-Package: org.eclipse.sirius.ext.e3.ui.dialogs;version="3.0.0"
+Export-Package: org.eclipse.sirius.ext.e3.ui;version="3.1.0",
+ org.eclipse.sirius.ext.e3.ui.dialogs;version="3.0.0"
Require-Bundle: org.eclipse.swt;bundle-version="3.8.1",
org.eclipse.core.runtime;bundle-version="3.8.0",
- org.eclipse.ui;bundle-version="3.8.2"
+ org.eclipse.ui;bundle-version="3.8.2",
+ org.eclipse.emf.common;bundle-version="2.8.0"
+Bundle-Activator: org.eclipse.sirius.ext.e3.ui.Eclipse3UIExtPlugin$Implementation
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.ext.e3.ui/src/org/eclipse/sirius/ext/e3/ui/Eclipse3UIExtPlugin.java b/plugins/org.eclipse.sirius.ext.e3.ui/src/org/eclipse/sirius/ext/e3/ui/Eclipse3UIExtPlugin.java
new file mode 100644
index 0000000000..4cdcd6de63
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.e3.ui/src/org/eclipse/sirius/ext/e3/ui/Eclipse3UIExtPlugin.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.e3.ui;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.ext.e3.ui</em>.
+ *
+ * @author pcdavid
+ */
+public class Eclipse3UIExtPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final Eclipse3UIExtPlugin INSTANCE = new Eclipse3UIExtPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public Eclipse3UIExtPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sirius.ext.emf/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ext.emf/META-INF/MANIFEST.MF
index 6a8fc7de53..8a78fcb94a 100644
--- a/plugins/org.eclipse.sirius.ext.emf/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ext.emf/META-INF/MANIFEST.MF
@@ -13,3 +13,5 @@ Require-Bundle: com.google.guava;bundle-version="[11.0.2,16.0)",
org.eclipse.emf.ecore.xmi;bundle-version="2.8.0"
Export-Package: org.eclipse.sirius.ext.emf;version="2.0.4"
Bundle-Vendor: %providerName
+Bundle-Activator: org.eclipse.sirius.ext.emf.EMFExtPlugin$Implementation
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.ext.emf/build.properties b/plugins/org.eclipse.sirius.ext.emf/build.properties
index ba784f20fd..8d9ae6399b 100644
--- a/plugins/org.eclipse.sirius.ext.emf/build.properties
+++ b/plugins/org.eclipse.sirius.ext.emf/build.properties
@@ -5,3 +5,4 @@ bin.includes = META-INF/,\
plugin.properties,\
about.html
javacProjectSettings = true
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.ext.emf/src/org/eclipse/sirius/ext/emf/EMFExtPlugin.java b/plugins/org.eclipse.sirius.ext.emf/src/org/eclipse/sirius/ext/emf/EMFExtPlugin.java
new file mode 100644
index 0000000000..842103f648
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ext.emf/src/org/eclipse/sirius/ext/emf/EMFExtPlugin.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ext.emf;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.ext.emf</em>.
+ *
+ * @author pcdavid
+ */
+public class EMFExtPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final EMFExtPlugin INSTANCE = new EMFExtPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public EMFExtPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.interpreter/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.interpreter/META-INF/MANIFEST.MF
index 2676fd8e9b..0ae2d0aa14 100644
--- a/plugins/org.eclipse.sirius.interpreter/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.interpreter/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.sirius.interpreter;singleton:=true
Bundle-Version: 3.1.0.qualifier
-Bundle-Activator: org.eclipse.sirius.common.acceleo.interpreter.Activator
+Bundle-Activator: org.eclipse.sirius.common.acceleo.interpreter.InterpreterViewPlugin$Implementation
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.acceleo.ui.interpreter;bundle-version="3.4.1",
org.eclipse.sirius.common;bundle-version="2.0.0",
@@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.acceleo.ide.ui;bundle-version="3.4.1",
org.eclipse.jface;bundle-version="3.8.0",
org.eclipse.jface.text;bundle-version="3.8.2",
- org.eclipse.ui.editors;bundle-version="3.8.0"
+ org.eclipse.ui.editors;bundle-version="3.8.0",
+ org.eclipse.emf.common.ui;bundle-version="2.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/Activator.java b/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/Activator.java
deleted file mode 100644
index 85c98ab3ed..0000000000
--- a/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/Activator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 THALES GLOBAL SERVICES.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.sirius.common.acceleo.interpreter;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- *
- * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
- */
-public class Activator implements BundleActivator {
- /** The plug-in ID. */
- public static final String PLUGIN_ID = "org.eclipse.sirius.common.acceleo.interpreter"; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- // empty implementation
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext bundleContext) throws Exception {
- // empty implementation
- }
-}
diff --git a/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/InterpreterViewPlugin.java b/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/InterpreterViewPlugin.java
new file mode 100644
index 0000000000..d981bdfa35
--- /dev/null
+++ b/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/InterpreterViewPlugin.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2011 THALES GLOBAL SERVICES.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.common.acceleo.interpreter;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * The activator class controls the plug-in life cycle.
+ *
+ * @author <a href="mailto:laurent.goubet@obeo.fr">Laurent Goubet</a>
+ */
+public class InterpreterViewPlugin extends EMFPlugin {
+ /** The plug-in ID. */
+ public static final String PLUGIN_ID = "org.eclipse.sirius.common.acceleo.interpreter"; //$NON-NLS-1$
+
+ /**
+ * Keep track of the singleton.
+ */
+ public static final InterpreterViewPlugin INSTANCE = new InterpreterViewPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public InterpreterViewPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/SiriusEvaluationTask.java b/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/SiriusEvaluationTask.java
index 5572ab9ad1..32ba552d48 100644
--- a/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/SiriusEvaluationTask.java
+++ b/plugins/org.eclipse.sirius.interpreter/src/org/eclipse/sirius/common/acceleo/interpreter/SiriusEvaluationTask.java
@@ -58,7 +58,7 @@ public class SiriusEvaluationTask implements Callable<EvaluationResult> {
final String expression = context.getExpression();
if (context.getTargetEObjects().isEmpty()) {
- IStatus errorStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "No target for evaluation of " + expression);
+ IStatus errorStatus = new Status(IStatus.ERROR, InterpreterViewPlugin.PLUGIN_ID, "No target for evaluation of " + expression);
return new EvaluationResult(errorStatus);
}
@@ -90,7 +90,7 @@ public class SiriusEvaluationTask implements Callable<EvaluationResult> {
final IStatus status = createResultStatus(result);
evaluationResult = new EvaluationResult(result, status);
} catch (EvaluationException e) {
- final IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+ final IStatus status = new Status(IStatus.ERROR, InterpreterViewPlugin.PLUGIN_ID, e.getMessage(), e);
evaluationResult = new EvaluationResult(status);
}
@@ -110,7 +110,7 @@ public class SiriusEvaluationTask implements Callable<EvaluationResult> {
*/
private IStatus createResultStatus(Object result) {
if (result == null) {
- return new Status(IStatus.OK, Activator.PLUGIN_ID, ""); //$NON-NLS-1$
+ return new Status(IStatus.OK, InterpreterViewPlugin.PLUGIN_ID, ""); //$NON-NLS-1$
}
final String type = result.getClass().getSimpleName();
@@ -127,7 +127,7 @@ public class SiriusEvaluationTask implements Callable<EvaluationResult> {
message += " and size " + size;
}
- return new Status(IStatus.OK, Activator.PLUGIN_ID, message);
+ return new Status(IStatus.OK, InterpreterViewPlugin.PLUGIN_ID, message);
}
/**
diff --git a/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF
index e86ff03fc7..77972102b6 100644
--- a/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.synchronizer/META-INF/MANIFEST.MF
@@ -12,3 +12,5 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.8.3",
com.google.guava;bundle-version="[11.0.2,16.0)"
Import-Package: org.eclipse.core.runtime;version="3.4.0",
org.eclipse.sirius.ext.base;version="2.0.0"
+Bundle-Activator: org.eclipse.sirius.synchronizer.internal.SynchronizerPlugin$Implementation
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.sirius.synchronizer/build.properties b/plugins/org.eclipse.sirius.synchronizer/build.properties
index 801a5d0c65..156cb9f32c 100644
--- a/plugins/org.eclipse.sirius.synchronizer/build.properties
+++ b/plugins/org.eclipse.sirius.synchronizer/build.properties
@@ -16,3 +16,4 @@ bin.includes = META-INF/,\
about.html
javacDefaultEncoding.. = US-ASCII
javacProjectSettings = true
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/SynchronizerPlugin.java b/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/SynchronizerPlugin.java
new file mode 100644
index 0000000000..c0d2e1a4fb
--- /dev/null
+++ b/plugins/org.eclipse.sirius.synchronizer/src/org/eclipse/sirius/synchronizer/internal/SynchronizerPlugin.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.synchronizer.internal;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.synchronizer</em>.
+ *
+ * @author pcdavid
+ */
+public class SynchronizerPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final SynchronizerPlugin INSTANCE = new SynchronizerPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public SynchronizerPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.table.ui.ext/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.table.ui.ext/META-INF/MANIFEST.MF
index 154e1965dd..529276dd2d 100644
--- a/plugins/org.eclipse.sirius.table.ui.ext/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.table.ui.ext/META-INF/MANIFEST.MF
@@ -6,8 +6,9 @@ Bundle-Version: 3.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.sirius.table.ui;bundle-version="3.0.0",
- org.eclipse.osgi;bundle-version="0.0.0"
+ org.eclipse.osgi;bundle-version="0.0.0",
+ org.eclipse.emf.common.ui;bundle-version="2.7.0"
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.sirius.table.ui.ext.Activator
+Bundle-Activator: org.eclipse.sirius.table.ui.ext.TableUIExtPlugin$Implementation
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.sirius.table.ui.ext;version="3.0.0"
diff --git a/plugins/org.eclipse.sirius.table.ui.ext/build.properties b/plugins/org.eclipse.sirius.table.ui.ext/build.properties
index 7de753ad2f..4c0afd2fd3 100644
--- a/plugins/org.eclipse.sirius.table.ui.ext/build.properties
+++ b/plugins/org.eclipse.sirius.table.ui.ext/build.properties
@@ -7,4 +7,5 @@ bin.includes = META-INF/,\
about.html
javacProjectSettings = true
javacDefaultEncoding.. = US-ASCII
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/Activator.java b/plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/Activator.java
deleted file mode 100644
index abf4881bbb..0000000000
--- a/plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/Activator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.sirius.table.ui.ext;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see
- * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
- * )
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see
- * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/TableUIExtPlugin.java b/plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/TableUIExtPlugin.java
new file mode 100644
index 0000000000..4de4665834
--- /dev/null
+++ b/plugins/org.eclipse.sirius.table.ui.ext/src/org/eclipse/sirius/table/ui/ext/TableUIExtPlugin.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.table.ui.ext;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+public class TableUIExtPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final TableUIExtPlugin INSTANCE = new TableUIExtPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public TableUIExtPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.table.ui/src-gen/org/eclipse/sirius/table/metamodel/table/provider/TableUIPlugin.java b/plugins/org.eclipse.sirius.table.ui/src-gen/org/eclipse/sirius/table/metamodel/table/provider/TableUIPlugin.java
index bd482ec1d9..0f5b675e1d 100644
--- a/plugins/org.eclipse.sirius.table.ui/src-gen/org/eclipse/sirius/table/metamodel/table/provider/TableUIPlugin.java
+++ b/plugins/org.eclipse.sirius.table.ui/src-gen/org/eclipse/sirius/table/metamodel/table/provider/TableUIPlugin.java
@@ -122,10 +122,6 @@ public final class TableUIPlugin extends EMFPlugin {
* @generated
*/
public Implementation() {
- super();
-
- // Remember the static instance.
- //
TableUIPlugin.plugin = this;
}
diff --git a/plugins/org.eclipse.sirius.table/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.table/META-INF/MANIFEST.MF
index f958897e8e..baaeaecad4 100644
--- a/plugins/org.eclipse.sirius.table/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.table/META-INF/MANIFEST.MF
@@ -44,7 +44,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
com.google.guava;bundle-version="[11.0.2,16.0)"
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.sirius.table.tools.internal.TablePlugin
+Bundle-Activator: org.eclipse.sirius.table.tools.internal.TablePlugin$Implementation
Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
org.eclipse.sirius.ext.base.collect;version="2.0.0",
org.eclipse.sirius.ext.emf;version="2.0.0"
diff --git a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/TablePlugin.java b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/TablePlugin.java
index 244688f3e3..33604fbfc7 100644
--- a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/TablePlugin.java
+++ b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/TablePlugin.java
@@ -12,69 +12,82 @@ package org.eclipse.sirius.table.tools.internal;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
/**
* Table plug-in.
*
* @author mchauvin
*/
-public class TablePlugin extends Plugin {
+public class TablePlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final TablePlugin INSTANCE = new TablePlugin();
- /** The shared instance */
- private static TablePlugin plugin;
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
/**
- * {@inheritDoc}
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ * Create the instance.
*/
- @Override
- public void start(final BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
+ public TablePlugin() {
+ super(new ResourceLocator[0]);
}
/**
- * {@inheritDoc}
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ * @return the singleton instance.
*/
@Override
- public void stop(final BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
}
/**
- * Returns the shared instance.
+ * Returns the singleton instance of the Eclipse plugin.
*
- * @return the shared instance
+ * @return the singleton instance.
*/
- public static TablePlugin getDefault() {
+ public static Implementation getPlugin() {
return plugin;
}
/**
- * Logs an error in the error log.
- *
- * @param message
- * the message to log (optional).
- * @param e
- * the exception (optional).
+ * The actual implementation of the Eclipse <b>Plugin</b>.
*/
- public void error(final String message, final Exception e) {
- String msgToDisplay = message;
- if (message == null && e != null) {
- msgToDisplay = e.getMessage();
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
}
- if (e instanceof CoreException) {
- this.getLog().log(((CoreException) e).getStatus());
- } else {
- final IStatus status = new Status(IStatus.ERROR, this.getBundle().getSymbolicName(), msgToDisplay, e);
- this.getLog().log(status);
+
+ /**
+ * Logs an error in the error log.
+ *
+ * @param message
+ * the message to log (optional).
+ * @param e
+ * the exception (optional).
+ */
+ public void error(final String message, final Exception e) {
+ String msgToDisplay = message;
+ if (message == null && e != null) {
+ msgToDisplay = e.getMessage();
+ }
+ if (e instanceof CoreException) {
+ this.getLog().log(((CoreException) e).getStatus());
+ } else {
+ final IStatus status = new Status(IStatus.ERROR, this.getBundle().getSymbolicName(), msgToDisplay, e);
+ this.getLog().log(status);
+ }
}
}
diff --git a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/export/TableExportHelperImpl.java b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/export/TableExportHelperImpl.java
index 148f849814..948365969c 100644
--- a/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/export/TableExportHelperImpl.java
+++ b/plugins/org.eclipse.sirius.table/src/org/eclipse/sirius/table/tools/internal/export/TableExportHelperImpl.java
@@ -55,16 +55,16 @@ public final class TableExportHelperImpl implements TableExportHelper {
outputStream = new FileOutputStream(file);
outputStream.write(content.getBytes());
} catch (final FileNotFoundException exception) {
- TablePlugin.getDefault().error(EXCEPTION_ON_SAVE_CONTENT, exception);
+ TablePlugin.getPlugin().error(EXCEPTION_ON_SAVE_CONTENT, exception);
} catch (final IOException exception) {
- TablePlugin.getDefault().error(EXCEPTION_ON_SAVE_CONTENT, exception);
+ TablePlugin.getPlugin().error(EXCEPTION_ON_SAVE_CONTENT, exception);
} finally {
try {
if (outputStream != null) {
outputStream.close();
}
} catch (final IOException exception) {
- TablePlugin.getDefault().error(EXCEPTION_ON_SAVE_CONTENT, exception);
+ TablePlugin.getPlugin().error(EXCEPTION_ON_SAVE_CONTENT, exception);
}
}
}
diff --git a/plugins/org.eclipse.sirius.tree.ui.ext/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tree.ui.ext/META-INF/MANIFEST.MF
index d16d454e74..7199f4df56 100644
--- a/plugins/org.eclipse.sirius.tree.ui.ext/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.tree.ui.ext/META-INF/MANIFEST.MF
@@ -8,6 +8,6 @@ Bundle-Localization: plugin
Require-Bundle: org.eclipse.sirius.tree.ui;bundle-version="3.0.0",
org.eclipse.osgi;bundle-version="0.0.0"
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.sirius.tree.ui.ext.Activator
+Bundle-Activator: org.eclipse.sirius.tree.ui.ext.TreeUIExtPlugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.sirius.tree.ui.ext;version="3.0.0"
diff --git a/plugins/org.eclipse.sirius.tree.ui.ext/build.properties b/plugins/org.eclipse.sirius.tree.ui.ext/build.properties
index 3309c469fe..ff853084dc 100644
--- a/plugins/org.eclipse.sirius.tree.ui.ext/build.properties
+++ b/plugins/org.eclipse.sirius.tree.ui.ext/build.properties
@@ -7,4 +7,5 @@ bin.includes = META-INF/,\
about.html
javacProjectSettings = true
javacDefaultEncoding.. = US-ASCII
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/Activator.java b/plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/Activator.java
deleted file mode 100644
index 36dd57630a..0000000000
--- a/plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/Activator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.sirius.tree.ui.ext;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see
- * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
- * )
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see
- * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/TreeUIExtPlugin.java b/plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/TreeUIExtPlugin.java
new file mode 100644
index 0000000000..fe1548a2a2
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tree.ui.ext/src/org/eclipse/sirius/tree/ui/ext/TreeUIExtPlugin.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.tree.ui.ext;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.ext.base</em>.
+ *
+ * @author pcdavid
+ */
+public class TreeUIExtPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final TreeUIExtPlugin INSTANCE = new TreeUIExtPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public TreeUIExtPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tree/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tree/META-INF/MANIFEST.MF
index bd11653079..bad6b040ab 100644
--- a/plugins/org.eclipse.sirius.tree/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.tree/META-INF/MANIFEST.MF
@@ -29,6 +29,7 @@ Export-Package: org.eclipse.sirius.tree;version="3.0.0",
org.eclipse.sirius.tree.impl;version="3.0.0",
org.eclipse.sirius.tree.tools.api.interpreter;version="2.0.4",
org.eclipse.sirius.tree.tools.internal.command;x-internal:=true;version="3.0.0",
+ org.eclipse.sirius.tree.tools.internal;x-internal:=true;version="3.1.0",
org.eclipse.sirius.tree.util;version="3.0.0"
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.emf.ecore;bundle-version="2.8.3";visibility:=reexport,
@@ -42,3 +43,4 @@ Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.sirius.ext.base;version="2.0.0",
org.eclipse.sirius.ext.emf;version="2.0.0"
+Bundle-Activator: org.eclipse.sirius.tree.tools.internal.TreePlugin$Implementation
diff --git a/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/TreePlugin.java b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/TreePlugin.java
new file mode 100644
index 0000000000..d59dc272ed
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tree/src/org/eclipse/sirius/tree/tools/internal/TreePlugin.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.tree.tools.internal;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.tree</em>.
+ *
+ * @author pcdavid
+ */
+public final class TreePlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final TreePlugin INSTANCE = new TreePlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public TreePlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.ui.ext/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.ui.ext/META-INF/MANIFEST.MF
index 5f3a3c4a5d..251d2296d9 100644
--- a/plugins/org.eclipse.sirius.ui.ext/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.ui.ext/META-INF/MANIFEST.MF
@@ -7,8 +7,9 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.sirius.ui;bundle-version="3.0.0",
org.eclipse.osgi;bundle-version="0.0.0",
- org.eclipse.ui.editors;bundle-version="3.8.0"
+ org.eclipse.ui.editors;bundle-version="3.8.0",
+ org.eclipse.emf.common.ui;bundle-version="2.7.0"
Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.sirius.ui.ext.Activator
+Bundle-Activator: org.eclipse.sirius.ui.ext.SiriusUIExtPlugin$Implementation
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.eclipse.sirius.ui.ext;version="3.0.0"
diff --git a/plugins/org.eclipse.sirius.ui.ext/build.properties b/plugins/org.eclipse.sirius.ui.ext/build.properties
index 7de753ad2f..4c0afd2fd3 100644
--- a/plugins/org.eclipse.sirius.ui.ext/build.properties
+++ b/plugins/org.eclipse.sirius.ui.ext/build.properties
@@ -7,4 +7,5 @@ bin.includes = META-INF/,\
about.html
javacProjectSettings = true
javacDefaultEncoding.. = US-ASCII
+additional.bundles = org.eclipse.core.runtime
diff --git a/plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/Activator.java b/plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/Activator.java
deleted file mode 100644
index e8be113484..0000000000
--- a/plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/Activator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.eclipse.sirius.ui.ext;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see
- * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
- * )
- */
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- /*
- * (non-Javadoc)
- * @see
- * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- @Override
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/SiriusUIExtPlugin.java b/plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/SiriusUIExtPlugin.java
new file mode 100644
index 0000000000..d96902c911
--- /dev/null
+++ b/plugins/org.eclipse.sirius.ui.ext/src/org/eclipse/sirius/ui/ext/SiriusUIExtPlugin.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.ui.ext;
+
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * Plug-in class for <em>org.eclipse.sirius.ui.ext</em>.
+ *
+ * @author pcdavid
+ */
+public class SiriusUIExtPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final SiriusUIExtPlugin INSTANCE = new SiriusUIExtPlugin();
+
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ */
+ public SiriusUIExtPlugin() {
+ super(new ResourceLocator[0]);
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.ui/src-gen/org/eclipse/sirius/viewpoint/provider/SiriusEditPlugin.java b/plugins/org.eclipse.sirius.ui/src-gen/org/eclipse/sirius/viewpoint/provider/SiriusEditPlugin.java
index b861672376..b69bccde59 100644
--- a/plugins/org.eclipse.sirius.ui/src-gen/org/eclipse/sirius/viewpoint/provider/SiriusEditPlugin.java
+++ b/plugins/org.eclipse.sirius.ui/src-gen/org/eclipse/sirius/viewpoint/provider/SiriusEditPlugin.java
@@ -171,10 +171,6 @@ public final class SiriusEditPlugin extends EMFPlugin {
* @generated
*/
public Implementation() {
- super();
-
- // Remember the static instance.
- //
SiriusEditPlugin.plugin = this;
}

Back to the top