Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-05-07 12:05:46 +0000
committerCamille Letavernier2014-05-13 13:32:08 +0000
commitd1eb4952002cb745de84b1c49a4c0d06ecf4a6d3 (patch)
tree35f5f6a89b32e67ad0027c829ace920838453a89 /plugins/customization
parent1893285f280c0b80e14e6cc41b281102a8a383be (diff)
downloadorg.eclipse.papyrus-d1eb4952002cb745de84b1c49a4c0d06ecf4a6d3.tar.gz
org.eclipse.papyrus-d1eb4952002cb745de84b1c49a4c0d06ecf4a6d3.tar.xz
org.eclipse.papyrus-d1eb4952002cb745de84b1c49a4c0d06ecf4a6d3.zip
434133: [ModelExplorer] ModelExplorer items should be IAdaptable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434133
Diffstat (limited to 'plugins/customization')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/preview/Preview.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/preview/Preview.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/preview/Preview.java
index 6fd1f1ddf98..176eb5e4ced 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/preview/Preview.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/editor/preview/Preview.java
@@ -37,8 +37,7 @@ import org.eclipse.papyrus.customization.properties.Activator;
import org.eclipse.papyrus.customization.properties.editor.UIEditor;
import org.eclipse.papyrus.customization.properties.messages.Messages;
import org.eclipse.papyrus.customization.properties.model.xwt.resource.XWTResource;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement;
-import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EStructuralFeatureTreeElement;
+import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.TreeElement;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.views.properties.contexts.Section;
import org.eclipse.papyrus.views.properties.contexts.Tab;
@@ -443,8 +442,8 @@ public class Preview extends ViewPart implements ISelectionChangedListener, IPar
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection)event.getSelection();
if(selection.size() == 1) {
- EObjectTreeElement child = null;
- EObjectTreeElement treeElement = (EObjectTreeElement)selection.getFirstElement();
+ TreeElement child = null;
+ TreeElement treeElement = (TreeElement)selection.getFirstElement();
do {
EObject semantic = EMFHelper.getEObject(treeElement);
@@ -454,10 +453,7 @@ public class Preview extends ViewPart implements ISelectionChangedListener, IPar
}
child = treeElement;
- EStructuralFeatureTreeElement elementFeature = treeElement.getParent();
- if(elementFeature != null && elementFeature.getParent() != null) {
- treeElement = elementFeature.getParent();
- }
+ treeElement = treeElement.getParent();
} while(child != treeElement && treeElement != null);
}
}

Back to the top