Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display')
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration2
-rwxr-xr-x[-rw-r--r--]plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotypeDisplay.configuration3
-rw-r--r--plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/plugin.xml7
-rwxr-xr-xplugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/tester/IsViewFromUMLElement.java47
4 files changed, 57 insertions, 2 deletions
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration
index 8b4a447df88..396f94edebb 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotype.nattableconfiguration
@@ -6,7 +6,7 @@
<intListValue>2</intListValue>
<intListValue>3</intListValue>
</styles>
- <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.uml.nattable.tester.isumlelement"/>
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.uml.nattable.stereotype.display.tester"/>
<rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC" displayIndex="false">
<styles xsi:type="nattablestyle:IntValueStyle" name="rowLabelWidth" intValue="250"/>
<ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayIcon="false" displayIsDerived="false" displayType="false" displayMultiplicity="false"/>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotypeDisplay.configuration b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotypeDisplay.configuration
index 59d362a9595..f4d6614c16a 100644..100755
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotypeDisplay.configuration
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/config/stereotypeDisplay.configuration
@@ -4,6 +4,7 @@
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration"
+ xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation"
xmi:id="_KIq-4P4UEeSRsNBVzfUrzA">
<viewpoints
xsi:type="configuration:PapyrusViewpoint"
@@ -18,7 +19,7 @@
<modelRules
xmi:id="_7k79wP4VEeSRsNBVzfUrzA">
<element
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Element"/>
+ href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//View"/>
</modelRules>
<owningRules
xmi:id="_AJmbwP4WEeSRsNBVzfUrzA">
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/plugin.xml b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/plugin.xml
index 1a2dccc39e3..39b1ac35e96 100644
--- a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/plugin.xml
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/plugin.xml
@@ -80,5 +80,12 @@
</labelProviderContext>
</labelProvider>
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.tester">
+ <tester
+ class="org.eclipse.papyrus.uml.nattable.stereotype.display.tester.IsViewFromUMLElement"
+ id="org.eclipse.papyrus.uml.nattable.stereotype.display.tester">
+ </tester>
+ </extension>
</plugin>
diff --git a/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/tester/IsViewFromUMLElement.java b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/tester/IsViewFromUMLElement.java
new file mode 100755
index 00000000000..47902c7c5a9
--- /dev/null
+++ b/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.stereotype.display/src/org/eclipse/papyrus/uml/nattable/stereotype/display/tester/IsViewFromUMLElement.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.nattable.stereotype.display.tester;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.nattable.Activator;
+import org.eclipse.papyrus.uml.nattable.tester.IsUMLElementTester;
+
+/**
+ * @author VL222926
+ *
+ */
+public class IsViewFromUMLElement extends IsUMLElementTester {
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.nattable.tester.ITableTester#isAllowed(java.lang.Object)
+ *
+ * @param context
+ * @return
+ */
+ @Override
+ public IStatus isAllowed(Object context) {
+ if (context instanceof View) {
+ EObject element = ((View) context).getElement();
+ IStatus res = super.isAllowed(element);
+ if (res.isOK()) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, "The context is a GMF View representing a UML Element"); //$NON-NLS-1$
+ }
+ }
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "The context is not an GMF View representing a UML Element"); //$NON-NLS-1$
+ }
+}

Back to the top