Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.diagram.sequence/src/org/eclipse/papyrus/diagram/sequence/part/UMLShortcutPropertyTester.java')
-rw-r--r--extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.diagram.sequence/src/org/eclipse/papyrus/diagram/sequence/part/UMLShortcutPropertyTester.java39
1 files changed, 39 insertions, 0 deletions
diff --git a/extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.diagram.sequence/src/org/eclipse/papyrus/diagram/sequence/part/UMLShortcutPropertyTester.java b/extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.diagram.sequence/src/org/eclipse/papyrus/diagram/sequence/part/UMLShortcutPropertyTester.java
new file mode 100644
index 00000000000..e37113bfa5b
--- /dev/null
+++ b/extraplugins/deprecated-plugins/uml.deprecated/org.eclipse.papyrus.diagram.sequence/src/org/eclipse/papyrus/diagram/sequence/part/UMLShortcutPropertyTester.java
@@ -0,0 +1,39 @@
+package org.eclipse.papyrus.diagram.sequence.part;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gmf.runtime.notation.View;
+
+import org.eclipse.papyrus.diagram.sequence.edit.parts.PackageEditPart;
+
+/**
+ * @generated
+ */
+
+public class UMLShortcutPropertyTester extends PropertyTester {
+
+ /**
+ * @generated
+ */
+ protected static final String SHORTCUT_PROPERTY = "isShortcut"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public boolean test(Object receiver, String method, Object[] args,
+ Object expectedValue) {
+ if (false == receiver instanceof View) {
+ return false;
+ }
+ View view = (View) receiver;
+ if (SHORTCUT_PROPERTY.equals(method)) {
+ EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+ if (annotation != null) {
+ return PackageEditPart.MODEL_ID.equals(annotation.getDetails()
+ .get("modelID")); //$NON-NLS-1$
+ }
+ }
+ return false;
+ }
+
+}

Back to the top