aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormeysholdt2009-03-23 13:20:21 (EDT)
committersefftinge2009-03-23 13:20:21 (EDT)
commit3c6213482700602c61319e74e07bb32260162caf (patch)
treecccd0a1defbfe74e040eeb9e098c2a74950a6dcf
parent69e8341faf7003d2fc31755f39c8ba90f59fe121 (diff)
downloadorg.eclipse.xtext-3c6213482700602c61319e74e07bb32260162caf.zip
org.eclipse.xtext-3c6213482700602c61319e74e07bb32260162caf.tar.gz
org.eclipse.xtext-3c6213482700602c61319e74e07bb32260162caf.tar.bz2
bugfix - array was initialized with the wrong size
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/impl/AbstractSemanticModelTransformer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/impl/AbstractSemanticModelTransformer.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/impl/AbstractSemanticModelTransformer.java
index bdcd345..d12949b 100644
--- a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/impl/AbstractSemanticModelTransformer.java
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/outline/impl/AbstractSemanticModelTransformer.java
@@ -60,7 +60,8 @@ public abstract class AbstractSemanticModelTransformer implements ISemanticModel
}
private EObject[] sortChildren(EObject semanticNode) {
- EObject[] result = getChildren(semanticNode).toArray(new EObject[semanticNode.eContents().size()]);
+ List<EObject> list = getChildren(semanticNode);
+ EObject[] result = list.toArray(new EObject[list.size()]);
if (sorted) {
Arrays.sort(result, new Comparator<EObject>() {
public int compare(EObject arg0, EObject arg1) {