diff options
author | Camille Letavernier | 2014-01-06 12:32:01 +0000 |
---|---|---|
committer | Camille Letavernier | 2014-01-06 12:39:37 +0000 |
commit | 520f0bb558b4605e9e6eaa11c74eac3a435deba0 (patch) | |
tree | 8ffb7825a67cfcac1034078d547f3426658ec79d | |
parent | 0f645c65e35c4c1e148df865bf45b95763462ed2 (diff) | |
download | org.eclipse.papyrus-520f0bb558b4605e9e6eaa11c74eac3a435deba0.tar.gz org.eclipse.papyrus-520f0bb558b4605e9e6eaa11c74eac3a435deba0.tar.xz org.eclipse.papyrus-520f0bb558b4605e9e6eaa11c74eac3a435deba0.zip |
354845: [Model Explorer] really slow with a big model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=354845
-rw-r--r-- | plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/NavigatorUtils.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/NavigatorUtils.java b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/NavigatorUtils.java index 4f9281f8222..eabfb7a9e43 100644 --- a/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/NavigatorUtils.java +++ b/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer/src/org/eclipse/papyrus/views/modelexplorer/NavigatorUtils.java @@ -1,7 +1,7 @@ /***************************************************************************** * Copyright (c) 2013 CEA LIST. * - * + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -101,7 +101,7 @@ public class NavigatorUtils { public RootsIterator(Iterator<Resource> resources) { this.resources = resources; if(resources.hasNext()) { - inner = resources.next().getAllContents(); + inner = resources.next().getContents().iterator(); } } @@ -115,7 +115,7 @@ public class NavigatorUtils { } while(resources.hasNext()) { - inner = resources.next().getAllContents(); + inner = resources.next().getContents().iterator(); if(inner.hasNext()) { return true; } @@ -135,7 +135,7 @@ public class NavigatorUtils { } while(resources.hasNext()) { - inner = resources.next().getAllContents(); + inner = resources.next().getContents().iterator(); if(inner.hasNext()) { return inner.next(); } @@ -188,10 +188,12 @@ public class NavigatorUtils { if(element.eResource() == null) { return null; } + if(element.eResource().getResourceSet() == null) { + return null; + } return new ResourcesIterator(element.eResource().getResourceSet(), fileExtension); } - /** * Represents an iterator over the notation resources of a ResourceSet * @@ -385,10 +387,10 @@ public class NavigatorUtils { // // /** // * Gets the object name or empty string. - // * + // * // * @param object // * the object - // * + // * // * @return the object name or empty string // */ // // @unused @@ -402,10 +404,10 @@ public class NavigatorUtils { // // /** // * Gets the object name. - // * + // * // * @param object // * the object - // * + // * // * @return the object name // */ // // @unused |