Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java')
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java28
1 files changed, 22 insertions, 6 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java
index 85e994a4..b53e6ec3 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/imp/ModelImportWizard.java
@@ -28,12 +28,19 @@ public class ModelImportWizard extends Wizard {
private AbstractComponentEditor editor;
+ private final String hint;
+
public ModelImportWizard(Class<? extends MApplicationElement> applicationElement, AbstractComponentEditor editor) {
+ this(applicationElement, editor, "");
+ }
+
+ public ModelImportWizard(Class<? extends MApplicationElement> applicationElement, AbstractComponentEditor editor, String hint) {
this.applicationElement = applicationElement;
this.editor = editor;
+ this.hint = hint;
this.application = (MApplication) editor.getEditor().getModelProvider().getRoot().get(0);
- setWindowTitle("Model Command Import Wizard");
- Assert.isNotNull(RegistryUtil.getStruct(applicationElement), "Unknown Element: " + applicationElement.getClass().getName());
+ setWindowTitle("Model " + applicationElement.getSimpleName() + " Import Wizard");
+ Assert.isNotNull(RegistryUtil.getStruct(applicationElement, getHint()), "Unknown Element: " + applicationElement.getClass().getName());
}
@Override
@@ -64,7 +71,7 @@ public class ModelImportWizard extends Wizard {
* @see #getApplicationElement()
*/
protected String getExtensionPointName() {
- return RegistryUtil.getStruct(applicationElement).getExtensionPointName();
+ return RegistryUtil.getStruct(applicationElement, getHint()).getExtensionPointName();
}
/**
@@ -75,7 +82,7 @@ public class ModelImportWizard extends Wizard {
* @see #getApplicationElement()
*/
protected String getExtensionPoint() {
- return RegistryUtil.getStruct(applicationElement).getExtensionPoint();
+ return RegistryUtil.getStruct(applicationElement, getHint()).getExtensionPoint();
}
/**
@@ -84,7 +91,7 @@ public class ModelImportWizard extends Wizard {
* @see #MAPPING_NAME
*/
protected String getMappingName() {
- return RegistryUtil.getStruct(applicationElement).getMappingName();
+ return RegistryUtil.getStruct(applicationElement, getHint()).getMappingName();
}
/**
@@ -96,7 +103,7 @@ public class ModelImportWizard extends Wizard {
* @return
*/
public MApplicationElement[] getElements(Class<? extends MApplicationElement> type) {
- return RegistryUtil.getModelElements(type, application, page1.getConfigurationElements());
+ return RegistryUtil.getModelElements(type, getHint(), application, page1.getConfigurationElements());
}
public AbstractComponentEditor getEditor() {
@@ -111,4 +118,13 @@ public class ModelImportWizard extends Wizard {
public boolean isLiveModel() {
return editor.getEditor().isLiveModel();
}
+
+ /**
+ * Returns the hint that explains the meaning of the caller.
+ *
+ * @return
+ */
+ public String getHint() {
+ return hint;
+ }
}

Back to the top