Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-05-15 07:20:57 -0400
committervlorenzo2013-05-15 07:20:57 -0400
commit2e4878b94204eef402dea1a9db172c3b811b5833 (patch)
tree0d5578f8ecc49554dcf365a9dd2121294e6f8845 /sandbox
parent5c9e8334fe7d7d78ef4014e874eb01862ac3033a (diff)
downloadorg.eclipse.papyrus-2e4878b94204eef402dea1a9db172c3b811b5833.tar.gz
org.eclipse.papyrus-2e4878b94204eef402dea1a9db172c3b811b5833.tar.xz
org.eclipse.papyrus-2e4878b94204eef402dea1a9db172c3b811b5833.zip
408089: [Table 2] Papyrus must provides a table for SysML Allocate
https://bugs.eclipse.org/bugs/show_bug.cgi?id=408089
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath7
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.project28
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF24
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html28
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties11
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.gifbin0 -> 898 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.pngbin0 -> 1261 bytes
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml45
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration31
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java68
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java56
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java21
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties3
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java35
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java53
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.classpath7
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.project28
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF14
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/about.html28
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/build.properties9
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml97
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java50
26 files changed, 663 insertions, 0 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath
new file mode 100644
index 00000000000..8a8f1668cdc
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.project b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.project
new file mode 100644
index 00000000000..2952f2f0fd5
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.allocation.config</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..f287d53cf45
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..005caf6823f
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.allocation.config;singleton:=true
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.allocation.config.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.0",
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.sysml;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="0.10.0",
+ org.eclipse.papyrus.sysml.nattable.menu;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
+ org.eclipse.papyrus.uml.nattable.menu;bundle-version="0.10.0",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="0.10.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="0.10.0",
+ org.eclipse.nebula.widgets.nattable.core,
+ org.eclipse.core.expressions
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..c2d71593bc5
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.allocation.config
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML Allocation Table Configuration (Incubation) \ No newline at end of file
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html
new file mode 100644
index 00000000000..598b3684879
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties
new file mode 100644
index 00000000000..bc8ea3707a0
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ build.properties,\
+ icons/,\
+ resources/,\
+ about.html,\
+ OSGI-INF/
+src.includes = about.html
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.gif b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.gif
new file mode 100644
index 00000000000..6d9e22c5df6
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.gif
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png
new file mode 100644
index 00000000000..761ea002323
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.png
Binary files differ
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
new file mode 100644
index 00000000000..9fd55c981be
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/plugin.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.tester">
+ <tester
+ class="org.eclipse.papyrus.sysml.nattable.allocation.config.tester.TableAllocationCreationTester"
+ id="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtablecreationtester">
+ </tester>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.configuration">
+ <configuration
+ file="resources/allocation.nattableconfiguration">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.sysml.nattable.allocation.config.handler.CreateAllocateHandler"
+ commandId="org.eclipse.papyrus.sysml.service.types.AllocateCreateCommand">
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtable.propertyTester.isAllocationTable"
+ value="true">
+ </test>
+ </with>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.sysml.nattable.allocation.config.tester.AllocationPropertyTester"
+ id="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtable.propertyTester"
+ namespace="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtable.propertyTester"
+ properties="isAllocationTable"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ </extension>
+
+</plugin>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
new file mode 100644
index 00000000000..932fd8f0929
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/resources/allocation.nattableconfiguration
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="This table is used to display SysML Allocation" name="AllocationTable" type="PapyrusSysMLAllocationTable" iconPath="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.gif" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.sysml.nattable.allocation.config.allocationtablecreationtester"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/4.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.allocate.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.feature.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.uml.nattable.stereotype.property.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.feature.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:SlaveObjectAxisProvider" description="This provider provides the default columns for the SysML Allocation Table" name="SysMLAllocationFeatureProvider">
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/client"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Dependency/supplier"/>
+ </axis>
+ <axis xsi:type="nattableaxis:EStructuralFeatureAxis" manager="//@columnHeaderAxisConfiguration/@axisManagers.0">
+ <element xsi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element/owner"/>
+ </axis>
+ </columnAxisProviders>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" description="This row providers allows to display all Allocation in a Table" name="SysMLAllocationProvider" disconnectSlave="true"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java
new file mode 100644
index 00000000000..5138a0ef4e7
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/Activator.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.config;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.nattable.allocation.config"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java
new file mode 100644
index 00000000000..46b42f09628
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/handler/CreateAllocateHandler.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.config.handler;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.sysml.nattable.menu.handlers.AllocateHandler;
+import org.eclipse.papyrus.uml.nattable.menu.util.TableMenuUtils;
+
+/**
+ * This handler allows to create an Allocate object, only if the table is a PapyrusSysMLAllocationTable
+ *
+ * @author vl222926
+ *
+ */
+public class CreateAllocateHandler extends AllocateHandler {
+
+ /**
+ * the id used for the Papyrus SysML Allocation Table
+ */
+ public static final String TABLE_ALLOCATION_TYPE = "PapyrusSysMLAllocationTable"; //$NON-NLS-1$
+
+ /**
+ *
+ * @see org.eclipse.papyrus.sysml.nattable.menu.handlers.AbstractSysmlNattableCreateCommandHandler#setEnabled(java.lang.Object)
+ *
+ * @param evaluationContext
+ */
+ @Override
+ public void setEnabled(Object evaluationContext) {
+ Command command = getCommand();
+ boolean isEnabled = command.canExecute();
+ INattableModelManager tableManager = TableMenuUtils.getTableManager(getActiveWorkbenchPart());
+ isEnabled = isEnabled && tableManager.getTable().getTableConfiguration().getType().equals(TABLE_ALLOCATION_TYPE);
+ if(isEnabled) {
+ IElementType newElementType = getElementTypeToCreate();
+ String id = newElementType.getId();
+ isEnabled = tableManager.canCreateRowElement(id);
+ }
+ setBaseEnabled(isEnabled);
+
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java
new file mode 100644
index 00000000000..6ed417c2730
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/Messages.java
@@ -0,0 +1,21 @@
+package org.eclipse.papyrus.sysml.nattable.allocation.config.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.sysml.nattable.allocation.config.messages.messages"; //$NON-NLS-1$
+
+ public static String TableAllocationCreationTester_NotAnUMLElement;
+
+ public static String TableAllocationCreationTester_OKMessage;
+
+ public static String TableAllocationCreationTester_ProfileNotApplied;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties
new file mode 100644
index 00000000000..45f52336124
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/messages/messages.properties
@@ -0,0 +1,3 @@
+TableAllocationCreationTester_NotAnUMLElement=The context is not an UML Element
+TableAllocationCreationTester_OKMessage=The context allows to create an Allocation Table
+TableAllocationCreationTester_ProfileNotApplied=The profile {0} is not applied on the model
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java
new file mode 100644
index 00000000000..69b8c6d62f4
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/AllocationPropertyTester.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.config.tester;
+
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.utils.NattableWidgetPropertyTester;
+import org.eclipse.papyrus.sysml.nattable.allocation.config.handler.CreateAllocateHandler;
+
+
+public class AllocationPropertyTester extends NattableWidgetPropertyTester {
+
+ private static final String IS_ALLOCATION_TABLE = "isAllocationTable"; //$NON-NLS-1$
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ final INattableModelManager manager = getNattableModelManager();
+ if(manager != null) {
+ if(IS_ALLOCATION_TABLE.equals(property) && expectedValue instanceof Boolean) {
+ return expectedValue.equals(manager.getTable().getTableConfiguration().getType().equals(CreateAllocateHandler.TABLE_ALLOCATION_TYPE));
+ }
+ }
+ return false;
+ }
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java
new file mode 100644
index 00000000000..40e816f2bcc
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation.config/src/org/eclipse/papyrus/sysml/nattable/allocation/config/tester/TableAllocationCreationTester.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.allocation.config.tester;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.papyrus.infra.nattable.tester.ITableTester;
+import org.eclipse.papyrus.sysml.allocations.AllocationsPackage;
+import org.eclipse.papyrus.sysml.nattable.allocation.config.Activator;
+import org.eclipse.papyrus.sysml.nattable.allocation.config.messages.Messages;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class TableAllocationCreationTester implements ITableTester {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.tester.ITableTester#isAllowed(java.lang.Object)
+ *
+ * @param context
+ * @return
+ */
+ public IStatus isAllowed(Object context) {
+ if(context instanceof Element) {
+ Element el = (Element)context;
+ boolean result = context instanceof Package;
+ if(result) {
+ //doesn't work!
+ final String packageQN = UMLUtil.getProfile(AllocationsPackage.eINSTANCE, el).getQualifiedName();
+ result = result && el.getNearestPackage().getAppliedProfile(packageQN, true) != null;
+ if(result) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.TableAllocationCreationTester_OKMessage);
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, String.format(Messages.TableAllocationCreationTester_ProfileNotApplied, packageQN));
+ }
+ }
+ }
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TableAllocationCreationTester_NotAnUMLElement);
+ }
+
+}
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.classpath b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.classpath
new file mode 100644
index 00000000000..8a8f1668cdc
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.project b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.project
new file mode 100644
index 00000000000..090ef2018bf
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.allocation</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..f287d53cf45
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..aae971dcd61
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.allocation;singleton:=true
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.allocation.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.sysml.nattable.allocation.config;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..94b8cf21347
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.allocation
+Bundle-Vendor = Eclipse Modeling Language
+Bundle-Name = SysML Allocation Table (Incubation) \ No newline at end of file
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/about.html b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/about.html
new file mode 100644
index 00000000000..598b3684879
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/build.properties b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/build.properties
new file mode 100644
index 00000000000..7bc4b567268
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ OSGI-INF/,\
+ build.properties
+src.includes = about.html
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
new file mode 100644
index 00000000000..78ba568260e
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/plugin.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ categoryId="org.eclipse.papyrus.editor.category"
+ description="Create a SysML Allocation NatTable Editor"
+ id="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ name="Create a new Allocation Table">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commandImages">
+ <image
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ icon="platform:/plugin/org.eclipse.papyrus.sysml.nattable.allocation.config/icons/table_SysML_Allocation.gif">
+ </image>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command">
+ <activeWhen>
+ <or>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </or>
+ </activeWhen>
+ <class
+ class="org.eclipse.papyrus.infra.nattable.common.handlers.CreateNatTableEditorHandler">
+ <parameter
+ name="tableType"
+ value="PapyrusSysMLAllocationTable">
+ </parameter>
+ </class>
+ </handler>
+ </extension>
+ <extension
+ id="create.table.menus"
+ name="Create Table Menus"
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.infra.nattable.popupmenu.createnattable">
+ <command
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ style="push">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="menu:org.eclipse.papyrus.infra.nattable.menu.createnattable">
+ <command
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ style="push">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.papyrus.infra.nattable.toolbar.createnattable">
+ <command
+ commandId="org.eclipse.papyrus.sysml.nattable.allocation.create.command"
+ style="push">
+ <visibleWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+
+</plugin>
diff --git a/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java
new file mode 100644
index 00000000000..e7ff72a44a8
--- /dev/null
+++ b/sandbox/TableV3/org.eclipse.papyrus.sysml.nattable.allocation/src/org/eclipse/papyrus/sysml/nattable/allocation/Activator.java
@@ -0,0 +1,50 @@
+package org.eclipse.papyrus.sysml.nattable.allocation;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.nattable.allocation"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}

Back to the top