Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.emf.refactor.metrics.generator/bin/.gitignore1
-rw-r--r--org.eclipse.emf.refactor.metrics.henshin/bin/org/eclipse/emf/refactor/metrics/henshin/managers/HenshinManager.classbin3832 -> 3866 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/bin/.gitignore1
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.classbin2259 -> 2147 bytes
-rw-r--r--org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.java24
6 files changed, 16 insertions, 12 deletions
diff --git a/org.eclipse.emf.refactor.metrics.generator/bin/.gitignore b/org.eclipse.emf.refactor.metrics.generator/bin/.gitignore
deleted file mode 100644
index 571ee51..0000000
--- a/org.eclipse.emf.refactor.metrics.generator/bin/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/org
diff --git a/org.eclipse.emf.refactor.metrics.henshin/bin/org/eclipse/emf/refactor/metrics/henshin/managers/HenshinManager.class b/org.eclipse.emf.refactor.metrics.henshin/bin/org/eclipse/emf/refactor/metrics/henshin/managers/HenshinManager.class
index fc2f235..089bb90 100644
--- a/org.eclipse.emf.refactor.metrics.henshin/bin/org/eclipse/emf/refactor/metrics/henshin/managers/HenshinManager.class
+++ b/org.eclipse.emf.refactor.metrics.henshin/bin/org/eclipse/emf/refactor/metrics/henshin/managers/HenshinManager.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/META-INF/MANIFEST.MF b/org.eclipse.emf.refactor.metrics.papyrus/META-INF/MANIFEST.MF
index d224671..086503a 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/META-INF/MANIFEST.MF
+++ b/org.eclipse.emf.refactor.metrics.papyrus/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.refactor.metrics.runtime;bundle-version="0.7.0",
org.eclipse.emf.refactor.metrics.generator;bundle-version="0.7.0",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.6.0",
- org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.2.1"
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.ui
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/bin/.gitignore b/org.eclipse.emf.refactor.metrics.papyrus/bin/.gitignore
new file mode 100644
index 0000000..cf1db2e
--- /dev/null
+++ b/org.eclipse.emf.refactor.metrics.papyrus/bin/.gitignore
@@ -0,0 +1 @@
+/org/
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.class b/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.class
index 0c9f4ab..daf3d12 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.class
+++ b/org.eclipse.emf.refactor.metrics.papyrus/bin/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.class
Binary files differ
diff --git a/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.java b/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.java
index 2b56de3..994c2a9 100644
--- a/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.java
+++ b/org.eclipse.emf.refactor.metrics.papyrus/src/org/eclipse/emf/refactor/metrics/papyrus/managers/PapyrusSelectionManager.java
@@ -3,12 +3,13 @@ package org.eclipse.emf.refactor.metrics.papyrus.managers;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ModelElementItem;
+//import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ModelElementItem;
import org.eclipse.emf.refactor.metrics.managers.SelectionManager;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-@SuppressWarnings("restriction")
+//@SuppressWarnings("restriction")
public class PapyrusSelectionManager extends SelectionManager {
public static List<EObject> getESelection(ISelection selection) {
@@ -16,21 +17,24 @@ public class PapyrusSelectionManager extends SelectionManager {
return null;
List<EObject> r = SelectionManager.getESelection(selection);
for (Object o : getSelection(selection)) {
- if (o instanceof ModelElementItem) {
- System.out.println("instanceof ModelElementItem");
- ModelElementItem mei = (ModelElementItem) o;
- System.out.println("element: " + mei.getEObject());
- r.add(mei.getEObject());
- } else {
+// if (o instanceof ModelElementItem) {
+// System.out.println("instanceof ModelElementItem");
+// ModelElementItem mei = (ModelElementItem) o;
+// System.out.println("element: " + mei.getEObject());
+// r.add(mei.getEObject());
+// } else {
if (o instanceof IGraphicalEditPart) {
System.out.println("instanceof IGraphicalEditPart");
IGraphicalEditPart gep = (IGraphicalEditPart) o;
System.out.println("element: " + gep.resolveSemanticElement());
r.add(gep.resolveSemanticElement());
} else {
- return null;
+ EObject eObject = EMFHelper.getEObject(o);
+ if (eObject != null) {
+ r.add(eObject);
+ }
}
- }
+// }
}
return r;
}

Back to the top