Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortarendt2012-12-07 08:19:24 -0500
committertarendt2012-12-07 08:19:24 -0500
commite61239b95a109fc4a0499efe3e3d604d1592b8c7 (patch)
treec473df3c099f8a3c372c8475050f0493e21bcd7b
parent185c042fc4abedb84255f8d2cb0a0e33ca1a30fc (diff)
downloadorg.eclipse.emf.refactor.refactoring-e61239b95a109fc4a0499efe3e3d604d1592b8c7.tar.gz
org.eclipse.emf.refactor.refactoring-e61239b95a109fc4a0499efe3e3d604d1592b8c7.tar.xz
org.eclipse.emf.refactor.refactoring-e61239b95a109fc4a0499efe3e3d604d1592b8c7.zip
bug fixed
-rw-r--r--org.eclipse.emf.refactor.refactoring.generator/src/org/eclipse/emf/refactor/refactoring/generator/ui/BasicDataWizardPage.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/org.eclipse.emf.refactor.refactoring.generator/src/org/eclipse/emf/refactor/refactoring/generator/ui/BasicDataWizardPage.java b/org.eclipse.emf.refactor.refactoring.generator/src/org/eclipse/emf/refactor/refactoring/generator/ui/BasicDataWizardPage.java
index 2f8bee1..ea19610 100644
--- a/org.eclipse.emf.refactor.refactoring.generator/src/org/eclipse/emf/refactor/refactoring/generator/ui/BasicDataWizardPage.java
+++ b/org.eclipse.emf.refactor.refactoring.generator/src/org/eclipse/emf/refactor/refactoring/generator/ui/BasicDataWizardPage.java
@@ -2,7 +2,9 @@ package org.eclipse.emf.refactor.refactoring.generator.ui;
import java.io.File;
import java.net.URISyntaxException;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.emf.ecore.ENamedElement;
@@ -109,13 +111,20 @@ public class BasicDataWizardPage extends WizardPage implements Listener {
e.printStackTrace();
} finally {
contextCombo.removeAll();
- Object[] eObjectNames = new Object[ePackage.eContents().size()];
- for (int i = 0; i < eObjectNames.length; i++) {
+
+ List<Object> namedElements = new ArrayList<Object>();
+ for (int i = 0; i < ePackage.eContents().size(); i++) {
EObject eObject = ePackage.eContents().get(i);
if (eObject instanceof ENamedElement) {
- eObjectNames[i] = ((ENamedElement) ePackage.eContents().get(i)).getName();
+ namedElements.add(eObject);
}
- }
+ }
+
+ Object[] eObjectNames = new Object[namedElements.size()];
+ for (int i = 0; i < eObjectNames.length; i++) {
+ eObjectNames[i] = ((ENamedElement) namedElements.get(i)).getName();
+ }
+
Arrays.sort(eObjectNames);
for(Object object : eObjectNames){
contextCombo.add((String)object);

Back to the top