Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfaure2012-02-28 08:57:32 -0500
committertfaure2012-02-28 08:57:32 -0500
commit94947a31e89ce9346dbcfe9400bd298737a62161 (patch)
treed04e9c18fc800ee6c2a74db1f1aabfdd7e9b313f /plugins
parent3656605d4d21a406a132f0234354168a127288a7 (diff)
downloadorg.eclipse.papyrus-94947a31e89ce9346dbcfe9400bd298737a62161.tar.gz
org.eclipse.papyrus-94947a31e89ce9346dbcfe9400bd298737a62161.tar.xz
org.eclipse.papyrus-94947a31e89ce9346dbcfe9400bd298737a62161.zip
RESOLVED - bug 372724: [Model Explorer] Search function does not traverse EReferences, LinkItems
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372724 fiox problem when reveal is called with a root
Diffstat (limited to 'plugins')
-rw-r--r--plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java
index 7b5fa8a8463..47d97e3498b 100644
--- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java
+++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/ModelExplorerView.java
@@ -695,7 +695,15 @@ public class ModelExplorerView extends CommonNavigator implements IRevealSemanti
Iterable<EObject> reverseParents = Iterables.reverse(parents);
// reveal the resource if necessary
- Resource r = parents.get(parents.size() - 1).eResource();
+ Resource r = null;
+ if (parents != null && !parents.isEmpty())
+ {
+ r = parents.get(parents.size() - 1).eResource();
+ }
+ else if (parents != null)
+ {
+ r = currentEObject.eResource();
+ }
if(r != null) {
commonViewer.expandToLevel(new ReferencableMatchingItem(r.getResourceSet()), 1);
commonViewer.expandToLevel(new ReferencableMatchingItem(r), 1);

Back to the top