Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-04-13 22:22:22 +0000
committerashatalin2006-04-13 22:22:22 +0000
commit4b1b72affead95dfa83cd1c48398f04d7ef5e918 (patch)
tree8d462a97961212b5fc4284d233e8187f4c13b7ca /plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
parentedaed89079b6b1e45f3e64153a3ce265ef07323a (diff)
downloadorg.eclipse.gmf-tooling-4b1b72affead95dfa83cd1c48398f04d7ef5e918.tar.gz
org.eclipse.gmf-tooling-4b1b72affead95dfa83cd1c48398f04d7ef5e918.tar.xz
org.eclipse.gmf-tooling-4b1b72affead95dfa83cd1c48398f04d7ef5e918.zip
#125900 Redundant annotations added to View in generated view factory
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet b/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
index 0801c0eae..182397a92 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
@@ -8,7 +8,6 @@ final boolean isSynchronizedDiagram = true;
final GenDiagram genDiagram = (GenDiagram) ((Object[]) argument)[0];
final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1];
final GenEditorGenerator editorGen = genDiagram.getEditorGen();
-final String modelID = editorGen.getModelID();
final String pluginActivatorClass = importManager.getImportedName(editorGen.getPlugin().getActivatorQualifiedClassName());
%>
<%@ include file="../copyright4java.jetinc"%>
@@ -93,7 +92,7 @@ public class <%=genDiagram.getNewDiagramFileWizardClassName()%> extends Wizard {
myFileCreationPage = new WizardNewFileCreationPage("Initialize new Ecore diagram file", mySelection);
myFileCreationPage.setFileName(mySelectedModelFile.getProjectRelativePath().removeFileExtension().addFileExtension("<%=editorGen.getDiagramFileExtension()%>").lastSegment());
myFileCreationPage.setTitle("Diagram file");
- myFileCreationPage.setDescription("Create new diagram and initialize it using specified <%=modelID%> model content");
+ myFileCreationPage.setDescription("Create new diagram and initialize it using specified " + <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.MODEL_ID + " model content");
addPage(myFileCreationPage);
}
@@ -127,7 +126,7 @@ public class <%=genDiagram.getNewDiagramFileWizardClassName()%> extends Wizard {
if (diagramVID != <%=genDiagram.getVisualID()%>) {
return CommandResult.newErrorCommandResult("Incorrect model object stored as a root resource object"); //$NON-NLS-1$
}
- Diagram diagram = ViewService.createDiagram(diagramModelObject, "<%=modelID%>", <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
+ Diagram diagram = ViewService.createDiagram(diagramModelObject, <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.MODEL_ID, <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
diagramResource.getContents().add(diagram);
<%if (editorGen.isSameFileForDiagramAndModel()) {%>
diagramResource.getContents().add(diagram.getElement());

Back to the top