1 | protected IStructuredSelection selection;↵ | | 1 | protected IStructuredSelection selection;↵
|
|
2 | /**↵ | | 2 | /**↵
|
3 | * Remember the workbench during initialization.↵ | | 3 | * Remember the workbench during initialization.↵
|
4 | * <!-- begin-user-doc -->↵ | | 4 | * <!-- begin-user-doc -->↵
|
5 | * <!-- end-user-doc -->↵ | | 5 | * <!-- end-user-doc -->↵
|
6 | * @generated↵ | | 6 | * @generated↵
|
7 | */↵ | | 7 | */↵
|
8 | protected IWorkbench workbench;↵ | | 8 | protected IWorkbench workbench;↵
|
|
9 | /**↵ | | 9 | /**↵
|
10 | * Caches the names of the types that can be created as the root object.↵ | | 10 | * Caches the names of the types that can be created as the root object.↵
|
11 | * <!-- begin-user-doc -->↵ | | 11 | * <!-- begin-user-doc -->↵
|
12 | * <!-- end-user-doc -->↵ | | 12 | * <!-- end-user-doc -->↵
|
13 | * @generated↵ | | 13 | * @generated↵
|
14 | */↵ | | 14 | */↵
|
15 | protected List<String> initialObjectNames;↵ | | 15 | protected List<String> initialObjectNames;↵
|
|
16 | /**↵ | | 16 | /**↵
|
17 | * This just records the information.↵ | | 17 | * This just records the information.↵
|
18 | * <!-- begin-user-doc -->↵ | | 18 | * <!-- begin-user-doc -->↵
|
19 | * <!-- end-user-doc -->↵ | | 19 | * <!-- end-user-doc -->↵
|
20 | * @generated↵ | | 20 | * @generated↵
|
21 | */↵ | | 21 | */↵
|
22 | public void init(IWorkbench workbench, IStructuredSelection selection)↵ | | 22 | public void init(IWorkbench workbench, IStructuredSelection selection)↵
|
23 | {↵ | | 23 | {↵
|
24 | this.workbench = workbench;↵ | | 24 | this.workbench = workbench;↵
|
25 | this.selection = selection;↵ | | 25 | this.selection = selection;↵
|
26 | setWindowTitle(EcoreEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));↵ | | 26 | setWindowTitle(Ecore2EcoreEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));↵
|
27 | setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EcoreEditorPlugin.INSTANCE.getImage("full/wizban/NewEcore")));↵ | | 27 | setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(Ecore2EcoreEditorPlugin.INSTANCE.getImage("full/wizban/NewEcore2Ecore")));↵
|
28 | }↵ | | 28 | }↵
|
|
29 | /**↵ | | 29 | /**↵
|
30 | * Returns the names of the types that can be created as the root object.↵ | | 30 | * Returns the names of the types that can be created as the root object.↵
|
31 | * <!-- begin-user-doc -->↵ | | 31 | * <!-- begin-user-doc -->↵
|
32 | * <!-- end-user-doc -->↵ | | 32 | * <!-- end-user-doc -->↵
|
33 | * @generated↵ | | 33 | * @generated↵
|
34 | */↵ | | 34 | */↵
|
35 | protected Collection<String> getInitialObjectNames()↵ | | 35 | protected Collection<String> getInitialObjectNames()↵
|
36 | {↵ | | 36 | {↵
|
37 | if (initialObjectNames == null)↵ | | 37 | if (initialObjectNames == null)↵
|
38 | {↵ | | 38 | {↵
|
39 | initialObjectNames = new ArrayList<String>();↵ | | 39 | initialObjectNames = new ArrayList<String>();↵
|
40 | for (EClassifier eClassifier : ecorePackage.getEClassifiers())↵ | | 40 | for (EClassifier eClassifier : ecore2EcorePackage.getEClassifiers())↵
|
41 | {↵ | | 41 | {↵
|
42 | if (eClassifier instanceof EClass)↵ | | 42 | if (eClassifier instanceof EClass)↵
|
43 | {↵ | | 43 | {↵
|
44 | EClass eClass = (EClass)eClassifier;↵ | | 44 | EClass eClass = (EClass)eClassifier;↵
|
45 | if (!eClass.isAbstract())↵ | | 45 | if (!eClass.isAbstract())↵
|
46 | {↵ | | 46 | {↵
|
47 | initialObjectNames.add(eClass.getName());↵ | | 47 | initialObjectNames.add(eClass.getName());↵
|
48 | }↵ | | 48 | }↵
|
49 | }↵ | | 49 | }↵
|
50 | }↵ | | 50 | }↵
|
51 | Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());↵ | | 51 | Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());↵
|
52 | }↵ | | 52 | }↵
|
53 | return initialObjectNames; | | 53 | return initialObjectNames;
|