Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/others/org.eclipse.papyrus.example.diagram.simplediagram/src-gen/org/eclipse/papyrus/example/diagram/simplediagram/part/UMLMatchingStrategy.java')
-rw-r--r--examples/others/org.eclipse.papyrus.example.diagram.simplediagram/src-gen/org/eclipse/papyrus/example/diagram/simplediagram/part/UMLMatchingStrategy.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/examples/others/org.eclipse.papyrus.example.diagram.simplediagram/src-gen/org/eclipse/papyrus/example/diagram/simplediagram/part/UMLMatchingStrategy.java b/examples/others/org.eclipse.papyrus.example.diagram.simplediagram/src-gen/org/eclipse/papyrus/example/diagram/simplediagram/part/UMLMatchingStrategy.java
new file mode 100644
index 00000000000..206e129aeb9
--- /dev/null
+++ b/examples/others/org.eclipse.papyrus.example.diagram.simplediagram/src-gen/org/eclipse/papyrus/example/diagram/simplediagram/part/UMLMatchingStrategy.java
@@ -0,0 +1,36 @@
+package org.eclipse.papyrus.example.diagram.simplediagram.part;
+
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorMatchingStrategy;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * @generated
+ */
+public class UMLMatchingStrategy implements IEditorMatchingStrategy {
+
+ /**
+ * @generated
+ */
+ public boolean matches(IEditorReference editorRef, IEditorInput input) {
+ IEditorInput editorInput;
+ try {
+ editorInput = editorRef.getEditorInput();
+ } catch (PartInitException e) {
+ return false;
+ }
+
+ if (editorInput.equals(input)) {
+ return true;
+ }
+ if (editorInput instanceof URIEditorInput
+ && input instanceof URIEditorInput) {
+ return ((URIEditorInput) editorInput).getURI().equals(
+ ((URIEditorInput) input).getURI());
+ }
+ return false;
+ }
+
+}

Back to the top