Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-04-20 20:36:48 +0000
committerashatalin2006-04-20 20:36:48 +0000
commit9e59d27423a97898afb8ac60325cf2012cf06999 (patch)
tree07567fd80b5af7766cbfef6a8968bb47bfc2c049 /plugins
parentfdc6327debc9f35642c3c7103d4c56039a5318e2 (diff)
downloadorg.eclipse.gmf-tooling-9e59d27423a97898afb8ac60325cf2012cf06999.tar.gz
org.eclipse.gmf-tooling-9e59d27423a97898afb8ac60325cf2012cf06999.tar.xz
org.eclipse.gmf-tooling-9e59d27423a97898afb8ac60325cf2012cf06999.zip
#125900 Redundant annotations added to View in generated view factory
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/NewDiagramFileWizardGenerator.java708
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/VisualIDRegistryGenerator.java56
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ChildNodeEditPartGenerator.java4
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/CompartmentEditPartGenerator.java4
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/DiagramEditPartGenerator.java30
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/EditPartFactoryGenerator.java16
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ExternalNodeLabelEditPartGenerator.java475
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkEditPartGenerator.java4
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkLabelEditPartGenerator.java489
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeEditPartGenerator.java396
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeLabelEditPartGenerator.java4
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/ChildContainerCanonicalEditPolicyGenerator.java12
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/DiagramCanonicalEditPolicyGenerator.java235
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/MetricProviderGenerator.java2
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ParserProviderGenerator.java23
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewFactoryGenerator.java206
-rw-r--r--plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewProviderGenerator.java16
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/editor/VisualIDRegistry.javajet57
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/DiagramEditPart.javajet4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/EditPartFactory.javajet8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/ExternalNodeLabelEditPart.javajet2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/LinkLabelEditPart.javajet4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/NodeEditPart.javajet4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parts/visualID.jetinc2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/MetricProvider.javajet2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/ParserProvider.javajet2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/ViewFactory.javajet8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/providers/ViewProvider.javajet8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectDiagramPhantoms_header.jetinc2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectFMFLinks_header.jetinc2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectSemanticChildren_header.jetinc4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/initDiagramContents.jetinc6
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/refreshSemanticDiagram.jetinc2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/storeLinks.jetinc8
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen69
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CanvasEditPart.java5
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CompartmentEditPart.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_VisualFacetsEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_nameEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/ConnectionEditPart.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_VisualFacetsEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_nameEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Ellipse2EditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/EllipseEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGalleryEditPart.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_FiguresEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_nameEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java44
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/NodeEditPart.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_VisualFacetsEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_nameEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Polyline2EditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/PolylineEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Rectangle2EditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RectangleEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangle2EditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangleEditPart.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java51
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGallery_FiguresCanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java13
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java230
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java10
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java61
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/CompartmentViewFactory.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Compartment_VisualFacetsViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/ConnectionViewFactory.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Connection_VisualFacetsViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Ellipse2ViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/EllipseViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGalleryViewFactory.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGallery_FiguresViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/NodeViewFactory.java6
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Node_VisualFacetsViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Polyline2ViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/PolylineViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Rectangle2ViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RectangleViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangle2ViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangleViewFactory.java2
-rw-r--r--plugins/org.eclipse.gmf.graphdef.editor/templates/parts/NodeEditPart.javajet4
90 files changed, 1856 insertions, 1630 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/NewDiagramFileWizardGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/NewDiagramFileWizardGenerator.java
index 2d2c77d65..64d8c2efd 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/NewDiagramFileWizardGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/NewDiagramFileWizardGenerator.java
@@ -28,7 +28,7 @@ public class NewDiagramFileWizardGenerator {
protected final String TEXT_9 = " e) {" + NL + "\t\t\t";
protected final String TEXT_10 = ".getInstance().logError(\"Unable to set charset for diagram file\", e); //$NON-NLS-1$" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\tResourceSet resourceSet = myEditingDomain.getResourceSet();" + NL + "\t\tfinal Resource diagramResource = resourceSet.createResource(URI.createPlatformResourceURI(diagramFile.getFullPath().toString()));" + NL + "" + NL + "\t\tList affectedFiles = new LinkedList();" + NL + "\t\taffectedFiles.add(mySelectedModelFile);" + NL + "\t\taffectedFiles.add(diagramFile);" + NL + "\t\t\t" + NL + "\t\tAbstractTransactionalCommand command = new AbstractTransactionalCommand(myEditingDomain, \"Initializing diagram contents\", affectedFiles) { //$NON-NLS-1$" + NL + "\t\t\tprotected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {" + NL + "\t\t\t\tint diagramVID = ";
protected final String TEXT_11 = ".INSTANCE.getDiagramVisualID(diagramModelObject);" + NL + "\t\t\t\tif (diagramVID != ";
- protected final String TEXT_12 = ") {" + NL + "\t\t\t\t\treturn CommandResult.newErrorCommandResult(\"Incorrect model object stored as a root resource object\"); //$NON-NLS-1$" + NL + "\t\t\t\t}" + NL + "\t\t\t\tDiagram diagram = ViewService.createDiagram(diagramModelObject, ";
+ protected final String TEXT_12 = ".VISUAL_ID) {" + NL + "\t\t\t\t\treturn CommandResult.newErrorCommandResult(\"Incorrect model object stored as a root resource object\"); //$NON-NLS-1$" + NL + "\t\t\t\t}" + NL + "\t\t\t\tDiagram diagram = ViewService.createDiagram(diagramModelObject, ";
protected final String TEXT_13 = ".MODEL_ID, ";
protected final String TEXT_14 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\t\t\tdiagramResource.getContents().add(diagram);";
protected final String TEXT_15 = NL + "\t\t\t\tdiagramResource.getContents().add(diagram.getElement());";
@@ -59,186 +59,190 @@ public class NewDiagramFileWizardGenerator {
protected final String TEXT_40 = ") it.next();" + NL + "\tif (nextResourceObject == diagramModelObject) {" + NL + "\t\tcontinue;" + NL + "\t}" + NL + "\tint nodeVID = ";
protected final String TEXT_41 = ".INSTANCE.getNodeVisualID(diagram, nextResourceObject);" + NL + "\tswitch (nodeVID) {";
protected final String TEXT_42 = NL + "\tcase ";
- protected final String TEXT_43 = ": {" + NL + "\t\t";
+ protected final String TEXT_43 = ".VISUAL_ID: {" + NL + "\t\t";
protected final String TEXT_44 = " nextNode = ViewService.createNode(diagram, nextResourceObject, ";
- protected final String TEXT_45 = ".VISUAL_ID, ";
- protected final String TEXT_46 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextResourceObject, nextNode);" + NL + "\t\tcreate";
- protected final String TEXT_47 = "Children(nextNode, nextResourceObject);";
- protected final String TEXT_48 = NL;
- protected final String TEXT_49 = "\t\tbreak;" + NL + "\t}";
- protected final String TEXT_50 = "\t}" + NL + "}";
- protected final String TEXT_51 = "\t\t" + NL + "\tcreateLinks(diagram);" + NL + "}";
- protected final String TEXT_52 = "\t" + NL + "" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private void create";
- protected final String TEXT_53 = "Children(";
- protected final String TEXT_54 = " viewObject, ";
- protected final String TEXT_55 = " modelObject) {";
- protected final String TEXT_56 = NL;
- protected final String TEXT_57 = "\t";
- protected final String TEXT_58 = " nextValue;" + NL + "\tint nodeVID;";
- protected final String TEXT_59 = "\tfor (";
- protected final String TEXT_60 = " values = ";
- protected final String TEXT_61 = ".iterator(); values.hasNext();) {" + NL + "\t\tnextValue = (";
- protected final String TEXT_62 = ") values.next();";
- protected final String TEXT_63 = NL + "\tnextValue = ";
- protected final String TEXT_64 = ";";
- protected final String TEXT_65 = NL + "\tnodeVID = ";
- protected final String TEXT_66 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
- protected final String TEXT_67 = NL + "\tswitch (nodeVID) {";
- protected final String TEXT_68 = NL + "\tcase ";
- protected final String TEXT_69 = ": {";
- protected final String TEXT_70 = NL + "\tif (";
- protected final String TEXT_71 = " == nodeVID) {";
- protected final String TEXT_72 = NL + "\t\t";
- protected final String TEXT_73 = " nextNode = ViewService.createNode(viewObject, nextValue, ";
- protected final String TEXT_74 = ".VISUAL_ID, ";
- protected final String TEXT_75 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextValue, nextNode);" + NL + "\t\tcreate";
- protected final String TEXT_76 = "Children(nextNode, nextValue);";
- protected final String TEXT_77 = NL;
- protected final String TEXT_78 = "\t\tbreak;";
- protected final String TEXT_79 = "\t}";
- protected final String TEXT_80 = NL + "\t}";
- protected final String TEXT_81 = NL + "\t}";
- protected final String TEXT_82 = NL + "\t";
- protected final String TEXT_83 = " nextCompartment = getCompartment(viewObject, ";
- protected final String TEXT_84 = ".VISUAL_ID);" + NL + "\tif (nextCompartment != null) {" + NL + "\t\tcreate";
- protected final String TEXT_85 = "Children(nextCompartment, modelObject);" + NL + "\t}";
- protected final String TEXT_86 = NL + "\tstoreLinks(modelObject, viewObject.getDiagram());";
- protected final String TEXT_87 = NL + "}";
- protected final String TEXT_88 = NL + "\t" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private ";
- protected final String TEXT_89 = " getCompartment(";
- protected final String TEXT_90 = " node, String name) {" + NL + "\tfor (";
- protected final String TEXT_91 = " it = node.getChildren().iterator(); it.hasNext();) {" + NL + "\t\t";
- protected final String TEXT_92 = " nextView = (";
- protected final String TEXT_93 = ") it.next();" + NL + "\t\tif (nextView instanceof ";
- protected final String TEXT_94 = " && name.equals(nextView.getType())) {" + NL + "\t\t\treturn (";
- protected final String TEXT_95 = ") nextView;" + NL + "\t\t}" + NL + "\t}" + NL + "\treturn null;" + NL + "}";
- protected final String TEXT_96 = NL;
- protected final String TEXT_97 = NL;
- protected final String TEXT_98 = "/**" + NL + " *@generated" + NL + " */" + NL + "private void storeLinks(";
- protected final String TEXT_99 = " container, ";
- protected final String TEXT_100 = " diagram) {" + NL + "\t";
- protected final String TEXT_101 = " containerMetaclass = container.eClass();" + NL + "\tstoreFeatureModelFacetLinks(container, containerMetaclass, diagram);" + NL + "\tstoreTypeModelFacetLinks(container, containerMetaclass);" + NL + "}" + NL + "\t" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private void storeTypeModelFacetLinks(";
+ protected final String TEXT_45 = ".getType(";
+ protected final String TEXT_46 = ".VISUAL_ID), ";
+ protected final String TEXT_47 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextResourceObject, nextNode);" + NL + "\t\tcreate";
+ protected final String TEXT_48 = "Children(nextNode, nextResourceObject);";
+ protected final String TEXT_49 = NL;
+ protected final String TEXT_50 = "\t\tbreak;" + NL + "\t}";
+ protected final String TEXT_51 = "\t}" + NL + "}";
+ protected final String TEXT_52 = "\t\t" + NL + "\tcreateLinks(diagram);" + NL + "}";
+ protected final String TEXT_53 = "\t" + NL + "" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private void create";
+ protected final String TEXT_54 = "Children(";
+ protected final String TEXT_55 = " viewObject, ";
+ protected final String TEXT_56 = " modelObject) {";
+ protected final String TEXT_57 = NL;
+ protected final String TEXT_58 = "\t";
+ protected final String TEXT_59 = " nextValue;" + NL + "\tint nodeVID;";
+ protected final String TEXT_60 = "\tfor (";
+ protected final String TEXT_61 = " values = ";
+ protected final String TEXT_62 = ".iterator(); values.hasNext();) {" + NL + "\t\tnextValue = (";
+ protected final String TEXT_63 = ") values.next();";
+ protected final String TEXT_64 = NL + "\tnextValue = ";
+ protected final String TEXT_65 = ";";
+ protected final String TEXT_66 = NL + "\tnodeVID = ";
+ protected final String TEXT_67 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
+ protected final String TEXT_68 = NL + "\tswitch (nodeVID) {";
+ protected final String TEXT_69 = NL + "\tcase ";
+ protected final String TEXT_70 = ".VISUAL_ID: {";
+ protected final String TEXT_71 = NL + "\tif (";
+ protected final String TEXT_72 = ".VISUAL_ID == nodeVID) {";
+ protected final String TEXT_73 = NL + "\t\t";
+ protected final String TEXT_74 = " nextNode = ViewService.createNode(viewObject, nextValue, ";
+ protected final String TEXT_75 = ".getType(";
+ protected final String TEXT_76 = ".VISUAL_ID), ";
+ protected final String TEXT_77 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextValue, nextNode);" + NL + "\t\tcreate";
+ protected final String TEXT_78 = "Children(nextNode, nextValue);";
+ protected final String TEXT_79 = NL;
+ protected final String TEXT_80 = "\t\tbreak;";
+ protected final String TEXT_81 = "\t}";
+ protected final String TEXT_82 = NL + "\t}";
+ protected final String TEXT_83 = NL + "\t}";
+ protected final String TEXT_84 = NL + "\t";
+ protected final String TEXT_85 = " nextCompartment = getCompartment(viewObject, ";
+ protected final String TEXT_86 = ".getType(";
+ protected final String TEXT_87 = ".VISUAL_ID));" + NL + "\tif (nextCompartment != null) {" + NL + "\t\tcreate";
+ protected final String TEXT_88 = "Children(nextCompartment, modelObject);" + NL + "\t}";
+ protected final String TEXT_89 = NL + "\tstoreLinks(modelObject, viewObject.getDiagram());";
+ protected final String TEXT_90 = NL + "}";
+ protected final String TEXT_91 = NL + "\t" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private ";
+ protected final String TEXT_92 = " getCompartment(";
+ protected final String TEXT_93 = " node, String name) {" + NL + "\tfor (";
+ protected final String TEXT_94 = " it = node.getChildren().iterator(); it.hasNext();) {" + NL + "\t\t";
+ protected final String TEXT_95 = " nextView = (";
+ protected final String TEXT_96 = ") it.next();" + NL + "\t\tif (nextView instanceof ";
+ protected final String TEXT_97 = " && name.equals(nextView.getType())) {" + NL + "\t\t\treturn (";
+ protected final String TEXT_98 = ") nextView;" + NL + "\t\t}" + NL + "\t}" + NL + "\treturn null;" + NL + "}";
+ protected final String TEXT_99 = NL;
+ protected final String TEXT_100 = NL;
+ protected final String TEXT_101 = "/**" + NL + " *@generated" + NL + " */" + NL + "private void storeLinks(";
protected final String TEXT_102 = " container, ";
- protected final String TEXT_103 = " containerMetaclass) {\t";
- protected final String TEXT_104 = "\t\t" + NL + "\tif (";
- protected final String TEXT_105 = ".eINSTANCE.get";
- protected final String TEXT_106 = "().isSuperTypeOf(containerMetaclass)) {";
- protected final String TEXT_107 = "\t\t" + NL + "\t\tfor (";
- protected final String TEXT_108 = " values = ";
- protected final String TEXT_109 = ".iterator(); values.hasNext();) {" + NL + "\t\t\t";
- protected final String TEXT_110 = " nextValue = ((";
- protected final String TEXT_111 = ") values.next());";
- protected final String TEXT_112 = NL + "\t\t";
- protected final String TEXT_113 = " nextValue = (";
- protected final String TEXT_114 = ") ";
- protected final String TEXT_115 = ";";
- protected final String TEXT_116 = NL + "\t\tObject structuralFeatureResult = ";
- protected final String TEXT_117 = ";" + NL + "\t\tif (structuralFeatureResult instanceof ";
- protected final String TEXT_118 = ") {" + NL + "\t\t\t";
- protected final String TEXT_119 = " dst = (";
- protected final String TEXT_120 = ") structuralFeatureResult;";
- protected final String TEXT_121 = NL + "\t\t\tstructuralFeatureResult = ";
- protected final String TEXT_122 = ";" + NL + "\t\t\tif (structuralFeatureResult instanceof ";
- protected final String TEXT_123 = ") {" + NL + "\t\t\t\t";
- protected final String TEXT_124 = " src = (";
- protected final String TEXT_125 = ") structuralFeatureResult;";
- protected final String TEXT_126 = NL + "\t\t\t";
- protected final String TEXT_127 = " src = container;";
- protected final String TEXT_128 = NL + "\t\t\tint linkVID = ";
- protected final String TEXT_129 = ".INSTANCE.getLinkWithClassVisualID(nextValue);" + NL + "\t\t\tif (";
- protected final String TEXT_130 = " == linkVID) {" + NL + "\t\t\t\tmyLinkDescriptors.add(new LinkDescriptor(src, dst, nextValue, linkVID));" + NL + "\t\t\t}";
- protected final String TEXT_131 = NL + "\t\t\t}";
- protected final String TEXT_132 = NL + "\t\t}";
- protected final String TEXT_133 = NL + "\t\t}";
- protected final String TEXT_134 = NL + "\t}";
- protected final String TEXT_135 = NL + "}" + NL + "" + NL + "/**" + NL + " *@generated" + NL + " */" + NL + "private void storeFeatureModelFacetLinks(";
- protected final String TEXT_136 = " container, ";
- protected final String TEXT_137 = " containerMetaclass, Diagram diagram) {";
- protected final String TEXT_138 = NL;
- protected final String TEXT_139 = "\tif (";
- protected final String TEXT_140 = ".eINSTANCE.get";
- protected final String TEXT_141 = "().isSuperTypeOf(containerMetaclass)) {";
- protected final String TEXT_142 = NL + "\t\tfor (";
- protected final String TEXT_143 = " destinations = ";
- protected final String TEXT_144 = ".iterator(); destinations.hasNext();) {" + NL + "\t\t\t";
- protected final String TEXT_145 = " nextDestination = (";
- protected final String TEXT_146 = ") destinations.next();";
- protected final String TEXT_147 = NL + "\t\t";
+ protected final String TEXT_103 = " diagram) {" + NL + "\t";
+ protected final String TEXT_104 = " containerMetaclass = container.eClass();" + NL + "\tstoreFeatureModelFacetLinks(container, containerMetaclass, diagram);" + NL + "\tstoreTypeModelFacetLinks(container, containerMetaclass);" + NL + "}" + NL + "\t" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private void storeTypeModelFacetLinks(";
+ protected final String TEXT_105 = " container, ";
+ protected final String TEXT_106 = " containerMetaclass) {\t";
+ protected final String TEXT_107 = "\t\t" + NL + "\tif (";
+ protected final String TEXT_108 = ".eINSTANCE.get";
+ protected final String TEXT_109 = "().isSuperTypeOf(containerMetaclass)) {";
+ protected final String TEXT_110 = "\t\t" + NL + "\t\tfor (";
+ protected final String TEXT_111 = " values = ";
+ protected final String TEXT_112 = ".iterator(); values.hasNext();) {" + NL + "\t\t\t";
+ protected final String TEXT_113 = " nextValue = ((";
+ protected final String TEXT_114 = ") values.next());";
+ protected final String TEXT_115 = NL + "\t\t";
+ protected final String TEXT_116 = " nextValue = (";
+ protected final String TEXT_117 = ") ";
+ protected final String TEXT_118 = ";";
+ protected final String TEXT_119 = NL + "\t\tObject structuralFeatureResult = ";
+ protected final String TEXT_120 = ";" + NL + "\t\tif (structuralFeatureResult instanceof ";
+ protected final String TEXT_121 = ") {" + NL + "\t\t\t";
+ protected final String TEXT_122 = " dst = (";
+ protected final String TEXT_123 = ") structuralFeatureResult;";
+ protected final String TEXT_124 = NL + "\t\t\tstructuralFeatureResult = ";
+ protected final String TEXT_125 = ";" + NL + "\t\t\tif (structuralFeatureResult instanceof ";
+ protected final String TEXT_126 = ") {" + NL + "\t\t\t\t";
+ protected final String TEXT_127 = " src = (";
+ protected final String TEXT_128 = ") structuralFeatureResult;";
+ protected final String TEXT_129 = NL + "\t\t\t";
+ protected final String TEXT_130 = " src = container;";
+ protected final String TEXT_131 = NL + "\t\t\tint linkVID = ";
+ protected final String TEXT_132 = ".INSTANCE.getLinkWithClassVisualID(nextValue);" + NL + "\t\t\tif (";
+ protected final String TEXT_133 = ".VISUAL_ID == linkVID) {" + NL + "\t\t\t\tmyLinkDescriptors.add(new LinkDescriptor(src, dst, nextValue, linkVID));" + NL + "\t\t\t}";
+ protected final String TEXT_134 = NL + "\t\t\t}";
+ protected final String TEXT_135 = NL + "\t\t}";
+ protected final String TEXT_136 = NL + "\t\t}";
+ protected final String TEXT_137 = NL + "\t}";
+ protected final String TEXT_138 = NL + "}" + NL + "" + NL + "/**" + NL + " *@generated" + NL + " */" + NL + "private void storeFeatureModelFacetLinks(";
+ protected final String TEXT_139 = " container, ";
+ protected final String TEXT_140 = " containerMetaclass, Diagram diagram) {";
+ protected final String TEXT_141 = NL;
+ protected final String TEXT_142 = "\tif (";
+ protected final String TEXT_143 = ".eINSTANCE.get";
+ protected final String TEXT_144 = "().isSuperTypeOf(containerMetaclass)) {";
+ protected final String TEXT_145 = NL + "\t\tfor (";
+ protected final String TEXT_146 = " destinations = ";
+ protected final String TEXT_147 = ".iterator(); destinations.hasNext();) {" + NL + "\t\t\t";
protected final String TEXT_148 = " nextDestination = (";
- protected final String TEXT_149 = ") ";
- protected final String TEXT_150 = ";";
- protected final String TEXT_151 = NL + "\t\tif (";
- protected final String TEXT_152 = " == ";
- protected final String TEXT_153 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
- protected final String TEXT_154 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
- protected final String TEXT_155 = ".";
- protected final String TEXT_156 = ", ";
- protected final String TEXT_157 = "));";
- protected final String TEXT_158 = NL + "\t\t";
- protected final String TEXT_159 = " nextNode = ViewService.createNode(diagram, nextDestination, ";
- protected final String TEXT_160 = ".VISUAL_ID, ";
- protected final String TEXT_161 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextDestination, nextNode);" + NL + "\t\tcreate";
- protected final String TEXT_162 = "Children(nextNode, nextDestination);";
- protected final String TEXT_163 = NL;
- protected final String TEXT_164 = NL + "\t\t}";
- protected final String TEXT_165 = NL + "\t\t}";
- protected final String TEXT_166 = NL + "\t}";
+ protected final String TEXT_149 = ") destinations.next();";
+ protected final String TEXT_150 = NL + "\t\t";
+ protected final String TEXT_151 = " nextDestination = (";
+ protected final String TEXT_152 = ") ";
+ protected final String TEXT_153 = ";";
+ protected final String TEXT_154 = NL + "\t\tif (";
+ protected final String TEXT_155 = ".VISUAL_ID == ";
+ protected final String TEXT_156 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
+ protected final String TEXT_157 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
+ protected final String TEXT_158 = ".";
+ protected final String TEXT_159 = ", ";
+ protected final String TEXT_160 = ".VISUAL_ID));";
+ protected final String TEXT_161 = NL + "\t\t";
+ protected final String TEXT_162 = " nextNode = ViewService.createNode(diagram, nextDestination, ";
+ protected final String TEXT_163 = ".getType(";
+ protected final String TEXT_164 = ".VISUAL_ID), ";
+ protected final String TEXT_165 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextDestination, nextNode);" + NL + "\t\tcreate";
+ protected final String TEXT_166 = "Children(nextNode, nextDestination);";
protected final String TEXT_167 = NL;
- protected final String TEXT_168 = "\tif (";
- protected final String TEXT_169 = ".eINSTANCE.get";
- protected final String TEXT_170 = "().isSuperTypeOf(containerMetaclass)) {";
- protected final String TEXT_171 = NL + "\t\tfor (";
- protected final String TEXT_172 = " destinations = ";
- protected final String TEXT_173 = ".iterator(); destinations.hasNext();) {" + NL + "\t\t\t";
- protected final String TEXT_174 = " nextDestination = (";
- protected final String TEXT_175 = ") destinations.next();";
- protected final String TEXT_176 = NL + "\t\t";
- protected final String TEXT_177 = " nextDestination = (";
- protected final String TEXT_178 = ") ";
- protected final String TEXT_179 = ";";
- protected final String TEXT_180 = NL + "\t\tif (";
- protected final String TEXT_181 = " == ";
- protected final String TEXT_182 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
- protected final String TEXT_183 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
- protected final String TEXT_184 = ".";
- protected final String TEXT_185 = ", ";
- protected final String TEXT_186 = "));";
- protected final String TEXT_187 = NL;
- protected final String TEXT_188 = NL + "\t\t}";
- protected final String TEXT_189 = NL + "\t\t}";
- protected final String TEXT_190 = NL + "\t}";
- protected final String TEXT_191 = NL + "}" + NL + "" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private void createLinks(";
- protected final String TEXT_192 = " diagram) {" + NL + "\tfor (";
- protected final String TEXT_193 = " it = myLinkDescriptors.iterator(); it.hasNext();) {" + NL + "\t\tLinkDescriptor nextLinkDescriptor = (LinkDescriptor) it.next();" + NL + "\t\t";
- protected final String TEXT_194 = " edge = (";
- protected final String TEXT_195 = ") ViewService.getInstance().createEdge(nextLinkDescriptor.getSemanticAdapter(), diagram, \"\", ";
- protected final String TEXT_196 = ".APPEND, ";
- protected final String TEXT_197 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tif (edge != null) {" + NL + "\t\t\tedge.setSource((";
- protected final String TEXT_198 = ") myEObject2NodeMap.get(nextLinkDescriptor.getSource()));" + NL + "\t\t\tedge.setTarget((";
- protected final String TEXT_199 = ") myEObject2NodeMap.get(nextLinkDescriptor.getDestination()));" + NL + "\t\t}" + NL + "\t}" + NL + "}" + NL;
- protected final String TEXT_200 = NL;
- protected final String TEXT_201 = "/**" + NL + " * @generated" + NL + " */" + NL + "private class LinkDescriptor {" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_202 = " mySource;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_203 = " myDestination;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_204 = " myLinkElement;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate int myVisualID;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_205 = " mySemanticAdapter;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
- protected final String TEXT_206 = " source, ";
- protected final String TEXT_207 = " destination, ";
- protected final String TEXT_208 = " linkElement, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = linkElement;" + NL + "\t\tmySemanticAdapter = new ";
- protected final String TEXT_209 = "(linkElement);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
+ protected final String TEXT_168 = NL + "\t\t}";
+ protected final String TEXT_169 = NL + "\t\t}";
+ protected final String TEXT_170 = NL + "\t}";
+ protected final String TEXT_171 = NL;
+ protected final String TEXT_172 = "\tif (";
+ protected final String TEXT_173 = ".eINSTANCE.get";
+ protected final String TEXT_174 = "().isSuperTypeOf(containerMetaclass)) {";
+ protected final String TEXT_175 = NL + "\t\tfor (";
+ protected final String TEXT_176 = " destinations = ";
+ protected final String TEXT_177 = ".iterator(); destinations.hasNext();) {" + NL + "\t\t\t";
+ protected final String TEXT_178 = " nextDestination = (";
+ protected final String TEXT_179 = ") destinations.next();";
+ protected final String TEXT_180 = NL + "\t\t";
+ protected final String TEXT_181 = " nextDestination = (";
+ protected final String TEXT_182 = ") ";
+ protected final String TEXT_183 = ";";
+ protected final String TEXT_184 = NL + "\t\tif (";
+ protected final String TEXT_185 = ".VISUAL_ID == ";
+ protected final String TEXT_186 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
+ protected final String TEXT_187 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
+ protected final String TEXT_188 = ".";
+ protected final String TEXT_189 = ", ";
+ protected final String TEXT_190 = ".VISUAL_ID));";
+ protected final String TEXT_191 = NL;
+ protected final String TEXT_192 = NL + "\t\t}";
+ protected final String TEXT_193 = NL + "\t\t}";
+ protected final String TEXT_194 = NL + "\t}";
+ protected final String TEXT_195 = NL + "}" + NL + "" + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "private void createLinks(";
+ protected final String TEXT_196 = " diagram) {" + NL + "\tfor (";
+ protected final String TEXT_197 = " it = myLinkDescriptors.iterator(); it.hasNext();) {" + NL + "\t\tLinkDescriptor nextLinkDescriptor = (LinkDescriptor) it.next();" + NL + "\t\t";
+ protected final String TEXT_198 = " edge = (";
+ protected final String TEXT_199 = ") ViewService.getInstance().createEdge(nextLinkDescriptor.getSemanticAdapter(), diagram, \"\", ";
+ protected final String TEXT_200 = ".APPEND, ";
+ protected final String TEXT_201 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tif (edge != null) {" + NL + "\t\t\tedge.setSource((";
+ protected final String TEXT_202 = ") myEObject2NodeMap.get(nextLinkDescriptor.getSource()));" + NL + "\t\t\tedge.setTarget((";
+ protected final String TEXT_203 = ") myEObject2NodeMap.get(nextLinkDescriptor.getDestination()));" + NL + "\t\t}" + NL + "\t}" + NL + "}" + NL;
+ protected final String TEXT_204 = NL;
+ protected final String TEXT_205 = "/**" + NL + " * @generated" + NL + " */" + NL + "private class LinkDescriptor {" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_206 = " mySource;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_207 = " myDestination;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_208 = " myLinkElement;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate int myVisualID;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_209 = " mySemanticAdapter;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
protected final String TEXT_210 = " source, ";
protected final String TEXT_211 = " destination, ";
- protected final String TEXT_212 = " elementType, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = null;" + NL + "\t\tfinal ";
- protected final String TEXT_213 = " elementTypeCopy = elementType;" + NL + "\t\tmySemanticAdapter = new ";
- protected final String TEXT_214 = "() {" + NL + "\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\tif (";
- protected final String TEXT_215 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\treturn elementTypeCopy;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate LinkDescriptor(";
- protected final String TEXT_216 = " source, ";
- protected final String TEXT_217 = " destination, int linkVID) {" + NL + "\t\tmySource = source;" + NL + "\t\tmyDestination = destination;" + NL + "\t\tmyVisualID = linkVID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_218 = " getSource() {" + NL + "\t\treturn mySource;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_219 = " getDestination() {" + NL + "\t\treturn myDestination;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_220 = " getLinkElement() {" + NL + "\t\treturn myLinkElement;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected int getVisualID() {" + NL + "\t\treturn myVisualID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_221 = " getSemanticAdapter() {" + NL + "\t\treturn mySemanticAdapter;" + NL + "\t}" + NL + "}";
- protected final String TEXT_222 = "\t" + NL + "" + NL + "}";
+ protected final String TEXT_212 = " linkElement, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = linkElement;" + NL + "\t\tmySemanticAdapter = new ";
+ protected final String TEXT_213 = "(linkElement);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
+ protected final String TEXT_214 = " source, ";
+ protected final String TEXT_215 = " destination, ";
+ protected final String TEXT_216 = " elementType, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = null;" + NL + "\t\tfinal ";
+ protected final String TEXT_217 = " elementTypeCopy = elementType;" + NL + "\t\tmySemanticAdapter = new ";
+ protected final String TEXT_218 = "() {" + NL + "\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\tif (";
+ protected final String TEXT_219 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\treturn elementTypeCopy;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate LinkDescriptor(";
+ protected final String TEXT_220 = " source, ";
+ protected final String TEXT_221 = " destination, int linkVID) {" + NL + "\t\tmySource = source;" + NL + "\t\tmyDestination = destination;" + NL + "\t\tmyVisualID = linkVID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_222 = " getSource() {" + NL + "\t\treturn mySource;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_223 = " getDestination() {" + NL + "\t\treturn myDestination;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_224 = " getLinkElement() {" + NL + "\t\treturn myLinkElement;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected int getVisualID() {" + NL + "\t\treturn myVisualID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_225 = " getSemanticAdapter() {" + NL + "\t\treturn mySemanticAdapter;" + NL + "\t}" + NL + "}";
+ protected final String TEXT_226 = "\t" + NL + "" + NL + "}";
protected final String getFeatureValueGetter(String containerName, GenFeature feature, boolean isContainerEObject, ImportAssistant importManager) {
StringBuffer result = new StringBuffer();
@@ -406,7 +410,7 @@ importManager.markImportLocation(stringBuffer);
stringBuffer.append(TEXT_10);
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_11);
- stringBuffer.append(genDiagram.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_12);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_13);
@@ -490,43 +494,45 @@ for (Iterator phantoms = genClass2Phantom.values().iterator(); phantoms.hasNext(
GenTopLevelNode phantomNode = (GenTopLevelNode) phantoms.next();
stringBuffer.append(TEXT_42);
- stringBuffer.append(phantomNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_43);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
stringBuffer.append(TEXT_44);
- stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_45);
- stringBuffer.append(pluginActivatorClass);
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_46);
- stringBuffer.append(phantomNode.getUniqueIdentifier());
+ stringBuffer.append(pluginActivatorClass);
stringBuffer.append(TEXT_47);
+ stringBuffer.append(phantomNode.getUniqueIdentifier());
stringBuffer.append(TEXT_48);
stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_50);
}
if (!genClass2Phantom.isEmpty()) {
- stringBuffer.append(TEXT_50);
+ stringBuffer.append(TEXT_51);
}
// TODO: remove "createLinks()" method - this task should be done by canonicalEditPolicies
- stringBuffer.append(TEXT_51);
+ stringBuffer.append(TEXT_52);
boolean generateGetCompartment = false;
for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.hasNext();) {
GenContainerBase nextContainer = (GenContainerBase) containers.next();
- stringBuffer.append(TEXT_52);
- stringBuffer.append(nextContainer.getUniqueIdentifier());
stringBuffer.append(TEXT_53);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(nextContainer.getUniqueIdentifier());
stringBuffer.append(TEXT_54);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_55);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_56);
{
List genNodes = nextContainer.getContainedNodes();
- stringBuffer.append(TEXT_56);
+ stringBuffer.append(TEXT_57);
Map genFeature2genNodeMap = new LinkedHashMap();
for (int nodeIndex = 0; nodeIndex < genNodes.size(); nodeIndex++) {
@@ -546,9 +552,9 @@ for (int nodeIndex = 0; nodeIndex < genNodes.size(); nodeIndex++) {
Set entrySet = genFeature2genNodeMap.entrySet();
if (entrySet.size() > 0) {
- stringBuffer.append(TEXT_57);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_58);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_59);
}
@@ -558,57 +564,59 @@ for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
Collection genNodesCollection = (Collection) nextEntry.getValue();
if (childMetaFeature.isListType()) {
- stringBuffer.append(TEXT_59);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_60);
- stringBuffer.append(getFeatureValueGetter("modelObject", childMetaFeature, true, importManager));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_61);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(getFeatureValueGetter("modelObject", childMetaFeature, true, importManager));
stringBuffer.append(TEXT_62);
- } else {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_63);
- stringBuffer.append(getFeatureValueGetter("modelObject", childMetaFeature, true, importManager));
+ } else {
stringBuffer.append(TEXT_64);
- }
+ stringBuffer.append(getFeatureValueGetter("modelObject", childMetaFeature, true, importManager));
stringBuffer.append(TEXT_65);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ }
stringBuffer.append(TEXT_66);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(TEXT_67);
boolean generateSwitch = genNodesCollection.size() != 1;
if (generateSwitch) {
- stringBuffer.append(TEXT_67);
+ stringBuffer.append(TEXT_68);
}
for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
GenNode nextNode = (GenNode) genNodesIterator.next();
if (generateSwitch) {
- stringBuffer.append(TEXT_68);
- stringBuffer.append(nextNode.getVisualID());
stringBuffer.append(TEXT_69);
- } else {
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_70);
- stringBuffer.append(nextNode.getVisualID());
+ } else {
stringBuffer.append(TEXT_71);
- }
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_72);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
+ }
stringBuffer.append(TEXT_73);
- stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
stringBuffer.append(TEXT_74);
- stringBuffer.append(pluginActivatorClass);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_75);
- stringBuffer.append(nextNode.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_76);
+ stringBuffer.append(pluginActivatorClass);
stringBuffer.append(TEXT_77);
- if (generateSwitch) {
+ stringBuffer.append(nextNode.getUniqueIdentifier());
stringBuffer.append(TEXT_78);
- }
stringBuffer.append(TEXT_79);
+ if (generateSwitch) {
+ stringBuffer.append(TEXT_80);
+ }
+ stringBuffer.append(TEXT_81);
}
if (generateSwitch) {
- stringBuffer.append(TEXT_80);
+ stringBuffer.append(TEXT_82);
}
if (childMetaFeature.isListType()) {
- stringBuffer.append(TEXT_81);
+ stringBuffer.append(TEXT_83);
}
}
}
@@ -619,58 +627,60 @@ for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
generateGetCompartment = true;
GenCompartment nextCompartment = (GenCompartment) nextNode.getCompartments().get(i);
- stringBuffer.append(TEXT_82);
+ stringBuffer.append(TEXT_84);
stringBuffer.append(i == 0 ? importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node") : "");
- stringBuffer.append(TEXT_83);
+ stringBuffer.append(TEXT_85);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(TEXT_86);
stringBuffer.append(importManager.getImportedName(nextCompartment.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_84);
+ stringBuffer.append(TEXT_87);
stringBuffer.append(nextCompartment.getUniqueIdentifier());
- stringBuffer.append(TEXT_85);
+ stringBuffer.append(TEXT_88);
}
}
if (false == nextContainer instanceof GenCompartment) {
- stringBuffer.append(TEXT_86);
+ stringBuffer.append(TEXT_89);
}
- stringBuffer.append(TEXT_87);
+ stringBuffer.append(TEXT_90);
}
if (generateGetCompartment) {
- stringBuffer.append(TEXT_88);
+ stringBuffer.append(TEXT_91);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
- stringBuffer.append(TEXT_89);
+ stringBuffer.append(TEXT_92);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_90);
+ stringBuffer.append(TEXT_93);
stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
- stringBuffer.append(TEXT_91);
+ stringBuffer.append(TEXT_94);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_92);
+ stringBuffer.append(TEXT_95);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
- stringBuffer.append(TEXT_93);
+ stringBuffer.append(TEXT_96);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
- stringBuffer.append(TEXT_94);
+ stringBuffer.append(TEXT_97);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
- stringBuffer.append(TEXT_95);
+ stringBuffer.append(TEXT_98);
}
- stringBuffer.append(TEXT_96);
- boolean createPhantoms = true;
- stringBuffer.append(TEXT_97);
- stringBuffer.append(TEXT_98);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_99);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram"));
+ boolean createPhantoms = true;
stringBuffer.append(TEXT_100);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
stringBuffer.append(TEXT_101);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_102);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram"));
stringBuffer.append(TEXT_103);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
+ stringBuffer.append(TEXT_104);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_105);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
+ stringBuffer.append(TEXT_106);
for (Iterator it = genLinks.iterator(); it.hasNext();) {
GenLink nextLink = (GenLink) it.next();
@@ -678,85 +688,85 @@ for (Iterator it = genLinks.iterator(); it.hasNext();) {
TypeLinkModelFacet typeLinkModelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
GenFeature childMetaFeature = typeLinkModelFacet.getChildMetaFeature();
- stringBuffer.append(TEXT_104);
- stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
- stringBuffer.append(TEXT_105);
- stringBuffer.append(childMetaFeature.getGenClass().getClassifierAccessorName());
- stringBuffer.append(TEXT_106);
- if (childMetaFeature.isListType()) {
stringBuffer.append(TEXT_107);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
stringBuffer.append(TEXT_108);
- stringBuffer.append(getFeatureValueGetter("container", childMetaFeature, true, importManager));
+ stringBuffer.append(childMetaFeature.getGenClass().getClassifierAccessorName());
stringBuffer.append(TEXT_109);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ if (childMetaFeature.isListType()) {
stringBuffer.append(TEXT_110);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_111);
- } else {
+ stringBuffer.append(getFeatureValueGetter("container", childMetaFeature, true, importManager));
stringBuffer.append(TEXT_112);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_113);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_114);
- stringBuffer.append(getFeatureValueGetter("container", childMetaFeature, true, importManager));
+ } else {
stringBuffer.append(TEXT_115);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_116);
- stringBuffer.append(getFeatureValueGetter("nextValue", typeLinkModelFacet.getTargetMetaFeature(), true, importManager));
- stringBuffer.append(TEXT_117);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_117);
+ stringBuffer.append(getFeatureValueGetter("container", childMetaFeature, true, importManager));
stringBuffer.append(TEXT_118);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ }
stringBuffer.append(TEXT_119);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(getFeatureValueGetter("nextValue", typeLinkModelFacet.getTargetMetaFeature(), true, importManager));
stringBuffer.append(TEXT_120);
- if (typeLinkModelFacet.getSourceMetaFeature() != null) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_121);
- stringBuffer.append(getFeatureValueGetter("nextValue", typeLinkModelFacet.getSourceMetaFeature(), true, importManager));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_122);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_123);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ if (typeLinkModelFacet.getSourceMetaFeature() != null) {
stringBuffer.append(TEXT_124);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(getFeatureValueGetter("nextValue", typeLinkModelFacet.getSourceMetaFeature(), true, importManager));
stringBuffer.append(TEXT_125);
- } else {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_126);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_127);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_128);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ } else {
stringBuffer.append(TEXT_129);
- stringBuffer.append(nextLink.getVisualID());
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_130);
- if (typeLinkModelFacet.getSourceMetaFeature() != null) {
- stringBuffer.append(TEXT_131);
}
+ stringBuffer.append(TEXT_131);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_132);
+ stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_133);
+ if (typeLinkModelFacet.getSourceMetaFeature() != null) {
+ stringBuffer.append(TEXT_134);
+ }
+ stringBuffer.append(TEXT_135);
if (childMetaFeature.isListType()) {
- stringBuffer.append(TEXT_133);
+ stringBuffer.append(TEXT_136);
}
- stringBuffer.append(TEXT_134);
+ stringBuffer.append(TEXT_137);
}
}
- stringBuffer.append(TEXT_135);
+ stringBuffer.append(TEXT_138);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
- stringBuffer.append(TEXT_136);
+ stringBuffer.append(TEXT_139);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
- stringBuffer.append(TEXT_137);
+ stringBuffer.append(TEXT_140);
for (int linkIndex = 0; linkIndex < genLinks.size(); linkIndex++) {
boolean phantomsOnly = true;
- stringBuffer.append(TEXT_138);
+ stringBuffer.append(TEXT_141);
GenLink nextLink = (GenLink) genLinks.get(linkIndex);
if (false == nextLink.getModelFacet() instanceof FeatureModelFacet) {
@@ -770,70 +780,72 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
continue;
}
- stringBuffer.append(TEXT_139);
- stringBuffer.append(importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName()));
- stringBuffer.append(TEXT_140);
- stringBuffer.append(genFeature.getGenClass().getClassifierAccessorName());
- stringBuffer.append(TEXT_141);
- if (genFeature.isListType()) {
stringBuffer.append(TEXT_142);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ stringBuffer.append(importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName()));
stringBuffer.append(TEXT_143);
- stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ stringBuffer.append(genFeature.getGenClass().getClassifierAccessorName());
stringBuffer.append(TEXT_144);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ if (genFeature.isListType()) {
stringBuffer.append(TEXT_145);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_146);
- } else {
+ stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
stringBuffer.append(TEXT_147);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_148);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_149);
- stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ } else {
stringBuffer.append(TEXT_150);
- }
- if (phantomsOnly) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_151);
- stringBuffer.append(phantomNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_152);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
stringBuffer.append(TEXT_153);
}
+ if (phantomsOnly) {
stringBuffer.append(TEXT_154);
- stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_155);
- stringBuffer.append(nextLink.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_156);
- stringBuffer.append(nextLink.getVisualID());
+ }
stringBuffer.append(TEXT_157);
- if (createPhantoms) {
+ stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
stringBuffer.append(TEXT_158);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
+ stringBuffer.append(nextLink.getUniqueIdentifier());
stringBuffer.append(TEXT_159);
- stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_160);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
+ if (createPhantoms) {
stringBuffer.append(TEXT_161);
- stringBuffer.append(phantomNode.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
stringBuffer.append(TEXT_162);
- }
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_163);
- if (phantomsOnly) {
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_164);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
+ stringBuffer.append(TEXT_165);
+ stringBuffer.append(phantomNode.getUniqueIdentifier());
+ stringBuffer.append(TEXT_166);
+ }
+ stringBuffer.append(TEXT_167);
+ if (phantomsOnly) {
+ stringBuffer.append(TEXT_168);
}
if (genFeature.isListType()) {
- stringBuffer.append(TEXT_165);
+ stringBuffer.append(TEXT_169);
}
- stringBuffer.append(TEXT_166);
+ stringBuffer.append(TEXT_170);
}
for (int linkIndex = 0; linkIndex < genLinks.size(); linkIndex++) {
boolean phantomsOnly = false;
- stringBuffer.append(TEXT_167);
+ stringBuffer.append(TEXT_171);
GenLink nextLink = (GenLink) genLinks.get(linkIndex);
if (false == nextLink.getModelFacet() instanceof FeatureModelFacet) {
@@ -847,82 +859,74 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
continue;
}
- stringBuffer.append(TEXT_168);
- stringBuffer.append(importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName()));
- stringBuffer.append(TEXT_169);
- stringBuffer.append(genFeature.getGenClass().getClassifierAccessorName());
- stringBuffer.append(TEXT_170);
- if (genFeature.isListType()) {
- stringBuffer.append(TEXT_171);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_172);
- stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ stringBuffer.append(importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName()));
stringBuffer.append(TEXT_173);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(genFeature.getGenClass().getClassifierAccessorName());
stringBuffer.append(TEXT_174);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ if (genFeature.isListType()) {
stringBuffer.append(TEXT_175);
- } else {
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_176);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
stringBuffer.append(TEXT_177);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_178);
- stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_179);
- }
- if (phantomsOnly) {
+ } else {
stringBuffer.append(TEXT_180);
- stringBuffer.append(phantomNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_181);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_182);
- }
+ stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
stringBuffer.append(TEXT_183);
- stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
+ }
+ if (phantomsOnly) {
stringBuffer.append(TEXT_184);
- stringBuffer.append(nextLink.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_185);
- stringBuffer.append(nextLink.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_186);
+ }
stringBuffer.append(TEXT_187);
- if (phantomsOnly) {
+ stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
stringBuffer.append(TEXT_188);
- }
- if (genFeature.isListType()) {
+ stringBuffer.append(nextLink.getUniqueIdentifier());
stringBuffer.append(TEXT_189);
- }
+ stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_190);
- }
stringBuffer.append(TEXT_191);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram"));
+ if (phantomsOnly) {
stringBuffer.append(TEXT_192);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ }
+ if (genFeature.isListType()) {
stringBuffer.append(TEXT_193);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ }
stringBuffer.append(TEXT_194);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
+ }
stringBuffer.append(TEXT_195);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram"));
stringBuffer.append(TEXT_196);
- stringBuffer.append(pluginActivatorClass);
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_197);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
stringBuffer.append(TEXT_198);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
stringBuffer.append(TEXT_199);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
stringBuffer.append(TEXT_200);
-
-// an inner class
-
+ stringBuffer.append(pluginActivatorClass);
stringBuffer.append(TEXT_201);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
stringBuffer.append(TEXT_202);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
stringBuffer.append(TEXT_203);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_204);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
+
+// an inner class
+
stringBuffer.append(TEXT_205);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_206);
@@ -930,34 +934,42 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
stringBuffer.append(TEXT_207);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_208);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
stringBuffer.append(TEXT_209);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_210);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_211);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_212);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_213);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_214);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
- stringBuffer.append(TEXT_215);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_215);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_216);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_217);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
stringBuffer.append(TEXT_218);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_219);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_220);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_221);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_222);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_223);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_224);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
+ stringBuffer.append(TEXT_225);
+ }
+ stringBuffer.append(TEXT_226);
importManager.emitSortedImports();
return stringBuffer.toString();
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/VisualIDRegistryGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/VisualIDRegistryGenerator.java
index 310b7c73c..5c279a4fa 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/VisualIDRegistryGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/editor/VisualIDRegistryGenerator.java
@@ -25,44 +25,44 @@ public class VisualIDRegistryGenerator
protected final String TEXT_7 = " INSTANCE = new ";
protected final String TEXT_8 = "();" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static int getVisualID(View view) {" + NL + "\t\tif (view instanceof Diagram) {" + NL + "\t\t\tif (";
protected final String TEXT_9 = ".MODEL_ID.equals(view.getType())) {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_10 = ";" + NL + "\t\t\t} else {" + NL + "\t\t\t\treturn -1;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\ttry {" + NL + "\t\t\treturn Integer.parseInt(view.getType());" + NL + "\t\t} catch (NumberFormatException e) {" + NL + "\t\t\t";
- protected final String TEXT_11 = ".getInstance().logInfo(\"Unable to parse view type as a visualID number: \" + view.getType());" + NL + "\t\t}" + NL + "\t\treturn -1;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String getModelID(View view) {" + NL + "\t\tView diagram = view.getDiagram();" + NL + "\t\twhile (view != diagram) {" + NL + "\t\t\t";
- protected final String TEXT_12 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\t\tif (annotation != null) {" + NL + "\t\t\t\treturn (String) annotation.getDetails().get(\"modelID\"); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t\tview = (View) view.eContainer();" + NL + "\t\t}" + NL + "\t\treturn diagram != null ? diagram.getType() : null;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getDiagramVisualID(EObject domainElement) {" + NL + "\t\tif (domainElement == null) {" + NL + "\t\t\treturn -1;" + NL + "\t\t}" + NL + "\t\tEClass domainElementMetaclass = domainElement.eClass();" + NL + "\t\treturn getDiagramVisualID(domainElement, domainElementMetaclass);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getDiagramVisualID(EObject domainElement, EClass domainElementMetaclass) {";
+ protected final String TEXT_10 = ".VISUAL_ID;" + NL + "\t\t\t} else {" + NL + "\t\t\t\treturn -1;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getVisualID(view.getType());" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String getModelID(View view) {" + NL + "\t\tView diagram = view.getDiagram();" + NL + "\t\twhile (view != diagram) {" + NL + "\t\t\t";
+ protected final String TEXT_11 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\t\tif (annotation != null) {" + NL + "\t\t\t\treturn (String) annotation.getDetails().get(\"modelID\"); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t\tview = (View) view.eContainer();" + NL + "\t\t}" + NL + "\t\treturn diagram != null ? diagram.getType() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static int getVisualID(String type) {" + NL + "\t\ttry {" + NL + "\t\t\treturn Integer.parseInt(type);" + NL + "\t\t} catch (NumberFormatException e) {" + NL + "\t\t\t";
+ protected final String TEXT_12 = ".getInstance().logInfo(\"Unable to parse view type as a visualID number: \" + type);" + NL + "\t\t}" + NL + "\t\treturn -1;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String getType(int visualID) {" + NL + "\t\treturn String.valueOf(visualID);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getDiagramVisualID(EObject domainElement) {" + NL + "\t\tif (domainElement == null) {" + NL + "\t\t\treturn -1;" + NL + "\t\t}" + NL + "\t\tEClass domainElementMetaclass = domainElement.eClass();" + NL + "\t\treturn getDiagramVisualID(domainElement, domainElementMetaclass);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getDiagramVisualID(EObject domainElement, EClass domainElementMetaclass) {";
protected final String TEXT_13 = NL + "\t\tif (";
protected final String TEXT_14 = ".eINSTANCE.get";
protected final String TEXT_15 = "().equals(domainElementMetaclass) && (domainElement == null || isDiagram";
protected final String TEXT_16 = "((";
protected final String TEXT_17 = ") domainElement))) {" + NL + "\t\t\treturn ";
- protected final String TEXT_18 = ";" + NL + "\t\t}";
+ protected final String TEXT_18 = ".VISUAL_ID;" + NL + "\t\t}";
protected final String TEXT_19 = NL + "\t\treturn getUnrecognizedDiagramID(domainElement);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getNodeVisualID(View containerView, EObject domainElement) {" + NL + "\t\tif (domainElement == null) {" + NL + "\t\t\treturn -1;" + NL + "\t\t}" + NL + "\t\tEClass domainElementMetaclass = domainElement.eClass();" + NL + "\t\treturn getNodeVisualID(containerView, domainElement, domainElementMetaclass, null);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getNodeVisualID(View containerView, EObject domainElement, EClass domainElementMetaclass, String semanticHint) {" + NL + "\t\tString containerModelID = getModelID(containerView);" + NL + "\t\tif (!";
protected final String TEXT_20 = ".MODEL_ID.equals(containerModelID)";
protected final String TEXT_21 = "\t\t\t" + NL + "\t\t\t&& !\"";
protected final String TEXT_22 = "\".equals(containerModelID)";
protected final String TEXT_23 = NL + "\t\t) {" + NL + "\t\t\treturn -1;" + NL + "\t\t}" + NL + "\t\tint containerVisualID;" + NL + "\t\tif (";
protected final String TEXT_24 = ".MODEL_ID.equals(containerModelID)) {" + NL + "\t\t\tcontainerVisualID = getVisualID(containerView);" + NL + "\t\t} else {" + NL + "\t\t\tif (containerView instanceof Diagram) {" + NL + "\t\t\t\tcontainerVisualID = ";
- protected final String TEXT_25 = ";\t\t" + NL + "\t\t\t} else {" + NL + "\t\t\t\treturn -1;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tswitch (containerVisualID) {";
+ protected final String TEXT_25 = ".VISUAL_ID;\t\t" + NL + "\t\t\t} else {" + NL + "\t\t\t\treturn -1;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tint nodeVisualID = getVisualID(semanticHint);" + NL + "\t\tswitch (containerVisualID) {";
protected final String TEXT_26 = NL + "\t\tcase ";
- protected final String TEXT_27 = ":";
+ protected final String TEXT_27 = ".VISUAL_ID:";
protected final String TEXT_28 = NL + "\t\t\tif (";
- protected final String TEXT_29 = ".VISUAL_ID.equals(semanticHint)) {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_30 = ";" + NL + "\t\t\t}";
+ protected final String TEXT_29 = ".VISUAL_ID == nodeVisualID) {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_30 = ".VISUAL_ID;" + NL + "\t\t\t}";
protected final String TEXT_31 = NL + "\t\t\tif (";
- protected final String TEXT_32 = ".VISUAL_ID.equals(semanticHint)) {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_33 = ";" + NL + "\t\t\t} ";
+ protected final String TEXT_32 = ".VISUAL_ID == nodeVisualID) {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_33 = ".VISUAL_ID;" + NL + "\t\t\t} ";
protected final String TEXT_34 = "\t\t" + NL + "\t\t\tif ((semanticHint == null || ";
- protected final String TEXT_35 = ".VISUAL_ID.equals(semanticHint)) && ";
+ protected final String TEXT_35 = ".VISUAL_ID == nodeVisualID) && ";
protected final String TEXT_36 = ".eINSTANCE.get";
protected final String TEXT_37 = "().equals(domainElementMetaclass) && (domainElement == null || isNode";
protected final String TEXT_38 = "((";
protected final String TEXT_39 = ") domainElement))) {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_40 = ";" + NL + "\t\t\t} ";
+ protected final String TEXT_40 = ".VISUAL_ID;" + NL + "\t\t\t} ";
protected final String TEXT_41 = NL + "\t\t\treturn getUnrecognized";
protected final String TEXT_42 = "ChildNodeID(domainElement, semanticHint);";
protected final String TEXT_43 = NL + "\t\tcase ";
- protected final String TEXT_44 = ":";
+ protected final String TEXT_44 = ".VISUAL_ID:";
protected final String TEXT_45 = NL + "\t\t\tif (";
- protected final String TEXT_46 = ".VISUAL_ID.equals(semanticHint)) {" + NL + "\t\t\t\treturn ";
- protected final String TEXT_47 = ";" + NL + "\t\t\t}";
+ protected final String TEXT_46 = ".VISUAL_ID == nodeVisualID) {" + NL + "\t\t\t\treturn ";
+ protected final String TEXT_47 = ".VISUAL_ID;" + NL + "\t\t\t}";
protected final String TEXT_48 = NL + "\t\t\treturn getUnrecognized";
protected final String TEXT_49 = "LinkLabelID(semanticHint);";
protected final String TEXT_50 = NL + "\t\t}" + NL + "\t\treturn -1;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getLinkWithClassVisualID(EObject domainElement) {" + NL + "\t\tEClass domainElementMetaclass = domainElement.eClass();" + NL + "\t\treturn getLinkWithClassVisualID(domainElement, domainElementMetaclass);" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getLinkWithClassVisualID(EObject domainElement, EClass domainElementMetaclass) {";
@@ -71,7 +71,7 @@ public class VisualIDRegistryGenerator
protected final String TEXT_53 = "().equals(domainElementMetaclass) && (domainElement == null || isLinkWithClass";
protected final String TEXT_54 = "((";
protected final String TEXT_55 = ") domainElement))) {" + NL + "\t\t\treturn ";
- protected final String TEXT_56 = ";" + NL + "\t\t} else ";
+ protected final String TEXT_56 = ".VISUAL_ID;" + NL + "\t\t} else ";
protected final String TEXT_57 = NL + "\t\t{" + NL + "\t\t\treturn getUnrecognizedLinkWithClassID(domainElement);" + NL + "\t\t}" + NL + "\t}\t" + NL;
protected final String TEXT_58 = NL + "\t/**" + NL + "\t * User can change implementation of this method to check some additional " + NL + "\t * conditions here." + NL + "\t *" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate boolean isDiagram";
protected final String TEXT_59 = "(";
@@ -143,11 +143,11 @@ importManager.markImportLocation(stringBuffer);
stringBuffer.append(TEXT_8);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_9);
- stringBuffer.append(genDiagram.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_10);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
- stringBuffer.append(TEXT_11);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation"));
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
stringBuffer.append(TEXT_12);
if (genDiagram.getDomainDiagramElement() != null) {
@@ -163,7 +163,7 @@ if (genDiagram.getDomainDiagramElement() != null) {
stringBuffer.append(TEXT_16);
stringBuffer.append(interfaceName);
stringBuffer.append(TEXT_17);
- stringBuffer.append(genDiagram.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_18);
}
stringBuffer.append(TEXT_19);
@@ -185,14 +185,14 @@ for (Iterator it = genDiagram.getShortcutsProvidedFor().iterator(); it.hasNext()
stringBuffer.append(TEXT_23);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_24);
- stringBuffer.append(genDiagram.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_25);
for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
GenContainerBase nextContainer = (GenContainerBase) containers.next();
stringBuffer.append(TEXT_26);
- stringBuffer.append(nextContainer.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextContainer.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_27);
if (nextContainer instanceof GenNode) {
@@ -203,7 +203,7 @@ for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
stringBuffer.append(TEXT_28);
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_29);
- stringBuffer.append(label.getVisualID());
+ stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_30);
}
@@ -213,7 +213,7 @@ for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
stringBuffer.append(TEXT_31);
stringBuffer.append(importManager.getImportedName(compartment.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_32);
- stringBuffer.append(compartment.getVisualID());
+ stringBuffer.append(importManager.getImportedName(compartment.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_33);
}
@@ -236,7 +236,7 @@ for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
stringBuffer.append(TEXT_38);
stringBuffer.append(interfaceName);
stringBuffer.append(TEXT_39);
- stringBuffer.append(childNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(childNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_40);
}
@@ -250,7 +250,7 @@ for (Iterator links = genLinks.iterator(); links.hasNext();) {
GenLink link = (GenLink) links.next();
stringBuffer.append(TEXT_43);
- stringBuffer.append(link.getVisualID());
+ stringBuffer.append(importManager.getImportedName(link.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_44);
for (Iterator linkLabels = link.getLabels().iterator(); linkLabels.hasNext();) {
@@ -259,7 +259,7 @@ for (Iterator links = genLinks.iterator(); links.hasNext();) {
stringBuffer.append(TEXT_45);
stringBuffer.append(importManager.getImportedName(linkLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_46);
- stringBuffer.append(linkLabel.getVisualID());
+ stringBuffer.append(importManager.getImportedName(linkLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_47);
}
stringBuffer.append(TEXT_48);
@@ -285,7 +285,7 @@ for (int i = 0; i < genLinks.size(); i++) {
stringBuffer.append(TEXT_54);
stringBuffer.append(importManager.getImportedName(qualifiedInterfaceName));
stringBuffer.append(TEXT_55);
- stringBuffer.append(genLink.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_56);
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ChildNodeEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ChildNodeEditPartGenerator.java
index d1e901a87..de0dda61d 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ChildNodeEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ChildNodeEditPartGenerator.java
@@ -24,8 +24,8 @@ public class ChildNodeEditPartGenerator
protected final String TEXT_7 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_8 = " extends CompartmentEditPart implements ITextAwareEditPart {";
protected final String TEXT_9 = NL;
- protected final String TEXT_10 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_11 = "\";";
+ protected final String TEXT_10 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_11 = ";";
protected final String TEXT_12 = NL;
protected final String TEXT_13 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_14 = " manager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/CompartmentEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/CompartmentEditPartGenerator.java
index 9f8c46241..bbb4cafd7 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/CompartmentEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/CompartmentEditPartGenerator.java
@@ -26,8 +26,8 @@ public class CompartmentEditPartGenerator {
protected final String TEXT_8 = " extends ";
protected final String TEXT_9 = " {";
protected final String TEXT_10 = NL;
- protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_12 = "\";";
+ protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_12 = ";";
protected final String TEXT_13 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
protected final String TEXT_14 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}";
protected final String TEXT_15 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean hasModelChildrenChanged(";
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/DiagramEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/DiagramEditPartGenerator.java
index bdbdda3af..e33ec83ca 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/DiagramEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/DiagramEditPartGenerator.java
@@ -23,11 +23,15 @@ public class DiagramEditPartGenerator
protected final String TEXT_6 = NL + "import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;" + NL + "import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;" + NL + "import org.eclipse.gmf.runtime.notation.View;";
protected final String TEXT_7 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_8 = " extends DiagramEditPart {" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String MODEL_ID = \"";
- protected final String TEXT_9 = "\";" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_10 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ";
- protected final String TEXT_11 = "());" + NL + "\t\tinstallEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ";
- protected final String TEXT_12 = "());" + NL + "\t}" + NL + "}";
- protected final String TEXT_13 = NL;
+ protected final String TEXT_9 = "\";";
+ protected final String TEXT_10 = NL;
+ protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_12 = ";";
+ protected final String TEXT_13 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_14 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ";
+ protected final String TEXT_15 = "());" + NL + "\t\tinstallEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ";
+ protected final String TEXT_16 = "());" + NL + "\t}" + NL + "}";
+ protected final String TEXT_17 = NL;
public String generate(Object argument)
{
@@ -55,14 +59,22 @@ if (copyrightText != null && copyrightText.trim().length() > 0) {
stringBuffer.append(TEXT_8);
stringBuffer.append(genDiagram.getEditorGen().getModelID());
stringBuffer.append(TEXT_9);
- stringBuffer.append(genDiagram.getEditPartClassName());
+ {
+GenCommonBase genCommonBase = genDiagram;
stringBuffer.append(TEXT_10);
- stringBuffer.append(importManager.getImportedName(genDiagram.getItemSemanticEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_11);
- stringBuffer.append(importManager.getImportedName(genDiagram.getCanonicalEditPolicyQualifiedClassName()));
+ stringBuffer.append(genCommonBase.getVisualID());
stringBuffer.append(TEXT_12);
- importManager.emitSortedImports();
+ }
stringBuffer.append(TEXT_13);
+ stringBuffer.append(genDiagram.getEditPartClassName());
+ stringBuffer.append(TEXT_14);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getItemSemanticEditPolicyQualifiedClassName()));
+ stringBuffer.append(TEXT_15);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getCanonicalEditPolicyQualifiedClassName()));
+ stringBuffer.append(TEXT_16);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_17);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/EditPartFactoryGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/EditPartFactoryGenerator.java
index 855dbb89a..733bed9c7 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/EditPartFactoryGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/EditPartFactoryGenerator.java
@@ -28,16 +28,16 @@ public class EditPartFactoryGenerator
protected final String TEXT_10 = ".getModelID(view))) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t" + NL + "\t\t\tint viewVisualID = ";
protected final String TEXT_11 = ".getVisualID(view);" + NL + "\t\t\tswitch (viewVisualID) {";
protected final String TEXT_12 = NL + "\t\t\tcase ";
- protected final String TEXT_13 = ":" + NL + "\t\t\t\t return new ";
+ protected final String TEXT_13 = ".VISUAL_ID:" + NL + "\t\t\t\t return new ";
protected final String TEXT_14 = "(view);";
protected final String TEXT_15 = NL + "\t\t\tcase ";
- protected final String TEXT_16 = ":" + NL + "\t\t\t\treturn new ";
+ protected final String TEXT_16 = ".VISUAL_ID:" + NL + "\t\t\t\treturn new ";
protected final String TEXT_17 = "(view);";
protected final String TEXT_18 = "\t\t" + NL + "\t\t\tcase ";
- protected final String TEXT_19 = ":" + NL + "\t\t\t\treturn new ";
+ protected final String TEXT_19 = ".VISUAL_ID:" + NL + "\t\t\t\treturn new ";
protected final String TEXT_20 = "(view);";
protected final String TEXT_21 = NL + "\t\t\tcase ";
- protected final String TEXT_22 = ":" + NL + "\t\t\t\treturn new ";
+ protected final String TEXT_22 = ".VISUAL_ID:" + NL + "\t\t\t\treturn new ";
protected final String TEXT_23 = "(view);";
protected final String TEXT_24 = NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn createUnrecognizedEditPart(context, model);" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\t private EditPart createUnrecognizedEditPart(EditPart context, Object model) {" + NL + "\t \t// Handle creation of unrecognized child node EditParts here" + NL + "\t \treturn null;" + NL + "\t }" + NL + "" + NL + "\tpublic static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source){" + NL + " if (source.getFigure() instanceof WrapLabel)" + NL + " return new TextCellEditorLocator((WrapLabel) source.getFigure());" + NL + " else {" + NL + " IFigure figure = source.getFigure();" + NL + " return new LabelCellEditorLocator((Label) figure);" + NL + " }" + NL + " }" + NL + "" + NL + "\tstatic private class TextCellEditorLocator implements CellEditorLocator {" + NL + "" + NL + "\t\tprivate WrapLabel wrapLabel;" + NL + "\t\t" + NL + "\t\tpublic TextCellEditorLocator(WrapLabel wrapLabel) {" + NL + "\t\t\tsuper();" + NL + "\t\t\tthis.wrapLabel = wrapLabel;" + NL + "\t\t}" + NL + "" + NL + "\t\t" + NL + "\t\tpublic WrapLabel getWrapLabel() {" + NL + "\t\t\treturn wrapLabel;" + NL + "\t\t}" + NL + "" + NL + "\t\tpublic void relocate(CellEditor celleditor) {" + NL + "\t\t\tText text = (Text) celleditor.getControl();" + NL + "\t\t\tRectangle rect = getWrapLabel().getTextBounds().getCopy();" + NL + "\t\t\tgetWrapLabel().translateToAbsolute(rect);" + NL + "\t\t\t" + NL + "\t\t\tif (getWrapLabel().isTextWrapped() && getWrapLabel().getText().length() > 0)" + NL + "\t\t\t\trect.setSize(new Dimension(text.computeSize(rect.width, SWT.DEFAULT)));" + NL + "\t\t\telse {" + NL + "\t\t\t\tint avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();" + NL + "\t\t\t\trect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr*2, 0));" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tif (!rect.equals(new Rectangle(text.getBounds())))" + NL + "\t\t\t\ttext.setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t}" + NL + "" + NL + "\t}" + NL + "" + NL + "\tprivate static class LabelCellEditorLocator implements CellEditorLocator {" + NL + "" + NL + "\t\tprivate Label label;" + NL + "" + NL + "\t\tpublic LabelCellEditorLocator(Label label) {" + NL + "\t\t\tthis.label = label;" + NL + "\t\t}" + NL + "" + NL + "\t\tpublic Label getLabel() {" + NL + "\t\t\treturn label;" + NL + "\t\t}" + NL + "" + NL + "\t\tpublic void relocate(CellEditor celleditor) {" + NL + "\t\t\tText text = (Text) celleditor.getControl();" + NL + "\t\t\tRectangle rect = getLabel().getTextBounds().getCopy();" + NL + "\t\t\tgetLabel().translateToAbsolute(rect);" + NL + "" + NL + "\t\t\tint avr = FigureUtilities.getFontMetrics(text.getFont()).getAverageCharWidth();" + NL + "\t\t\trect.setSize(new Dimension(text.computeSize(SWT.DEFAULT, SWT.DEFAULT)).expand(avr * 2, 0));" + NL + "" + NL + "\t\t\tif (!rect.equals(new Rectangle(text.getBounds())))" + NL + "\t\t\t\ttext.setBounds(rect.x, rect.y, rect.width, rect.height);" + NL + "\t\t}" + NL + "\t}" + NL + "}";
protected final String TEXT_25 = NL;
@@ -80,7 +80,7 @@ for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.
GenContainerBase container = (GenContainerBase) containers.next();
stringBuffer.append(TEXT_12);
- stringBuffer.append(container.getVisualID());
+ stringBuffer.append(importManager.getImportedName(container.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_13);
stringBuffer.append(container.getEditPartClassName());
stringBuffer.append(TEXT_14);
@@ -91,7 +91,7 @@ for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.
GenNodeLabel label = (GenNodeLabel) labels.next();
stringBuffer.append(TEXT_15);
- stringBuffer.append(label.getVisualID());
+ stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_16);
stringBuffer.append(label.getEditPartClassName());
stringBuffer.append(TEXT_17);
@@ -103,7 +103,7 @@ for (Iterator links = genDiagram.getLinks().iterator(); links.hasNext();) {
GenLink link = (GenLink) links.next();
stringBuffer.append(TEXT_18);
- stringBuffer.append(link.getVisualID());
+ stringBuffer.append(importManager.getImportedName(link.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_19);
stringBuffer.append(link.getEditPartClassName());
stringBuffer.append(TEXT_20);
@@ -112,7 +112,7 @@ for (Iterator links = genDiagram.getLinks().iterator(); links.hasNext();) {
GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next();
stringBuffer.append(TEXT_21);
- stringBuffer.append(linkLabel.getVisualID());
+ stringBuffer.append(importManager.getImportedName(linkLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_22);
stringBuffer.append(linkLabel.getEditPartClassName());
stringBuffer.append(TEXT_23);
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ExternalNodeLabelEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ExternalNodeLabelEditPartGenerator.java
index 327187897..9869ed0f3 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ExternalNodeLabelEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/ExternalNodeLabelEditPartGenerator.java
@@ -25,151 +25,152 @@ public class ExternalNodeLabelEditPartGenerator
protected final String TEXT_8 = " extends ";
protected final String TEXT_9 = " implements ITextAwareEditPart {";
protected final String TEXT_10 = NL;
- protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_12 = "\";";
+ protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_12 = ";";
protected final String TEXT_13 = NL;
protected final String TEXT_14 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_15 = " manager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_16 = " parser;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_17 = " parserElements;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate String defaultText;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tstatic {" + NL + "\t\tregisterSnapBackPosition(";
- protected final String TEXT_18 = ".VISUAL_ID, new Point(0, 0));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_19 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());" + NL + "\t}";
- protected final String TEXT_20 = NL;
- protected final String TEXT_21 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_22 = " getLabelIcon() {" + NL + "\t\treturn null;" + NL + "\t}";
- protected final String TEXT_23 = NL;
- protected final String TEXT_24 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelTextHelper(";
- protected final String TEXT_25 = " figure) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_26 = ") {" + NL + "\t\t\treturn ((";
- protected final String TEXT_27 = ") figure).getText();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
- protected final String TEXT_28 = ") figure).getText();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelTextHelper(";
- protected final String TEXT_29 = " figure, String text) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_30 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_31 = ") figure).setText(text);" + NL + "\t\t} else {" + NL + "\t\t\t((";
- protected final String TEXT_32 = ") figure).setText(text);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Image getLabelIconHelper(";
- protected final String TEXT_33 = " figure) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_34 = ") {" + NL + "\t\t\treturn ((";
- protected final String TEXT_35 = ") figure).getIcon();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
- protected final String TEXT_36 = ") figure).getIcon();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelIconHelper(";
- protected final String TEXT_37 = " figure, Image icon) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_38 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_39 = ") figure).setIcon(icon);" + NL + "\t\t} else {" + NL + "\t\t\t((";
- protected final String TEXT_40 = ") figure).setIcon(icon);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabel(";
- protected final String TEXT_41 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);" + NL + "\t\tdefaultText = getLabelTextHelper(figure);" + NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_42 = " getModelChildren() {" + NL + "\t\treturn ";
- protected final String TEXT_43 = ".EMPTY_LIST;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_44 = " getChildBySemanticHint(String semanticHint) {" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t";
- protected final String TEXT_45 = " element = resolveSemanticElement();" + NL + "\t\tString text = null;" + NL + "\t\tif (element != null && getParser() != null) {" + NL + "\t\t\ttext = getParser().getPrintString(new ";
- protected final String TEXT_46 = "(element)," + NL + "\t\t\t\tgetParserOptions().intValue());" + NL + "\t\t}" + NL + "\t\tif (text == null || text.length() == 0) {" + NL + "\t\t\ttext = defaultText;" + NL + "\t\t}" + NL + "\t\treturn text;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabelText(String text) {" + NL + "\t\tsetLabelTextHelper(getFigure(), text);" + NL + "\t\tObject pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
- protected final String TEXT_47 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_48 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String getEditText() {" + NL + "\t\t";
- protected final String TEXT_49 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn \"\";" + NL + "\t\t}" + NL + "\t\treturn getParser().getEditString(new ";
- protected final String TEXT_50 = "(element)," + NL + "\t\t\tgetParserOptions().intValue());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isEditable() {";
- protected final String TEXT_51 = NL + "\t\t";
- protected final String TEXT_52 = " element = resolveSemanticElement();" + NL + "\t\tif (element != null && getEditText() != null) {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
- protected final String TEXT_53 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_54 = " getEditTextValidator() {" + NL + "\t\treturn new ";
- protected final String TEXT_55 = "() {" + NL + "" + NL + "\t\t\tpublic String isValid(final Object value) {" + NL + "\t\t\t\tif (value instanceof String) {" + NL + "\t\t\t\t\tfinal ";
- protected final String TEXT_56 = " element = resolveSemanticElement();" + NL + "\t\t\t\t\tfinal ";
- protected final String TEXT_57 = " parser = getParser();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t";
- protected final String TEXT_58 = " valid =" + NL + "\t\t\t\t\t\t\t(";
- protected final String TEXT_59 = ") getEditingDomain().runExclusive(" + NL + "\t\t\t\t\t\t\t\tnew ";
- protected final String TEXT_60 = ".Impl() {" + NL + "" + NL + "\t\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\t\tsetResult(parser.isValidEditString(" + NL + "\t\t\t\t\t\t\t\t\tnew ";
- protected final String TEXT_61 = "(element), (String) value));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t});" + NL + "\t\t\t\t\t\treturn valid.getCode() == ";
- protected final String TEXT_62 = ".EDITABLE ?" + NL + "\t\t\t\t\t\t\tnull : valid.getMessage();" + NL + "\t\t\t\t\t} catch (InterruptedException ie) {" + NL + "\t\t\t\t\t\tie.printStackTrace();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// shouldn't get here" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_63 = " getCompletionProcessor() {" + NL + "\t\t";
- protected final String TEXT_64 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn getParser().getCompletionProcessor(new ";
- protected final String TEXT_65 = "(element));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_66 = " getParserOptions() {" + NL + "\t\treturn ";
- protected final String TEXT_67 = ".NONE;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_68 = " getParser() {" + NL + "\t\tif (parser == null) {" + NL + "\t\t\tString parserHint = ((";
- protected final String TEXT_69 = ") getModel()).getType();" + NL + "\t\t\t";
- protected final String TEXT_70 = " element = resolveSemanticElement();" + NL + "\t\t\tif (element != null) {" + NL + "\t\t\t\t";
- protected final String TEXT_71 = " hintAdapter =" + NL + "\t\t\t\t\tnew ";
- protected final String TEXT_72 = "(element, parserHint) {" + NL + "" + NL + "\t\t\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\t\t\tif (";
- protected final String TEXT_73 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\t\t\treturn ";
- protected final String TEXT_74 = ".";
- protected final String TEXT_75 = ";" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getAdapter(adapter);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tparser = ";
- protected final String TEXT_76 = ".getInstance().getParser(hintAdapter);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn parser;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_77 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tsetManager(new ";
- protected final String TEXT_78 = "(this," + NL + "\t\t\t\t";
- protected final String TEXT_79 = ".getTextCellEditorClass(this)," + NL + "\t\t\t\t";
- protected final String TEXT_80 = ".getTextCellEditorLocator(this)));" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setManager(";
- protected final String TEXT_81 = " manager) {" + NL + "\t\tthis.manager = manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit(";
- protected final String TEXT_82 = " eventLocation) {" + NL + "\t\tif (getManager().getClass() == ";
- protected final String TEXT_83 = ".class) {" + NL + "\t\t\t((";
- protected final String TEXT_84 = ") getManager()).show(eventLocation.getSWTPoint());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void performDirectEdit(char initialCharacter) {" + NL + "\t\tif (getManager() instanceof ";
- protected final String TEXT_85 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_86 = ") getManager()).show(initialCharacter);" + NL + "\t\t} else {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEditRequest(";
- protected final String TEXT_87 = " request) {" + NL + "\t\tfinal ";
- protected final String TEXT_88 = " theRequest = request;" + NL + "\t\ttry {" + NL + "\t\t\tgetEditingDomain().runExclusive(new Runnable() {" + NL + "" + NL + "\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\tif (isActive() && isEditable()) {" + NL + "\t\t\t\t\t\tif (theRequest.getExtendedData().get(";
- protected final String TEXT_89 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {" + NL + "\t\t\t\t\t\t\tCharacter initialChar = (Character) theRequest.getExtendedData().get(";
- protected final String TEXT_90 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);" + NL + "\t\t\t\t\t\t\tperformDirectEdit(initialChar.charValue());" + NL + "\t\t\t\t\t\t} else if ((theRequest instanceof ";
- protected final String TEXT_91 = ") && (getEditText().equals(getLabelText()))) {" + NL + "\t\t\t\t\t\t\t";
- protected final String TEXT_92 = " editRequest =" + NL + "\t\t\t\t\t\t\t\t(";
- protected final String TEXT_93 = ") theRequest;" + NL + "\t\t\t\t\t\t\tperformDirectEdit(editRequest.getLocation());" + NL + "\t\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t\tperformDirectEdit();" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t} catch (InterruptedException e) {" + NL + "\t\t\te.printStackTrace();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshUnderline();" + NL + "\t\trefreshStrikeThrough();";
- protected final String TEXT_94 = NL + "\t\trefreshBounds();";
- protected final String TEXT_95 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tsetLabelTextHelper(getFigure(), getLabelText());" + NL + "\t\tsetLabelIconHelper(getFigure(), getLabelIcon());" + NL + "\t\tObject pdEditPolicy = getEditPolicy(";
- protected final String TEXT_96 = ".PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
- protected final String TEXT_97 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_98 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshUnderline() {" + NL + "\t\t";
- protected final String TEXT_99 = " style =" + NL + "\t\t\t(";
- protected final String TEXT_100 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
- protected final String TEXT_101 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
- protected final String TEXT_102 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_103 = ") getFigure()).setTextUnderline(style.isUnderline());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshStrikeThrough() {" + NL + "\t\t";
- protected final String TEXT_104 = " style =" + NL + "\t\t\t(";
- protected final String TEXT_105 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
- protected final String TEXT_106 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
- protected final String TEXT_107 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_108 = ") getFigure()).setTextStrikeThrough(style.isStrikeThrough());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t";
- protected final String TEXT_109 = " style =" + NL + "\t\t\t(";
- protected final String TEXT_110 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
- protected final String TEXT_111 = ".eINSTANCE.getFontStyle());" + NL + "\t\t";
- protected final String TEXT_112 = " fontData;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tfontData = new ";
- protected final String TEXT_113 = "(" + NL + "\t\t\t\tstyle.getFontName(), style.getFontHeight()," + NL + "\t\t\t\t(style.isBold() ? ";
- protected final String TEXT_114 = ".BOLD : ";
- protected final String TEXT_115 = ".NORMAL) |" + NL + "\t\t\t\t(style.isItalic() ? ";
- protected final String TEXT_116 = ".ITALIC : ";
- protected final String TEXT_117 = ".NORMAL));" + NL + "\t\t} else {" + NL + "\t\t\t// initialize font to defaults" + NL + "\t\t\tfontData = ";
- protected final String TEXT_118 = ".getFontData(" + NL + "\t\t\t\t(";
- protected final String TEXT_119 = ") getDiagramPreferencesHint().getPreferenceStore()," + NL + "\t\t\t\t";
- protected final String TEXT_120 = ".PREF_DEFAULT_FONT);" + NL + "\t\t}" + NL + "\t\tsetFont(fontData);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setFontColor(";
- protected final String TEXT_121 = " color) {" + NL + "\t\tgetFigure().setForegroundColor(color);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addSemanticListeners() {" + NL + "\t\tif (getParser() instanceof ";
- protected final String TEXT_122 = ") {" + NL + "\t\t\t";
- protected final String TEXT_123 = " element = resolveSemanticElement();" + NL + "\t\t\tparserElements = ((";
- protected final String TEXT_124 = ") getParser()).getSemanticElementsBeingParsed(element);" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\taddListenerFilter(\"SemanticModel\" + i, this, (";
- protected final String TEXT_125 = ") parserElements.get(i)); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.addSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeSemanticListeners() {" + NL + "\t\tif (parserElements != null) {" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\tremoveListenerFilter(\"SemanticModel\" + i); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_126 = " getAccessibleEditPart() {" + NL + "\t\tif (accessibleEP == null) {" + NL + "\t\t\taccessibleEP = new AccessibleGraphicalEditPart() {" + NL + "" + NL + "\t\t\t\tpublic void getName(";
- protected final String TEXT_127 = " e) {" + NL + "\t\t\t\t\te.result = getLabelTextHelper(getFigure());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn accessibleEP;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleNotificationEvent(";
- protected final String TEXT_128 = " event) {" + NL + "\t\tObject feature = event.getFeature();";
- protected final String TEXT_129 = NL;
- protected final String TEXT_130 = "\t\tif (";
- protected final String TEXT_131 = ".eINSTANCE.getFontStyle_FontColor().equals(feature)) {" + NL + "\t\t\tInteger c = (Integer) event.getNewValue();" + NL + "\t\t\tsetFontColor(";
- protected final String TEXT_132 = ".getInstance().getColor(c));" + NL + "\t\t} else if (";
- protected final String TEXT_133 = ".eINSTANCE.getFontStyle_Underline().equals(feature)) {" + NL + "\t\t\trefreshUnderline();" + NL + "\t\t} else if (";
- protected final String TEXT_134 = ".eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {" + NL + "\t\t\trefreshStrikeThrough();" + NL + "\t\t} else if (";
- protected final String TEXT_135 = ".eINSTANCE.getFontStyle_FontHeight().equals(feature) ||" + NL + "\t\t\t\t";
- protected final String TEXT_136 = ".eINSTANCE.getFontStyle_FontName().equals(feature) ||" + NL + "\t\t\t\t";
- protected final String TEXT_137 = ".eINSTANCE.getFontStyle_Bold().equals(feature) ||" + NL + "\t\t\t\t";
- protected final String TEXT_138 = ".eINSTANCE.getFontStyle_Italic().equals(feature)) {" + NL + "\t\t\trefreshFont();" + NL + "\t\t} else {" + NL + "\t\t\tif (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {" + NL + "\t\t\t\trefreshLabel();" + NL + "\t\t\t}" + NL + "\t\t\tif (getParser() instanceof ISemanticParser) {" + NL + "\t\t\t\t";
- protected final String TEXT_139 = " modelParser =" + NL + "\t\t\t\t\t(";
- protected final String TEXT_140 = ") getParser();" + NL + "\t\t\t\tif (modelParser.areSemanticElementsAffected(null, event)) {" + NL + "\t\t\t\t\tremoveSemanticListeners();" + NL + "\t\t\t\t\tif (resolveSemanticElement() != null) {" + NL + "\t\t\t\t\t\taddSemanticListeners();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\trefreshLabel();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.handleNotificationEvent(event);" + NL + "\t}";
- protected final String TEXT_141 = NL;
- protected final String TEXT_142 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_143 = " createFigure() {" + NL + "\t\t";
- protected final String TEXT_144 = " label = createFigurePrim();" + NL + "\t\tdefaultText = getLabelTextHelper(label);" + NL + "\t\treturn label;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_145 = " createFigurePrim() {";
- protected final String TEXT_146 = NL + "\t\treturn new ";
- protected final String TEXT_147 = "();";
- protected final String TEXT_148 = NL + "\t\treturn ";
- protected final String TEXT_149 = ";";
- protected final String TEXT_150 = NL + "\t\treturn new ";
- protected final String TEXT_151 = "();";
- protected final String TEXT_152 = NL + "\t}" + NL;
- protected final String TEXT_153 = NL;
- protected final String TEXT_154 = NL + "}";
- protected final String TEXT_155 = NL;
+ protected final String TEXT_18 = ".getType(";
+ protected final String TEXT_19 = ".VISUAL_ID), new Point(0, 0));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_20 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());" + NL + "\t}";
+ protected final String TEXT_21 = NL;
+ protected final String TEXT_22 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_23 = " getLabelIcon() {" + NL + "\t\treturn null;" + NL + "\t}";
+ protected final String TEXT_24 = NL;
+ protected final String TEXT_25 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelTextHelper(";
+ protected final String TEXT_26 = " figure) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_27 = ") {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_28 = ") figure).getText();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_29 = ") figure).getText();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelTextHelper(";
+ protected final String TEXT_30 = " figure, String text) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_31 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_32 = ") figure).setText(text);" + NL + "\t\t} else {" + NL + "\t\t\t((";
+ protected final String TEXT_33 = ") figure).setText(text);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Image getLabelIconHelper(";
+ protected final String TEXT_34 = " figure) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_35 = ") {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_36 = ") figure).getIcon();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_37 = ") figure).getIcon();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelIconHelper(";
+ protected final String TEXT_38 = " figure, Image icon) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_39 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_40 = ") figure).setIcon(icon);" + NL + "\t\t} else {" + NL + "\t\t\t((";
+ protected final String TEXT_41 = ") figure).setIcon(icon);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabel(";
+ protected final String TEXT_42 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);" + NL + "\t\tdefaultText = getLabelTextHelper(figure);" + NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_43 = " getModelChildren() {" + NL + "\t\treturn ";
+ protected final String TEXT_44 = ".EMPTY_LIST;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_45 = " getChildBySemanticHint(String semanticHint) {" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t";
+ protected final String TEXT_46 = " element = resolveSemanticElement();" + NL + "\t\tString text = null;" + NL + "\t\tif (element != null && getParser() != null) {" + NL + "\t\t\ttext = getParser().getPrintString(new ";
+ protected final String TEXT_47 = "(element)," + NL + "\t\t\t\tgetParserOptions().intValue());" + NL + "\t\t}" + NL + "\t\tif (text == null || text.length() == 0) {" + NL + "\t\t\ttext = defaultText;" + NL + "\t\t}" + NL + "\t\treturn text;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabelText(String text) {" + NL + "\t\tsetLabelTextHelper(getFigure(), text);" + NL + "\t\tObject pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
+ protected final String TEXT_48 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_49 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String getEditText() {" + NL + "\t\t";
+ protected final String TEXT_50 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn \"\";" + NL + "\t\t}" + NL + "\t\treturn getParser().getEditString(new ";
+ protected final String TEXT_51 = "(element)," + NL + "\t\t\tgetParserOptions().intValue());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isEditable() {";
+ protected final String TEXT_52 = NL + "\t\t";
+ protected final String TEXT_53 = " element = resolveSemanticElement();" + NL + "\t\tif (element != null && getEditText() != null) {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
+ protected final String TEXT_54 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_55 = " getEditTextValidator() {" + NL + "\t\treturn new ";
+ protected final String TEXT_56 = "() {" + NL + "" + NL + "\t\t\tpublic String isValid(final Object value) {" + NL + "\t\t\t\tif (value instanceof String) {" + NL + "\t\t\t\t\tfinal ";
+ protected final String TEXT_57 = " element = resolveSemanticElement();" + NL + "\t\t\t\t\tfinal ";
+ protected final String TEXT_58 = " parser = getParser();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t";
+ protected final String TEXT_59 = " valid =" + NL + "\t\t\t\t\t\t\t(";
+ protected final String TEXT_60 = ") getEditingDomain().runExclusive(" + NL + "\t\t\t\t\t\t\t\tnew ";
+ protected final String TEXT_61 = ".Impl() {" + NL + "" + NL + "\t\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\t\tsetResult(parser.isValidEditString(" + NL + "\t\t\t\t\t\t\t\t\tnew ";
+ protected final String TEXT_62 = "(element), (String) value));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t});" + NL + "\t\t\t\t\t\treturn valid.getCode() == ";
+ protected final String TEXT_63 = ".EDITABLE ?" + NL + "\t\t\t\t\t\t\tnull : valid.getMessage();" + NL + "\t\t\t\t\t} catch (InterruptedException ie) {" + NL + "\t\t\t\t\t\tie.printStackTrace();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// shouldn't get here" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_64 = " getCompletionProcessor() {" + NL + "\t\t";
+ protected final String TEXT_65 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn getParser().getCompletionProcessor(new ";
+ protected final String TEXT_66 = "(element));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_67 = " getParserOptions() {" + NL + "\t\treturn ";
+ protected final String TEXT_68 = ".NONE;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_69 = " getParser() {" + NL + "\t\tif (parser == null) {" + NL + "\t\t\tString parserHint = ((";
+ protected final String TEXT_70 = ") getModel()).getType();" + NL + "\t\t\t";
+ protected final String TEXT_71 = " element = resolveSemanticElement();" + NL + "\t\t\tif (element != null) {" + NL + "\t\t\t\t";
+ protected final String TEXT_72 = " hintAdapter =" + NL + "\t\t\t\t\tnew ";
+ protected final String TEXT_73 = "(element, parserHint) {" + NL + "" + NL + "\t\t\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\t\t\tif (";
+ protected final String TEXT_74 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\t\t\treturn ";
+ protected final String TEXT_75 = ".";
+ protected final String TEXT_76 = ";" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getAdapter(adapter);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tparser = ";
+ protected final String TEXT_77 = ".getInstance().getParser(hintAdapter);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn parser;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_78 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tsetManager(new ";
+ protected final String TEXT_79 = "(this," + NL + "\t\t\t\t";
+ protected final String TEXT_80 = ".getTextCellEditorClass(this)," + NL + "\t\t\t\t";
+ protected final String TEXT_81 = ".getTextCellEditorLocator(this)));" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setManager(";
+ protected final String TEXT_82 = " manager) {" + NL + "\t\tthis.manager = manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit(";
+ protected final String TEXT_83 = " eventLocation) {" + NL + "\t\tif (getManager().getClass() == ";
+ protected final String TEXT_84 = ".class) {" + NL + "\t\t\t((";
+ protected final String TEXT_85 = ") getManager()).show(eventLocation.getSWTPoint());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void performDirectEdit(char initialCharacter) {" + NL + "\t\tif (getManager() instanceof ";
+ protected final String TEXT_86 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_87 = ") getManager()).show(initialCharacter);" + NL + "\t\t} else {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEditRequest(";
+ protected final String TEXT_88 = " request) {" + NL + "\t\tfinal ";
+ protected final String TEXT_89 = " theRequest = request;" + NL + "\t\ttry {" + NL + "\t\t\tgetEditingDomain().runExclusive(new Runnable() {" + NL + "" + NL + "\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\tif (isActive() && isEditable()) {" + NL + "\t\t\t\t\t\tif (theRequest.getExtendedData().get(";
+ protected final String TEXT_90 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {" + NL + "\t\t\t\t\t\t\tCharacter initialChar = (Character) theRequest.getExtendedData().get(";
+ protected final String TEXT_91 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);" + NL + "\t\t\t\t\t\t\tperformDirectEdit(initialChar.charValue());" + NL + "\t\t\t\t\t\t} else if ((theRequest instanceof ";
+ protected final String TEXT_92 = ") && (getEditText().equals(getLabelText()))) {" + NL + "\t\t\t\t\t\t\t";
+ protected final String TEXT_93 = " editRequest =" + NL + "\t\t\t\t\t\t\t\t(";
+ protected final String TEXT_94 = ") theRequest;" + NL + "\t\t\t\t\t\t\tperformDirectEdit(editRequest.getLocation());" + NL + "\t\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t\tperformDirectEdit();" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t} catch (InterruptedException e) {" + NL + "\t\t\te.printStackTrace();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshUnderline();" + NL + "\t\trefreshStrikeThrough();";
+ protected final String TEXT_95 = NL + "\t\trefreshBounds();";
+ protected final String TEXT_96 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tsetLabelTextHelper(getFigure(), getLabelText());" + NL + "\t\tsetLabelIconHelper(getFigure(), getLabelIcon());" + NL + "\t\tObject pdEditPolicy = getEditPolicy(";
+ protected final String TEXT_97 = ".PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
+ protected final String TEXT_98 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_99 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshUnderline() {" + NL + "\t\t";
+ protected final String TEXT_100 = " style =" + NL + "\t\t\t(";
+ protected final String TEXT_101 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
+ protected final String TEXT_102 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
+ protected final String TEXT_103 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_104 = ") getFigure()).setTextUnderline(style.isUnderline());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshStrikeThrough() {" + NL + "\t\t";
+ protected final String TEXT_105 = " style =" + NL + "\t\t\t(";
+ protected final String TEXT_106 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
+ protected final String TEXT_107 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
+ protected final String TEXT_108 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_109 = ") getFigure()).setTextStrikeThrough(style.isStrikeThrough());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t";
+ protected final String TEXT_110 = " style =" + NL + "\t\t\t(";
+ protected final String TEXT_111 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
+ protected final String TEXT_112 = ".eINSTANCE.getFontStyle());" + NL + "\t\t";
+ protected final String TEXT_113 = " fontData;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tfontData = new ";
+ protected final String TEXT_114 = "(" + NL + "\t\t\t\tstyle.getFontName(), style.getFontHeight()," + NL + "\t\t\t\t(style.isBold() ? ";
+ protected final String TEXT_115 = ".BOLD : ";
+ protected final String TEXT_116 = ".NORMAL) |" + NL + "\t\t\t\t(style.isItalic() ? ";
+ protected final String TEXT_117 = ".ITALIC : ";
+ protected final String TEXT_118 = ".NORMAL));" + NL + "\t\t} else {" + NL + "\t\t\t// initialize font to defaults" + NL + "\t\t\tfontData = ";
+ protected final String TEXT_119 = ".getFontData(" + NL + "\t\t\t\t(";
+ protected final String TEXT_120 = ") getDiagramPreferencesHint().getPreferenceStore()," + NL + "\t\t\t\t";
+ protected final String TEXT_121 = ".PREF_DEFAULT_FONT);" + NL + "\t\t}" + NL + "\t\tsetFont(fontData);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setFontColor(";
+ protected final String TEXT_122 = " color) {" + NL + "\t\tgetFigure().setForegroundColor(color);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addSemanticListeners() {" + NL + "\t\tif (getParser() instanceof ";
+ protected final String TEXT_123 = ") {" + NL + "\t\t\t";
+ protected final String TEXT_124 = " element = resolveSemanticElement();" + NL + "\t\t\tparserElements = ((";
+ protected final String TEXT_125 = ") getParser()).getSemanticElementsBeingParsed(element);" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\taddListenerFilter(\"SemanticModel\" + i, this, (";
+ protected final String TEXT_126 = ") parserElements.get(i)); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.addSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeSemanticListeners() {" + NL + "\t\tif (parserElements != null) {" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\tremoveListenerFilter(\"SemanticModel\" + i); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_127 = " getAccessibleEditPart() {" + NL + "\t\tif (accessibleEP == null) {" + NL + "\t\t\taccessibleEP = new AccessibleGraphicalEditPart() {" + NL + "" + NL + "\t\t\t\tpublic void getName(";
+ protected final String TEXT_128 = " e) {" + NL + "\t\t\t\t\te.result = getLabelTextHelper(getFigure());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn accessibleEP;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleNotificationEvent(";
+ protected final String TEXT_129 = " event) {" + NL + "\t\tObject feature = event.getFeature();";
+ protected final String TEXT_130 = NL;
+ protected final String TEXT_131 = "\t\tif (";
+ protected final String TEXT_132 = ".eINSTANCE.getFontStyle_FontColor().equals(feature)) {" + NL + "\t\t\tInteger c = (Integer) event.getNewValue();" + NL + "\t\t\tsetFontColor(";
+ protected final String TEXT_133 = ".getInstance().getColor(c));" + NL + "\t\t} else if (";
+ protected final String TEXT_134 = ".eINSTANCE.getFontStyle_Underline().equals(feature)) {" + NL + "\t\t\trefreshUnderline();" + NL + "\t\t} else if (";
+ protected final String TEXT_135 = ".eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {" + NL + "\t\t\trefreshStrikeThrough();" + NL + "\t\t} else if (";
+ protected final String TEXT_136 = ".eINSTANCE.getFontStyle_FontHeight().equals(feature) ||" + NL + "\t\t\t\t";
+ protected final String TEXT_137 = ".eINSTANCE.getFontStyle_FontName().equals(feature) ||" + NL + "\t\t\t\t";
+ protected final String TEXT_138 = ".eINSTANCE.getFontStyle_Bold().equals(feature) ||" + NL + "\t\t\t\t";
+ protected final String TEXT_139 = ".eINSTANCE.getFontStyle_Italic().equals(feature)) {" + NL + "\t\t\trefreshFont();" + NL + "\t\t} else {" + NL + "\t\t\tif (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {" + NL + "\t\t\t\trefreshLabel();" + NL + "\t\t\t}" + NL + "\t\t\tif (getParser() instanceof ISemanticParser) {" + NL + "\t\t\t\t";
+ protected final String TEXT_140 = " modelParser =" + NL + "\t\t\t\t\t(";
+ protected final String TEXT_141 = ") getParser();" + NL + "\t\t\t\tif (modelParser.areSemanticElementsAffected(null, event)) {" + NL + "\t\t\t\t\tremoveSemanticListeners();" + NL + "\t\t\t\t\tif (resolveSemanticElement() != null) {" + NL + "\t\t\t\t\t\taddSemanticListeners();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\trefreshLabel();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.handleNotificationEvent(event);" + NL + "\t}";
+ protected final String TEXT_142 = NL;
+ protected final String TEXT_143 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_144 = " createFigure() {" + NL + "\t\t";
+ protected final String TEXT_145 = " label = createFigurePrim();" + NL + "\t\tdefaultText = getLabelTextHelper(label);" + NL + "\t\treturn label;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_146 = " createFigurePrim() {";
+ protected final String TEXT_147 = NL + "\t\treturn new ";
+ protected final String TEXT_148 = "();";
+ protected final String TEXT_149 = NL + "\t\treturn ";
+ protected final String TEXT_150 = ";";
+ protected final String TEXT_151 = NL + "\t\treturn new ";
+ protected final String TEXT_152 = "();";
+ protected final String TEXT_153 = NL + "\t}" + NL;
+ protected final String TEXT_154 = NL;
+ protected final String TEXT_155 = NL + "}";
+ protected final String TEXT_156 = NL;
public String generate(Object argument)
{
@@ -214,134 +215,134 @@ GenCommonBase genCommonBase = genLabel;
stringBuffer.append(TEXT_16);
stringBuffer.append(importManager.getImportedName("java.util.List"));
stringBuffer.append(TEXT_17);
- stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_18);
- stringBuffer.append(genLabel.getEditPartClassName());
+ stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_19);
- final boolean needsRefreshBounds = false;
+ stringBuffer.append(genLabel.getEditPartClassName());
stringBuffer.append(TEXT_20);
+ final boolean needsRefreshBounds = false;
stringBuffer.append(TEXT_21);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image"));
stringBuffer.append(TEXT_22);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image"));
stringBuffer.append(TEXT_23);
stringBuffer.append(TEXT_24);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_25);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_26);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_27);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_28);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_29);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_30);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_31);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_32);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_33);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_34);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_35);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_36);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_37);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_38);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_39);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_40);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_41);
- stringBuffer.append(importManager.getImportedName("java.util.List"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_42);
- stringBuffer.append(importManager.getImportedName("java.util.Collections"));
+ stringBuffer.append(importManager.getImportedName("java.util.List"));
stringBuffer.append(TEXT_43);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collections"));
stringBuffer.append(TEXT_44);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"));
stringBuffer.append(TEXT_45);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_46);
- stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_47);
stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_48);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_49);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_50);
- if (!genLabel.isReadOnly()) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_51);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ if (!genLabel.isReadOnly()) {
stringBuffer.append(TEXT_52);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_53);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ICellEditorValidator"));
+ }
stringBuffer.append(TEXT_54);
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ICellEditorValidator"));
stringBuffer.append(TEXT_55);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ICellEditorValidator"));
stringBuffer.append(TEXT_56);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_57);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
stringBuffer.append(TEXT_58);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus"));
stringBuffer.append(TEXT_59);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.RunnableWithResult"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus"));
stringBuffer.append(TEXT_60);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.RunnableWithResult"));
stringBuffer.append(TEXT_61);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_62);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.text.contentassist.IContentAssistProcessor"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus"));
stringBuffer.append(TEXT_63);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.text.contentassist.IContentAssistProcessor"));
stringBuffer.append(TEXT_64);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_65);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_66);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions"));
stringBuffer.append(TEXT_67);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions"));
stringBuffer.append(TEXT_68);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
stringBuffer.append(TEXT_69);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_70);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_71);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter"));
stringBuffer.append(TEXT_72);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter"));
stringBuffer.append(TEXT_73);
- stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_74);
- stringBuffer.append(genHost.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
stringBuffer.append(TEXT_75);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserService"));
+ stringBuffer.append(genHost.getUniqueIdentifier());
stringBuffer.append(TEXT_76);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserService"));
stringBuffer.append(TEXT_77);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
stringBuffer.append(TEXT_78);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_79);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_80);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
stringBuffer.append(TEXT_81);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
stringBuffer.append(TEXT_82);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
stringBuffer.append(TEXT_83);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_84);
@@ -349,61 +350,61 @@ GenCommonBase genCommonBase = genLabel;
stringBuffer.append(TEXT_85);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_86);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_87);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
stringBuffer.append(TEXT_88);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
stringBuffer.append(TEXT_89);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants"));
stringBuffer.append(TEXT_90);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants"));
stringBuffer.append(TEXT_91);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
stringBuffer.append(TEXT_92);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
stringBuffer.append(TEXT_93);
- if (needsRefreshBounds) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
stringBuffer.append(TEXT_94);
- }
+ if (needsRefreshBounds) {
stringBuffer.append(TEXT_95);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
+ }
stringBuffer.append(TEXT_96);
- stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
stringBuffer.append(TEXT_97);
stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_98);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_99);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_100);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_101);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_102);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_103);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_104);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_105);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_106);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_107);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_108);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_109);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_110);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_111);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_112);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
stringBuffer.append(TEXT_113);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
stringBuffer.append(TEXT_114);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_115);
@@ -411,35 +412,35 @@ GenCommonBase genCommonBase = genLabel;
stringBuffer.append(TEXT_116);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_117);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_118);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter"));
stringBuffer.append(TEXT_119);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore"));
stringBuffer.append(TEXT_120);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants"));
stringBuffer.append(TEXT_121);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
stringBuffer.append(TEXT_122);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
- stringBuffer.append(TEXT_123);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
- stringBuffer.append(TEXT_124);
+ stringBuffer.append(TEXT_123);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_124);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
stringBuffer.append(TEXT_125);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.AccessibleEditPart"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_126);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.accessibility.AccessibleEvent"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.AccessibleEditPart"));
stringBuffer.append(TEXT_127);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.accessibility.AccessibleEvent"));
stringBuffer.append(TEXT_128);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
stringBuffer.append(TEXT_129);
stringBuffer.append(TEXT_130);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_131);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry"));
- stringBuffer.append(TEXT_132);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(TEXT_132);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry"));
stringBuffer.append(TEXT_133);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_134);
@@ -451,18 +452,20 @@ GenCommonBase genCommonBase = genLabel;
stringBuffer.append(TEXT_137);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_138);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_139);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
stringBuffer.append(TEXT_140);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
stringBuffer.append(TEXT_141);
stringBuffer.append(TEXT_142);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_143);
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_144);
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_145);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(TEXT_146);
String figureQualifiedClassName = null;
Viewmap viewmap = genLabel.getViewmap();
@@ -472,30 +475,30 @@ if (viewmap instanceof FigureViewmap) {
figureQualifiedClassName = "org.eclipse.draw2d.Label";
}
- stringBuffer.append(TEXT_146);
- stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
stringBuffer.append(TEXT_147);
+ stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
+ stringBuffer.append(TEXT_148);
} // instanceof FigureViewmap
else if (viewmap instanceof SnippetViewmap) {
- stringBuffer.append(TEXT_148);
- stringBuffer.append(((SnippetViewmap) viewmap).getBody());
stringBuffer.append(TEXT_149);
+ stringBuffer.append(((SnippetViewmap) viewmap).getBody());
+ stringBuffer.append(TEXT_150);
} // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter
else if (viewmap instanceof InnerClassViewmap) {
figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();
- stringBuffer.append(TEXT_150);
- stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_151);
- }
+ stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_152);
- if (genLabel.getViewmap() instanceof InnerClassViewmap) {
+ }
stringBuffer.append(TEXT_153);
+ if (genLabel.getViewmap() instanceof InnerClassViewmap) {
+ stringBuffer.append(TEXT_154);
stringBuffer.append(((InnerClassViewmap) genLabel.getViewmap()).getClassBody());
}
- stringBuffer.append(TEXT_154);
- importManager.emitSortedImports();
stringBuffer.append(TEXT_155);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_156);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkEditPartGenerator.java
index 8461a0dd1..76c09bcef 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkEditPartGenerator.java
@@ -24,8 +24,8 @@ public class LinkEditPartGenerator
protected final String TEXT_7 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_8 = " extends ConnectionNodeEditPart {";
protected final String TEXT_9 = NL;
- protected final String TEXT_10 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_11 = "\";";
+ protected final String TEXT_10 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_11 = ";";
protected final String TEXT_12 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
protected final String TEXT_13 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();";
protected final String TEXT_14 = NL + "\t\tinstallEditPolicy(";
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkLabelEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkLabelEditPartGenerator.java
index e420001cf..6f0617bd5 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkLabelEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/LinkLabelEditPartGenerator.java
@@ -22,155 +22,156 @@ public class LinkLabelEditPartGenerator
protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_6 = " extends LabelEditPart implements ITextAwareEditPart {";
protected final String TEXT_7 = NL;
- protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_9 = "\";";
+ protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_9 = ";";
protected final String TEXT_10 = NL;
protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_12 = " manager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_13 = " parser;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_14 = " parserElements;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate String defaultText;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tstatic {";
- protected final String TEXT_15 = NL + "\t\tregisterSnapBackPosition(" + NL + "\t\t\t\t";
- protected final String TEXT_16 = ".VISUAL_ID," + NL + "\t\t\t\tnew Point(";
- protected final String TEXT_17 = ", ";
- protected final String TEXT_18 = "));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_19 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getKeyPoint() {" + NL + "\t\treturn ConnectionLocator.";
- protected final String TEXT_20 = ";" + NL + "\t}" + NL;
- protected final String TEXT_21 = NL;
- protected final String TEXT_22 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_23 = " getLabelIcon() {" + NL + "\t\treturn null;" + NL + "\t}";
- protected final String TEXT_24 = NL;
- protected final String TEXT_25 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelTextHelper(";
- protected final String TEXT_26 = " figure) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_27 = ") {" + NL + "\t\t\treturn ((";
- protected final String TEXT_28 = ") figure).getText();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
- protected final String TEXT_29 = ") figure).getText();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelTextHelper(";
- protected final String TEXT_30 = " figure, String text) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_31 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_32 = ") figure).setText(text);" + NL + "\t\t} else {" + NL + "\t\t\t((";
- protected final String TEXT_33 = ") figure).setText(text);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Image getLabelIconHelper(";
- protected final String TEXT_34 = " figure) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_35 = ") {" + NL + "\t\t\treturn ((";
- protected final String TEXT_36 = ") figure).getIcon();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
- protected final String TEXT_37 = ") figure).getIcon();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelIconHelper(";
- protected final String TEXT_38 = " figure, Image icon) {" + NL + "\t\tif (figure instanceof ";
- protected final String TEXT_39 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_40 = ") figure).setIcon(icon);" + NL + "\t\t} else {" + NL + "\t\t\t((";
- protected final String TEXT_41 = ") figure).setIcon(icon);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabel(";
- protected final String TEXT_42 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);" + NL + "\t\tdefaultText = getLabelTextHelper(figure);" + NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_43 = " getModelChildren() {" + NL + "\t\treturn ";
- protected final String TEXT_44 = ".EMPTY_LIST;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_45 = " getChildBySemanticHint(String semanticHint) {" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t";
- protected final String TEXT_46 = " element = resolveSemanticElement();" + NL + "\t\tString text = null;" + NL + "\t\tif (element != null && getParser() != null) {" + NL + "\t\t\ttext = getParser().getPrintString(new ";
- protected final String TEXT_47 = "(element)," + NL + "\t\t\t\tgetParserOptions().intValue());" + NL + "\t\t}" + NL + "\t\tif (text == null || text.length() == 0) {" + NL + "\t\t\ttext = defaultText;" + NL + "\t\t}" + NL + "\t\treturn text;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabelText(String text) {" + NL + "\t\tsetLabelTextHelper(getFigure(), text);" + NL + "\t\tObject pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
- protected final String TEXT_48 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_49 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String getEditText() {" + NL + "\t\t";
- protected final String TEXT_50 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn \"\";" + NL + "\t\t}" + NL + "\t\treturn getParser().getEditString(new ";
- protected final String TEXT_51 = "(element)," + NL + "\t\t\tgetParserOptions().intValue());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isEditable() {";
- protected final String TEXT_52 = NL + "\t\t";
- protected final String TEXT_53 = " element = resolveSemanticElement();" + NL + "\t\tif (element != null && getEditText() != null) {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
- protected final String TEXT_54 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_55 = " getEditTextValidator() {" + NL + "\t\treturn new ";
- protected final String TEXT_56 = "() {" + NL + "" + NL + "\t\t\tpublic String isValid(final Object value) {" + NL + "\t\t\t\tif (value instanceof String) {" + NL + "\t\t\t\t\tfinal ";
- protected final String TEXT_57 = " element = resolveSemanticElement();" + NL + "\t\t\t\t\tfinal ";
- protected final String TEXT_58 = " parser = getParser();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t";
- protected final String TEXT_59 = " valid =" + NL + "\t\t\t\t\t\t\t(";
- protected final String TEXT_60 = ") getEditingDomain().runExclusive(" + NL + "\t\t\t\t\t\t\t\tnew ";
- protected final String TEXT_61 = ".Impl() {" + NL + "" + NL + "\t\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\t\tsetResult(parser.isValidEditString(" + NL + "\t\t\t\t\t\t\t\t\tnew ";
- protected final String TEXT_62 = "(element), (String) value));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t});" + NL + "\t\t\t\t\t\treturn valid.getCode() == ";
- protected final String TEXT_63 = ".EDITABLE ?" + NL + "\t\t\t\t\t\t\tnull : valid.getMessage();" + NL + "\t\t\t\t\t} catch (InterruptedException ie) {" + NL + "\t\t\t\t\t\tie.printStackTrace();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// shouldn't get here" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_64 = " getCompletionProcessor() {" + NL + "\t\t";
- protected final String TEXT_65 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn getParser().getCompletionProcessor(new ";
- protected final String TEXT_66 = "(element));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_67 = " getParserOptions() {" + NL + "\t\treturn ";
- protected final String TEXT_68 = ".NONE;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_69 = " getParser() {" + NL + "\t\tif (parser == null) {" + NL + "\t\t\tString parserHint = ((";
- protected final String TEXT_70 = ") getModel()).getType();" + NL + "\t\t\t";
- protected final String TEXT_71 = " element = resolveSemanticElement();" + NL + "\t\t\tif (element != null) {" + NL + "\t\t\t\t";
- protected final String TEXT_72 = " hintAdapter =" + NL + "\t\t\t\t\tnew ";
- protected final String TEXT_73 = "(element, parserHint) {" + NL + "" + NL + "\t\t\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\t\t\tif (";
- protected final String TEXT_74 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\t\t\treturn ";
- protected final String TEXT_75 = ".";
- protected final String TEXT_76 = ";" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getAdapter(adapter);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tparser = ";
- protected final String TEXT_77 = ".getInstance().getParser(hintAdapter);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn parser;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_78 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tsetManager(new ";
- protected final String TEXT_79 = "(this," + NL + "\t\t\t\t";
- protected final String TEXT_80 = ".getTextCellEditorClass(this)," + NL + "\t\t\t\t";
- protected final String TEXT_81 = ".getTextCellEditorLocator(this)));" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setManager(";
- protected final String TEXT_82 = " manager) {" + NL + "\t\tthis.manager = manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit(";
- protected final String TEXT_83 = " eventLocation) {" + NL + "\t\tif (getManager().getClass() == ";
- protected final String TEXT_84 = ".class) {" + NL + "\t\t\t((";
- protected final String TEXT_85 = ") getManager()).show(eventLocation.getSWTPoint());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void performDirectEdit(char initialCharacter) {" + NL + "\t\tif (getManager() instanceof ";
- protected final String TEXT_86 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_87 = ") getManager()).show(initialCharacter);" + NL + "\t\t} else {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEditRequest(";
- protected final String TEXT_88 = " request) {" + NL + "\t\tfinal ";
- protected final String TEXT_89 = " theRequest = request;" + NL + "\t\ttry {" + NL + "\t\t\tgetEditingDomain().runExclusive(new Runnable() {" + NL + "" + NL + "\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\tif (isActive() && isEditable()) {" + NL + "\t\t\t\t\t\tif (theRequest.getExtendedData().get(";
- protected final String TEXT_90 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {" + NL + "\t\t\t\t\t\t\tCharacter initialChar = (Character) theRequest.getExtendedData().get(";
- protected final String TEXT_91 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);" + NL + "\t\t\t\t\t\t\tperformDirectEdit(initialChar.charValue());" + NL + "\t\t\t\t\t\t} else if ((theRequest instanceof ";
- protected final String TEXT_92 = ") && (getEditText().equals(getLabelText()))) {" + NL + "\t\t\t\t\t\t\t";
- protected final String TEXT_93 = " editRequest =" + NL + "\t\t\t\t\t\t\t\t(";
- protected final String TEXT_94 = ") theRequest;" + NL + "\t\t\t\t\t\t\tperformDirectEdit(editRequest.getLocation());" + NL + "\t\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t\tperformDirectEdit();" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t} catch (InterruptedException e) {" + NL + "\t\t\te.printStackTrace();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshUnderline();" + NL + "\t\trefreshStrikeThrough();";
- protected final String TEXT_95 = NL + "\t\trefreshBounds();";
- protected final String TEXT_96 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tsetLabelTextHelper(getFigure(), getLabelText());" + NL + "\t\tsetLabelIconHelper(getFigure(), getLabelIcon());" + NL + "\t\tObject pdEditPolicy = getEditPolicy(";
- protected final String TEXT_97 = ".PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
- protected final String TEXT_98 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_99 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshUnderline() {" + NL + "\t\t";
- protected final String TEXT_100 = " style =" + NL + "\t\t\t(";
- protected final String TEXT_101 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
- protected final String TEXT_102 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
- protected final String TEXT_103 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_104 = ") getFigure()).setTextUnderline(style.isUnderline());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshStrikeThrough() {" + NL + "\t\t";
- protected final String TEXT_105 = " style =" + NL + "\t\t\t(";
- protected final String TEXT_106 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
- protected final String TEXT_107 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
- protected final String TEXT_108 = ") {" + NL + "\t\t\t((";
- protected final String TEXT_109 = ") getFigure()).setTextStrikeThrough(style.isStrikeThrough());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t";
- protected final String TEXT_110 = " style =" + NL + "\t\t\t(";
- protected final String TEXT_111 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
- protected final String TEXT_112 = ".eINSTANCE.getFontStyle());" + NL + "\t\t";
- protected final String TEXT_113 = " fontData;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tfontData = new ";
- protected final String TEXT_114 = "(" + NL + "\t\t\t\tstyle.getFontName(), style.getFontHeight()," + NL + "\t\t\t\t(style.isBold() ? ";
- protected final String TEXT_115 = ".BOLD : ";
- protected final String TEXT_116 = ".NORMAL) |" + NL + "\t\t\t\t(style.isItalic() ? ";
- protected final String TEXT_117 = ".ITALIC : ";
- protected final String TEXT_118 = ".NORMAL));" + NL + "\t\t} else {" + NL + "\t\t\t// initialize font to defaults" + NL + "\t\t\tfontData = ";
- protected final String TEXT_119 = ".getFontData(" + NL + "\t\t\t\t(";
- protected final String TEXT_120 = ") getDiagramPreferencesHint().getPreferenceStore()," + NL + "\t\t\t\t";
- protected final String TEXT_121 = ".PREF_DEFAULT_FONT);" + NL + "\t\t}" + NL + "\t\tsetFont(fontData);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setFontColor(";
- protected final String TEXT_122 = " color) {" + NL + "\t\tgetFigure().setForegroundColor(color);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addSemanticListeners() {" + NL + "\t\tif (getParser() instanceof ";
- protected final String TEXT_123 = ") {" + NL + "\t\t\t";
- protected final String TEXT_124 = " element = resolveSemanticElement();" + NL + "\t\t\tparserElements = ((";
- protected final String TEXT_125 = ") getParser()).getSemanticElementsBeingParsed(element);" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\taddListenerFilter(\"SemanticModel\" + i, this, (";
- protected final String TEXT_126 = ") parserElements.get(i)); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.addSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeSemanticListeners() {" + NL + "\t\tif (parserElements != null) {" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\tremoveListenerFilter(\"SemanticModel\" + i); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_127 = " getAccessibleEditPart() {" + NL + "\t\tif (accessibleEP == null) {" + NL + "\t\t\taccessibleEP = new AccessibleGraphicalEditPart() {" + NL + "" + NL + "\t\t\t\tpublic void getName(";
- protected final String TEXT_128 = " e) {" + NL + "\t\t\t\t\te.result = getLabelTextHelper(getFigure());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn accessibleEP;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleNotificationEvent(";
- protected final String TEXT_129 = " event) {" + NL + "\t\tObject feature = event.getFeature();";
- protected final String TEXT_130 = NL;
- protected final String TEXT_131 = "\t\tif (";
- protected final String TEXT_132 = ".eINSTANCE.getFontStyle_FontColor().equals(feature)) {" + NL + "\t\t\tInteger c = (Integer) event.getNewValue();" + NL + "\t\t\tsetFontColor(";
- protected final String TEXT_133 = ".getInstance().getColor(c));" + NL + "\t\t} else if (";
- protected final String TEXT_134 = ".eINSTANCE.getFontStyle_Underline().equals(feature)) {" + NL + "\t\t\trefreshUnderline();" + NL + "\t\t} else if (";
- protected final String TEXT_135 = ".eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {" + NL + "\t\t\trefreshStrikeThrough();" + NL + "\t\t} else if (";
- protected final String TEXT_136 = ".eINSTANCE.getFontStyle_FontHeight().equals(feature) ||" + NL + "\t\t\t\t";
- protected final String TEXT_137 = ".eINSTANCE.getFontStyle_FontName().equals(feature) ||" + NL + "\t\t\t\t";
- protected final String TEXT_138 = ".eINSTANCE.getFontStyle_Bold().equals(feature) ||" + NL + "\t\t\t\t";
- protected final String TEXT_139 = ".eINSTANCE.getFontStyle_Italic().equals(feature)) {" + NL + "\t\t\trefreshFont();" + NL + "\t\t} else {" + NL + "\t\t\tif (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {" + NL + "\t\t\t\trefreshLabel();" + NL + "\t\t\t}" + NL + "\t\t\tif (getParser() instanceof ISemanticParser) {" + NL + "\t\t\t\t";
- protected final String TEXT_140 = " modelParser =" + NL + "\t\t\t\t\t(";
- protected final String TEXT_141 = ") getParser();" + NL + "\t\t\t\tif (modelParser.areSemanticElementsAffected(null, event)) {" + NL + "\t\t\t\t\tremoveSemanticListeners();" + NL + "\t\t\t\t\tif (resolveSemanticElement() != null) {" + NL + "\t\t\t\t\t\taddSemanticListeners();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\trefreshLabel();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.handleNotificationEvent(event);" + NL + "\t}";
- protected final String TEXT_142 = NL;
- protected final String TEXT_143 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_144 = " createFigure() {" + NL + "\t\t";
- protected final String TEXT_145 = " label = createFigurePrim();" + NL + "\t\tdefaultText = getLabelTextHelper(label);" + NL + "\t\treturn label;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_146 = " createFigurePrim() {";
- protected final String TEXT_147 = NL + "\t\treturn new ";
- protected final String TEXT_148 = "();";
- protected final String TEXT_149 = NL + "\t\treturn ";
- protected final String TEXT_150 = ";";
- protected final String TEXT_151 = NL + "\t\treturn new ";
- protected final String TEXT_152 = "();";
- protected final String TEXT_153 = NL + "\t}" + NL;
- protected final String TEXT_154 = NL;
- protected final String TEXT_155 = NL + "}";
- protected final String TEXT_156 = NL;
+ protected final String TEXT_15 = NL + "\t\tregisterSnapBackPosition(";
+ protected final String TEXT_16 = ".getType(";
+ protected final String TEXT_17 = ".VISUAL_ID), new Point(";
+ protected final String TEXT_18 = ", ";
+ protected final String TEXT_19 = "));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_20 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {" + NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic int getKeyPoint() {" + NL + "\t\treturn ConnectionLocator.";
+ protected final String TEXT_21 = ";" + NL + "\t}" + NL;
+ protected final String TEXT_22 = NL;
+ protected final String TEXT_23 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_24 = " getLabelIcon() {" + NL + "\t\treturn null;" + NL + "\t}";
+ protected final String TEXT_25 = NL;
+ protected final String TEXT_26 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelTextHelper(";
+ protected final String TEXT_27 = " figure) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_28 = ") {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_29 = ") figure).getText();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_30 = ") figure).getText();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelTextHelper(";
+ protected final String TEXT_31 = " figure, String text) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_32 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_33 = ") figure).setText(text);" + NL + "\t\t} else {" + NL + "\t\t\t((";
+ protected final String TEXT_34 = ") figure).setText(text);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Image getLabelIconHelper(";
+ protected final String TEXT_35 = " figure) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_36 = ") {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_37 = ") figure).getIcon();" + NL + "\t\t} else {" + NL + "\t\t\treturn ((";
+ protected final String TEXT_38 = ") figure).getIcon();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setLabelIconHelper(";
+ protected final String TEXT_39 = " figure, Image icon) {" + NL + "\t\tif (figure instanceof ";
+ protected final String TEXT_40 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_41 = ") figure).setIcon(icon);" + NL + "\t\t} else {" + NL + "\t\t\t((";
+ protected final String TEXT_42 = ") figure).setIcon(icon);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabel(";
+ protected final String TEXT_43 = " figure) {" + NL + "\t\tunregisterVisuals();" + NL + "\t\tsetFigure(figure);" + NL + "\t\tdefaultText = getLabelTextHelper(figure);" + NL + "\t\tregisterVisuals();" + NL + "\t\trefreshVisuals();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_44 = " getModelChildren() {" + NL + "\t\treturn ";
+ protected final String TEXT_45 = ".EMPTY_LIST;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_46 = " getChildBySemanticHint(String semanticHint) {" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getLabelText() {" + NL + "\t\t";
+ protected final String TEXT_47 = " element = resolveSemanticElement();" + NL + "\t\tString text = null;" + NL + "\t\tif (element != null && getParser() != null) {" + NL + "\t\t\ttext = getParser().getPrintString(new ";
+ protected final String TEXT_48 = "(element)," + NL + "\t\t\t\tgetParserOptions().intValue());" + NL + "\t\t}" + NL + "\t\tif (text == null || text.length() == 0) {" + NL + "\t\t\ttext = defaultText;" + NL + "\t\t}" + NL + "\t\treturn text;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void setLabelText(String text) {" + NL + "\t\tsetLabelTextHelper(getFigure(), text);" + NL + "\t\tObject pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
+ protected final String TEXT_49 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_50 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic String getEditText() {" + NL + "\t\t";
+ protected final String TEXT_51 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn \"\";" + NL + "\t\t}" + NL + "\t\treturn getParser().getEditString(new ";
+ protected final String TEXT_52 = "(element)," + NL + "\t\t\tgetParserOptions().intValue());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isEditable() {";
+ protected final String TEXT_53 = NL + "\t\t";
+ protected final String TEXT_54 = " element = resolveSemanticElement();" + NL + "\t\tif (element != null && getEditText() != null) {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
+ protected final String TEXT_55 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_56 = " getEditTextValidator() {" + NL + "\t\treturn new ";
+ protected final String TEXT_57 = "() {" + NL + "" + NL + "\t\t\tpublic String isValid(final Object value) {" + NL + "\t\t\t\tif (value instanceof String) {" + NL + "\t\t\t\t\tfinal ";
+ protected final String TEXT_58 = " element = resolveSemanticElement();" + NL + "\t\t\t\t\tfinal ";
+ protected final String TEXT_59 = " parser = getParser();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\t";
+ protected final String TEXT_60 = " valid =" + NL + "\t\t\t\t\t\t\t(";
+ protected final String TEXT_61 = ") getEditingDomain().runExclusive(" + NL + "\t\t\t\t\t\t\t\tnew ";
+ protected final String TEXT_62 = ".Impl() {" + NL + "" + NL + "\t\t\t\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\t\t\t\tsetResult(parser.isValidEditString(" + NL + "\t\t\t\t\t\t\t\t\tnew ";
+ protected final String TEXT_63 = "(element), (String) value));" + NL + "\t\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t});" + NL + "\t\t\t\t\t\treturn valid.getCode() == ";
+ protected final String TEXT_64 = ".EDITABLE ?" + NL + "\t\t\t\t\t\t\tnull : valid.getMessage();" + NL + "\t\t\t\t\t} catch (InterruptedException ie) {" + NL + "\t\t\t\t\t\tie.printStackTrace();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "" + NL + "\t\t\t\t// shouldn't get here" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_65 = " getCompletionProcessor() {" + NL + "\t\t";
+ protected final String TEXT_66 = " element = resolveSemanticElement();" + NL + "\t\tif (element == null || getParser() == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\treturn getParser().getCompletionProcessor(new ";
+ protected final String TEXT_67 = "(element));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_68 = " getParserOptions() {" + NL + "\t\treturn ";
+ protected final String TEXT_69 = ".NONE;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_70 = " getParser() {" + NL + "\t\tif (parser == null) {" + NL + "\t\t\tString parserHint = ((";
+ protected final String TEXT_71 = ") getModel()).getType();" + NL + "\t\t\t";
+ protected final String TEXT_72 = " element = resolveSemanticElement();" + NL + "\t\t\tif (element != null) {" + NL + "\t\t\t\t";
+ protected final String TEXT_73 = " hintAdapter =" + NL + "\t\t\t\t\tnew ";
+ protected final String TEXT_74 = "(element, parserHint) {" + NL + "" + NL + "\t\t\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\t\t\tif (";
+ protected final String TEXT_75 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\t\t\treturn ";
+ protected final String TEXT_76 = ".";
+ protected final String TEXT_77 = ";" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getAdapter(adapter);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\tparser = ";
+ protected final String TEXT_78 = ".getInstance().getParser(hintAdapter);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn parser;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_79 = " getManager() {" + NL + "\t\tif (manager == null) {" + NL + "\t\t\tsetManager(new ";
+ protected final String TEXT_80 = "(this," + NL + "\t\t\t\t";
+ protected final String TEXT_81 = ".getTextCellEditorClass(this)," + NL + "\t\t\t\t";
+ protected final String TEXT_82 = ".getTextCellEditorLocator(this)));" + NL + "\t\t}" + NL + "\t\treturn manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setManager(";
+ protected final String TEXT_83 = " manager) {" + NL + "\t\tthis.manager = manager;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit() {" + NL + "\t\tgetManager().show();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEdit(";
+ protected final String TEXT_84 = " eventLocation) {" + NL + "\t\tif (getManager().getClass() == ";
+ protected final String TEXT_85 = ".class) {" + NL + "\t\t\t((";
+ protected final String TEXT_86 = ") getManager()).show(eventLocation.getSWTPoint());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void performDirectEdit(char initialCharacter) {" + NL + "\t\tif (getManager() instanceof ";
+ protected final String TEXT_87 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_88 = ") getManager()).show(initialCharacter);" + NL + "\t\t} else {" + NL + "\t\t\tperformDirectEdit();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void performDirectEditRequest(";
+ protected final String TEXT_89 = " request) {" + NL + "\t\tfinal ";
+ protected final String TEXT_90 = " theRequest = request;" + NL + "\t\ttry {" + NL + "\t\t\tgetEditingDomain().runExclusive(new Runnable() {" + NL + "" + NL + "\t\t\t\tpublic void run() {" + NL + "\t\t\t\t\tif (isActive() && isEditable()) {" + NL + "\t\t\t\t\t\tif (theRequest.getExtendedData().get(";
+ protected final String TEXT_91 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {" + NL + "\t\t\t\t\t\t\tCharacter initialChar = (Character) theRequest.getExtendedData().get(";
+ protected final String TEXT_92 = ".REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);" + NL + "\t\t\t\t\t\t\tperformDirectEdit(initialChar.charValue());" + NL + "\t\t\t\t\t\t} else if ((theRequest instanceof ";
+ protected final String TEXT_93 = ") && (getEditText().equals(getLabelText()))) {" + NL + "\t\t\t\t\t\t\t";
+ protected final String TEXT_94 = " editRequest =" + NL + "\t\t\t\t\t\t\t\t(";
+ protected final String TEXT_95 = ") theRequest;" + NL + "\t\t\t\t\t\t\tperformDirectEdit(editRequest.getLocation());" + NL + "\t\t\t\t\t\t} else {" + NL + "\t\t\t\t\t\t\tperformDirectEdit();" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t});" + NL + "\t\t} catch (InterruptedException e) {" + NL + "\t\t\te.printStackTrace();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshLabel();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshFontColor();" + NL + "\t\trefreshUnderline();" + NL + "\t\trefreshStrikeThrough();";
+ protected final String TEXT_96 = NL + "\t\trefreshBounds();";
+ protected final String TEXT_97 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLabel() {" + NL + "\t\tsetLabelTextHelper(getFigure(), getLabelText());" + NL + "\t\tsetLabelIconHelper(getFigure(), getLabelIcon());" + NL + "\t\tObject pdEditPolicy = getEditPolicy(";
+ protected final String TEXT_98 = ".PRIMARY_DRAG_ROLE);" + NL + "\t\tif (pdEditPolicy instanceof ";
+ protected final String TEXT_99 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_100 = ") pdEditPolicy).refreshFeedback();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshUnderline() {" + NL + "\t\t";
+ protected final String TEXT_101 = " style =" + NL + "\t\t\t(";
+ protected final String TEXT_102 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
+ protected final String TEXT_103 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
+ protected final String TEXT_104 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_105 = ") getFigure()).setTextUnderline(style.isUnderline());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshStrikeThrough() {" + NL + "\t\t";
+ protected final String TEXT_106 = " style =" + NL + "\t\t\t(";
+ protected final String TEXT_107 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
+ protected final String TEXT_108 = ".eINSTANCE.getFontStyle());" + NL + "\t\tif (style != null && getFigure() instanceof ";
+ protected final String TEXT_109 = ") {" + NL + "\t\t\t((";
+ protected final String TEXT_110 = ") getFigure()).setTextStrikeThrough(style.isStrikeThrough());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t";
+ protected final String TEXT_111 = " style =" + NL + "\t\t\t(";
+ protected final String TEXT_112 = ") getPrimaryView().getStyle(" + NL + "\t\t\t\t";
+ protected final String TEXT_113 = ".eINSTANCE.getFontStyle());" + NL + "\t\t";
+ protected final String TEXT_114 = " fontData;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tfontData = new ";
+ protected final String TEXT_115 = "(" + NL + "\t\t\t\tstyle.getFontName(), style.getFontHeight()," + NL + "\t\t\t\t(style.isBold() ? ";
+ protected final String TEXT_116 = ".BOLD : ";
+ protected final String TEXT_117 = ".NORMAL) |" + NL + "\t\t\t\t(style.isItalic() ? ";
+ protected final String TEXT_118 = ".ITALIC : ";
+ protected final String TEXT_119 = ".NORMAL));" + NL + "\t\t} else {" + NL + "\t\t\t// initialize font to defaults" + NL + "\t\t\tfontData = ";
+ protected final String TEXT_120 = ".getFontData(" + NL + "\t\t\t\t(";
+ protected final String TEXT_121 = ") getDiagramPreferencesHint().getPreferenceStore()," + NL + "\t\t\t\t";
+ protected final String TEXT_122 = ".PREF_DEFAULT_FONT);" + NL + "\t\t}" + NL + "\t\tsetFont(fontData);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setFontColor(";
+ protected final String TEXT_123 = " color) {" + NL + "\t\tgetFigure().setForegroundColor(color);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addSemanticListeners() {" + NL + "\t\tif (getParser() instanceof ";
+ protected final String TEXT_124 = ") {" + NL + "\t\t\t";
+ protected final String TEXT_125 = " element = resolveSemanticElement();" + NL + "\t\t\tparserElements = ((";
+ protected final String TEXT_126 = ") getParser()).getSemanticElementsBeingParsed(element);" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\taddListenerFilter(\"SemanticModel\" + i, this, (";
+ protected final String TEXT_127 = ") parserElements.get(i)); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.addSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeSemanticListeners() {" + NL + "\t\tif (parserElements != null) {" + NL + "\t\t\tfor (int i = 0; i < parserElements.size(); i++) {" + NL + "\t\t\t\tremoveListenerFilter(\"SemanticModel\" + i); //$NON-NLS-1$" + NL + "\t\t\t}" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeSemanticListeners();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_128 = " getAccessibleEditPart() {" + NL + "\t\tif (accessibleEP == null) {" + NL + "\t\t\taccessibleEP = new AccessibleGraphicalEditPart() {" + NL + "" + NL + "\t\t\t\tpublic void getName(";
+ protected final String TEXT_129 = " e) {" + NL + "\t\t\t\t\te.result = getLabelTextHelper(getFigure());" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t}" + NL + "\t\treturn accessibleEP;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void handleNotificationEvent(";
+ protected final String TEXT_130 = " event) {" + NL + "\t\tObject feature = event.getFeature();";
+ protected final String TEXT_131 = NL;
+ protected final String TEXT_132 = "\t\tif (";
+ protected final String TEXT_133 = ".eINSTANCE.getFontStyle_FontColor().equals(feature)) {" + NL + "\t\t\tInteger c = (Integer) event.getNewValue();" + NL + "\t\t\tsetFontColor(";
+ protected final String TEXT_134 = ".getInstance().getColor(c));" + NL + "\t\t} else if (";
+ protected final String TEXT_135 = ".eINSTANCE.getFontStyle_Underline().equals(feature)) {" + NL + "\t\t\trefreshUnderline();" + NL + "\t\t} else if (";
+ protected final String TEXT_136 = ".eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {" + NL + "\t\t\trefreshStrikeThrough();" + NL + "\t\t} else if (";
+ protected final String TEXT_137 = ".eINSTANCE.getFontStyle_FontHeight().equals(feature) ||" + NL + "\t\t\t\t";
+ protected final String TEXT_138 = ".eINSTANCE.getFontStyle_FontName().equals(feature) ||" + NL + "\t\t\t\t";
+ protected final String TEXT_139 = ".eINSTANCE.getFontStyle_Bold().equals(feature) ||" + NL + "\t\t\t\t";
+ protected final String TEXT_140 = ".eINSTANCE.getFontStyle_Italic().equals(feature)) {" + NL + "\t\t\trefreshFont();" + NL + "\t\t} else {" + NL + "\t\t\tif (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {" + NL + "\t\t\t\trefreshLabel();" + NL + "\t\t\t}" + NL + "\t\t\tif (getParser() instanceof ISemanticParser) {" + NL + "\t\t\t\t";
+ protected final String TEXT_141 = " modelParser =" + NL + "\t\t\t\t\t(";
+ protected final String TEXT_142 = ") getParser();" + NL + "\t\t\t\tif (modelParser.areSemanticElementsAffected(null, event)) {" + NL + "\t\t\t\t\tremoveSemanticListeners();" + NL + "\t\t\t\t\tif (resolveSemanticElement() != null) {" + NL + "\t\t\t\t\t\taddSemanticListeners();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\trefreshLabel();" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.handleNotificationEvent(event);" + NL + "\t}";
+ protected final String TEXT_143 = NL;
+ protected final String TEXT_144 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_145 = " createFigure() {" + NL + "\t\t";
+ protected final String TEXT_146 = " label = createFigurePrim();" + NL + "\t\tdefaultText = getLabelTextHelper(label);" + NL + "\t\treturn label;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_147 = " createFigurePrim() {";
+ protected final String TEXT_148 = NL + "\t\treturn new ";
+ protected final String TEXT_149 = "();";
+ protected final String TEXT_150 = NL + "\t\treturn ";
+ protected final String TEXT_151 = ";";
+ protected final String TEXT_152 = NL + "\t\treturn new ";
+ protected final String TEXT_153 = "();";
+ protected final String TEXT_154 = NL + "\t}" + NL;
+ protected final String TEXT_155 = NL;
+ protected final String TEXT_156 = NL + "}";
+ protected final String TEXT_157 = NL;
public String generate(Object argument)
{
@@ -221,140 +222,140 @@ if (labelOffset != null) {
}
stringBuffer.append(TEXT_15);
- stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_16);
- stringBuffer.append(labelOffsetX);
+ stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_17);
- stringBuffer.append(labelOffsetY);
+ stringBuffer.append(labelOffsetX);
stringBuffer.append(TEXT_18);
- stringBuffer.append(genLabel.getEditPartClassName());
+ stringBuffer.append(labelOffsetY);
stringBuffer.append(TEXT_19);
- stringBuffer.append(genLabel.getAlignment());
+ stringBuffer.append(genLabel.getEditPartClassName());
stringBuffer.append(TEXT_20);
- final boolean needsRefreshBounds = false;
+ stringBuffer.append(genLabel.getAlignment());
stringBuffer.append(TEXT_21);
+ final boolean needsRefreshBounds = false;
stringBuffer.append(TEXT_22);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image"));
stringBuffer.append(TEXT_23);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Image"));
stringBuffer.append(TEXT_24);
stringBuffer.append(TEXT_25);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_26);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_27);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_28);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_29);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_30);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_31);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_32);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_33);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_34);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_35);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_36);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_37);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_38);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_39);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_40);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_41);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Label"));
stringBuffer.append(TEXT_42);
- stringBuffer.append(importManager.getImportedName("java.util.List"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_43);
- stringBuffer.append(importManager.getImportedName("java.util.Collections"));
+ stringBuffer.append(importManager.getImportedName("java.util.List"));
stringBuffer.append(TEXT_44);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"));
+ stringBuffer.append(importManager.getImportedName("java.util.Collections"));
stringBuffer.append(TEXT_45);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"));
stringBuffer.append(TEXT_46);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_47);
- stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_48);
stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_49);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_50);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_51);
- if (!genLabel.isReadOnly()) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_52);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ if (!genLabel.isReadOnly()) {
stringBuffer.append(TEXT_53);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_54);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ICellEditorValidator"));
+ }
stringBuffer.append(TEXT_55);
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ICellEditorValidator"));
stringBuffer.append(TEXT_56);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.viewers.ICellEditorValidator"));
stringBuffer.append(TEXT_57);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_58);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
stringBuffer.append(TEXT_59);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus"));
stringBuffer.append(TEXT_60);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.RunnableWithResult"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus"));
stringBuffer.append(TEXT_61);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.RunnableWithResult"));
stringBuffer.append(TEXT_62);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_63);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.text.contentassist.IContentAssistProcessor"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus"));
stringBuffer.append(TEXT_64);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.text.contentassist.IContentAssistProcessor"));
stringBuffer.append(TEXT_65);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_66);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_67);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions"));
stringBuffer.append(TEXT_68);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions"));
stringBuffer.append(TEXT_69);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.IParser"));
stringBuffer.append(TEXT_70);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_71);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_72);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter"));
stringBuffer.append(TEXT_73);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter"));
stringBuffer.append(TEXT_74);
- stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_75);
- stringBuffer.append(genHost.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
stringBuffer.append(TEXT_76);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserService"));
+ stringBuffer.append(genHost.getUniqueIdentifier());
stringBuffer.append(TEXT_77);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.common.ui.services.parser.ParserService"));
stringBuffer.append(TEXT_78);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
stringBuffer.append(TEXT_79);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_80);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_81);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
stringBuffer.append(TEXT_82);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.tools.DirectEditManager"));
stringBuffer.append(TEXT_83);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
stringBuffer.append(TEXT_84);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_85);
@@ -362,61 +363,61 @@ if (labelOffset != null) {
stringBuffer.append(TEXT_86);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_87);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager"));
stringBuffer.append(TEXT_88);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
stringBuffer.append(TEXT_89);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
stringBuffer.append(TEXT_90);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants"));
stringBuffer.append(TEXT_91);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants"));
stringBuffer.append(TEXT_92);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
stringBuffer.append(TEXT_93);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
stringBuffer.append(TEXT_94);
- if (needsRefreshBounds) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
stringBuffer.append(TEXT_95);
- }
+ if (needsRefreshBounds) {
stringBuffer.append(TEXT_96);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
+ }
stringBuffer.append(TEXT_97);
- stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
stringBuffer.append(TEXT_98);
stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_99);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_100);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_101);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_102);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_103);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_104);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_105);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_106);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_107);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_108);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_109);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel"));
stringBuffer.append(TEXT_110);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_111);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
stringBuffer.append(TEXT_112);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_113);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
stringBuffer.append(TEXT_114);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
stringBuffer.append(TEXT_115);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_116);
@@ -424,35 +425,35 @@ if (labelOffset != null) {
stringBuffer.append(TEXT_117);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_118);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
stringBuffer.append(TEXT_119);
- stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter"));
stringBuffer.append(TEXT_120);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore"));
stringBuffer.append(TEXT_121);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants"));
stringBuffer.append(TEXT_122);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
stringBuffer.append(TEXT_123);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
- stringBuffer.append(TEXT_124);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
- stringBuffer.append(TEXT_125);
+ stringBuffer.append(TEXT_124);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_125);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
stringBuffer.append(TEXT_126);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.AccessibleEditPart"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_127);
- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.accessibility.AccessibleEvent"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.AccessibleEditPart"));
stringBuffer.append(TEXT_128);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.accessibility.AccessibleEvent"));
stringBuffer.append(TEXT_129);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
stringBuffer.append(TEXT_130);
stringBuffer.append(TEXT_131);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_132);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry"));
- stringBuffer.append(TEXT_133);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(TEXT_133);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry"));
stringBuffer.append(TEXT_134);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_135);
@@ -464,18 +465,20 @@ if (labelOffset != null) {
stringBuffer.append(TEXT_138);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_139);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_140);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
stringBuffer.append(TEXT_141);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser"));
stringBuffer.append(TEXT_142);
stringBuffer.append(TEXT_143);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_144);
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_145);
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
stringBuffer.append(TEXT_146);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
+ stringBuffer.append(TEXT_147);
String figureQualifiedClassName = null;
Viewmap viewmap = genLabel.getViewmap();
@@ -485,30 +488,30 @@ if (viewmap instanceof FigureViewmap) {
figureQualifiedClassName = "org.eclipse.draw2d.Label";
}
- stringBuffer.append(TEXT_147);
- stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
stringBuffer.append(TEXT_148);
+ stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
+ stringBuffer.append(TEXT_149);
} // instanceof FigureViewmap
else if (viewmap instanceof SnippetViewmap) {
- stringBuffer.append(TEXT_149);
- stringBuffer.append(((SnippetViewmap) viewmap).getBody());
stringBuffer.append(TEXT_150);
+ stringBuffer.append(((SnippetViewmap) viewmap).getBody());
+ stringBuffer.append(TEXT_151);
} // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter
else if (viewmap instanceof InnerClassViewmap) {
figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();
- stringBuffer.append(TEXT_151);
- stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_152);
- }
+ stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_153);
- if (genLabel.getViewmap() instanceof InnerClassViewmap) {
+ }
stringBuffer.append(TEXT_154);
+ if (genLabel.getViewmap() instanceof InnerClassViewmap) {
+ stringBuffer.append(TEXT_155);
stringBuffer.append(((InnerClassViewmap) genLabel.getViewmap()).getClassBody());
}
- stringBuffer.append(TEXT_155);
- importManager.emitSortedImports();
stringBuffer.append(TEXT_156);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_157);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeEditPartGenerator.java
index 02641bb01..ce3a4a234 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeEditPartGenerator.java
@@ -25,8 +25,8 @@ public class NodeEditPartGenerator {
protected final String TEXT_6 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_7 = " extends ShapeNodeEditPart {";
protected final String TEXT_8 = NL;
- protected final String TEXT_9 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_10 = "\";";
+ protected final String TEXT_9 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_10 = ";";
protected final String TEXT_11 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure primaryShape;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
protected final String TEXT_12 = "(View view) {" + NL + "\t\tsuper(view);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createDefaultEditPolicies() {";
protected final String TEXT_13 = NL + "\t\tinstallEditPolicy(EditPolicyRoles.CREATION_ROLE, new ";
@@ -44,106 +44,108 @@ public class NodeEditPartGenerator {
protected final String TEXT_25 = ".";
protected final String TEXT_26 = ") {" + NL + "\t\t\t\t\t\t\t";
protected final String TEXT_27 = " compartmentEditPart =" + NL + "\t\t\t\t\t\t\t\tgetChildBySemanticHint(";
- protected final String TEXT_28 = ".VISUAL_ID);" + NL + "\t\t\t\t\t\t\treturn compartmentEditPart == null ? null : compartmentEditPart.getCommand(request);" + NL + "\t\t\t\t\t\t}";
- protected final String TEXT_29 = NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn super.getCommand(request);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}";
- protected final String TEXT_30 = NL + "\t\t);";
- protected final String TEXT_31 = NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ";
- protected final String TEXT_32 = "());" + NL + "\t\tinstallEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ";
- protected final String TEXT_33 = "());";
- protected final String TEXT_34 = NL + "\t\tinstallEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ";
- protected final String TEXT_35 = "());";
- protected final String TEXT_36 = NL + "\t\tinstallEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ";
- protected final String TEXT_37 = "());";
- protected final String TEXT_38 = NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new ";
- protected final String TEXT_39 = "() {" + NL + "" + NL + "\t\t\tprotected EditPolicy createChildEditPolicy(";
- protected final String TEXT_40 = " child) {" + NL + "\t\t\t\tEditPolicy result = super.createChildEditPolicy(child);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn new ";
- protected final String TEXT_41 = "();" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});";
- protected final String TEXT_42 = NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new ";
- protected final String TEXT_43 = "() {" + NL + "" + NL + "\t\t\tprotected EditPolicy createChildEditPolicy(";
- protected final String TEXT_44 = " child) {" + NL + "\t\t\t\tif (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null) {" + NL + "\t\t\t\t\tif (child instanceof ";
- protected final String TEXT_45 = ") {" + NL + "\t\t\t\t\t\treturn new ";
- protected final String TEXT_46 = "();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn super.createChildEditPolicy(child);" + NL + "\t\t\t}" + NL + "\t\t});";
- protected final String TEXT_47 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createNodeShape() {";
- protected final String TEXT_48 = NL + "\t\treturn primaryShape = new ";
- protected final String TEXT_49 = "()";
- protected final String TEXT_50 = " {" + NL + "\t\t\tprotected boolean useLocalCoordinates() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}";
- protected final String TEXT_51 = ";";
- protected final String TEXT_52 = NL + "\t\treturn ";
- protected final String TEXT_53 = ";";
- protected final String TEXT_54 = NL + "\t\t";
- protected final String TEXT_55 = " figure = new ";
- protected final String TEXT_56 = "();";
- protected final String TEXT_57 = NL + " \t\tfigure.setUseLocalCoordinates(true);";
- protected final String TEXT_58 = NL + " \t\treturn primaryShape = figure;";
- protected final String TEXT_59 = NL + "\t}";
- protected final String TEXT_60 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_61 = " getPrimaryShape() {" + NL + "\t\treturn (";
- protected final String TEXT_62 = ") primaryShape;" + NL + "\t}";
- protected final String TEXT_63 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild(EditPart childEditPart) {";
- protected final String TEXT_64 = NL + "\t\tif (childEditPart instanceof ";
- protected final String TEXT_65 = ") {";
- protected final String TEXT_66 = NL + "\t\t\t((";
- protected final String TEXT_67 = ") childEditPart).setLabel(getPrimaryShape().getFigure";
- protected final String TEXT_68 = "());";
- protected final String TEXT_69 = NL + "\t\t\t((";
- protected final String TEXT_70 = ") childEditPart).setLabel(new ";
- protected final String TEXT_71 = "());";
- protected final String TEXT_72 = NL + "\t\t\treturn true;" + NL + "\t\t}";
- protected final String TEXT_73 = NL + "\t\treturn false;" + NL + "\t}";
- protected final String TEXT_74 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodePlate() {";
- protected final String TEXT_75 = NL + "\t\treturn new DefaultSizeNodeFigure(getMapMode().DPtoLP(";
- protected final String TEXT_76 = "), getMapMode().DPtoLP(";
- protected final String TEXT_77 = "));" + NL + "\t}";
- protected final String TEXT_78 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPolicy getPrimaryDragEditPolicy() {" + NL + "\t\treturn new ";
- protected final String TEXT_79 = "() {" + NL + "\t\t\tprotected ";
- protected final String TEXT_80 = " createSelectionHandles() {" + NL + "\t\t\t\tfinal ";
- protected final String TEXT_81 = " part = (";
- protected final String TEXT_82 = ") getHost();" + NL + "\t\t\t\tfinal ";
- protected final String TEXT_83 = " list = new ";
- protected final String TEXT_84 = "();" + NL + "\t\t\t\taddMoveHandle(part, list);" + NL + "\t\t\t\t";
- protected final String TEXT_85 = NL + "\t\t\t\t";
- protected final String TEXT_86 = ".addHandle(part, list, ";
- protected final String TEXT_87 = ".";
- protected final String TEXT_88 = ");" + NL + "\t\t\t\t";
- protected final String TEXT_89 = NL + "\t\t\t\t";
- protected final String TEXT_90 = ".addHandle(part, list, ";
- protected final String TEXT_91 = ".";
- protected final String TEXT_92 = ");" + NL + "\t\t\t\t";
- protected final String TEXT_93 = NL + "\t\t\t\treturn list;" + NL + "\t\t\t}" + NL + "\t\t\tprivate void addMoveHandle(final ";
- protected final String TEXT_94 = " part, final ";
- protected final String TEXT_95 = " list) {" + NL + "\t\t\t\t";
- protected final String TEXT_96 = " moveHandle = new ";
- protected final String TEXT_97 = "(part);" + NL + "\t\t\t\tlist.add(moveHandle);" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}";
- protected final String TEXT_98 = NL + "\t/**" + NL + "\t * Creates figure for this edit part." + NL + "\t * " + NL + "\t * Body of this method does not depend on settings in generation model" + NL + "\t * so you may safely remove <i>generated</i> tag and modify it." + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodeFigure() {" + NL + "\t\tNodeFigure figure = createNodePlate();" + NL + "\t\tfigure.setLayoutManager(new StackLayout());" + NL + "\t\tIFigure shape = createNodeShape();" + NL + "\t\tfigure.add(shape);" + NL + "\t\tcontentPane = setupContentPane(shape);" + NL + "\t\treturn figure;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure setupContentPane(IFigure nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {";
- protected final String TEXT_99 = NL + "\t\t\t";
- protected final String TEXT_100 = " layout = new ";
- protected final String TEXT_101 = "();" + NL + "\t\t\tlayout.setSpacing(getMapMode().DPtoLP(5));" + NL + "\t\t\tnodeShape.setLayoutManager(layout);";
- protected final String TEXT_102 = NL + "\t\tnodeShape.setLayoutManager(new ";
- protected final String TEXT_103 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint(IFigure figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new ";
- protected final String TEXT_104 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});";
- protected final String TEXT_105 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\tif (contentPane != null) {" + NL + "\t\t\treturn contentPane;" + NL + "\t\t}" + NL + "\t\treturn super.getContentPane();" + NL + "\t}";
- protected final String TEXT_106 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
- protected final String TEXT_107 = " getPrimaryChildEditPart() {" + NL + "\t\treturn getChildBySemanticHint(";
- protected final String TEXT_108 = ".VISUAL_ID);" + NL + "\t}";
- protected final String TEXT_109 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(";
- protected final String TEXT_110 = " childEditPart, int index) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\tIFigure labelFigure = ((";
- protected final String TEXT_111 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t} else {";
- protected final String TEXT_112 = NL + "\t\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t\t}";
- protected final String TEXT_113 = NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);";
- protected final String TEXT_114 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual(";
- protected final String TEXT_115 = " childEditPart) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\tIFigure labelFigure = ((";
- protected final String TEXT_116 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel(";
- protected final String TEXT_117 = " childEditPart) {";
- protected final String TEXT_118 = NL + "\t\tif (childEditPart instanceof ";
- protected final String TEXT_119 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
- protected final String TEXT_120 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure getExternalLabelsContainer() {" + NL + "\t\t";
- protected final String TEXT_121 = " root = (";
- protected final String TEXT_122 = ") getRoot();" + NL + "\t\treturn root.getLayer(";
- protected final String TEXT_123 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL;
- protected final String TEXT_124 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(EditPart childEditPart, int index) {" + NL + "\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t}" + NL + "\t}";
- protected final String TEXT_125 = NL;
- protected final String TEXT_126 = NL + "}";
+ protected final String TEXT_28 = ".getType(";
+ protected final String TEXT_29 = ".VISUAL_ID));" + NL + "\t\t\t\t\t\t\treturn compartmentEditPart == null ? null : compartmentEditPart.getCommand(request);" + NL + "\t\t\t\t\t\t}";
+ protected final String TEXT_30 = NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn super.getCommand(request);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_31 = NL + "\t\t);";
+ protected final String TEXT_32 = NL + "\t\tsuper.createDefaultEditPolicies();" + NL + "\t\tinstallEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ";
+ protected final String TEXT_33 = "());" + NL + "\t\tinstallEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ";
+ protected final String TEXT_34 = "());";
+ protected final String TEXT_35 = NL + "\t\tinstallEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ";
+ protected final String TEXT_36 = "());";
+ protected final String TEXT_37 = NL + "\t\tinstallEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new ";
+ protected final String TEXT_38 = "());";
+ protected final String TEXT_39 = NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new ";
+ protected final String TEXT_40 = "() {" + NL + "" + NL + "\t\t\tprotected EditPolicy createChildEditPolicy(";
+ protected final String TEXT_41 = " child) {" + NL + "\t\t\t\tEditPolicy result = super.createChildEditPolicy(child);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn new ";
+ protected final String TEXT_42 = "();" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});";
+ protected final String TEXT_43 = NL + "\t\tinstallEditPolicy(EditPolicy.LAYOUT_ROLE, new ";
+ protected final String TEXT_44 = "() {" + NL + "" + NL + "\t\t\tprotected EditPolicy createChildEditPolicy(";
+ protected final String TEXT_45 = " child) {" + NL + "\t\t\t\tif (child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE) == null) {" + NL + "\t\t\t\t\tif (child instanceof ";
+ protected final String TEXT_46 = ") {" + NL + "\t\t\t\t\t\treturn new ";
+ protected final String TEXT_47 = "();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn super.createChildEditPolicy(child);" + NL + "\t\t\t}" + NL + "\t\t});";
+ protected final String TEXT_48 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createNodeShape() {";
+ protected final String TEXT_49 = NL + "\t\treturn primaryShape = new ";
+ protected final String TEXT_50 = "()";
+ protected final String TEXT_51 = " {" + NL + "\t\t\tprotected boolean useLocalCoordinates() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}";
+ protected final String TEXT_52 = ";";
+ protected final String TEXT_53 = NL + "\t\treturn ";
+ protected final String TEXT_54 = ";";
+ protected final String TEXT_55 = NL + "\t\t";
+ protected final String TEXT_56 = " figure = new ";
+ protected final String TEXT_57 = "();";
+ protected final String TEXT_58 = NL + " \t\tfigure.setUseLocalCoordinates(true);";
+ protected final String TEXT_59 = NL + " \t\treturn primaryShape = figure;";
+ protected final String TEXT_60 = NL + "\t}";
+ protected final String TEXT_61 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_62 = " getPrimaryShape() {" + NL + "\t\treturn (";
+ protected final String TEXT_63 = ") primaryShape;" + NL + "\t}";
+ protected final String TEXT_64 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild(EditPart childEditPart) {";
+ protected final String TEXT_65 = NL + "\t\tif (childEditPart instanceof ";
+ protected final String TEXT_66 = ") {";
+ protected final String TEXT_67 = NL + "\t\t\t((";
+ protected final String TEXT_68 = ") childEditPart).setLabel(getPrimaryShape().getFigure";
+ protected final String TEXT_69 = "());";
+ protected final String TEXT_70 = NL + "\t\t\t((";
+ protected final String TEXT_71 = ") childEditPart).setLabel(new ";
+ protected final String TEXT_72 = "());";
+ protected final String TEXT_73 = NL + "\t\t\treturn true;" + NL + "\t\t}";
+ protected final String TEXT_74 = NL + "\t\treturn false;" + NL + "\t}";
+ protected final String TEXT_75 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodePlate() {";
+ protected final String TEXT_76 = NL + "\t\treturn new DefaultSizeNodeFigure(getMapMode().DPtoLP(";
+ protected final String TEXT_77 = "), getMapMode().DPtoLP(";
+ protected final String TEXT_78 = "));" + NL + "\t}";
+ protected final String TEXT_79 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic EditPolicy getPrimaryDragEditPolicy() {" + NL + "\t\treturn new ";
+ protected final String TEXT_80 = "() {" + NL + "\t\t\tprotected ";
+ protected final String TEXT_81 = " createSelectionHandles() {" + NL + "\t\t\t\tfinal ";
+ protected final String TEXT_82 = " part = (";
+ protected final String TEXT_83 = ") getHost();" + NL + "\t\t\t\tfinal ";
+ protected final String TEXT_84 = " list = new ";
+ protected final String TEXT_85 = "();" + NL + "\t\t\t\taddMoveHandle(part, list);" + NL + "\t\t\t\t";
+ protected final String TEXT_86 = NL + "\t\t\t\t";
+ protected final String TEXT_87 = ".addHandle(part, list, ";
+ protected final String TEXT_88 = ".";
+ protected final String TEXT_89 = ");" + NL + "\t\t\t\t";
+ protected final String TEXT_90 = NL + "\t\t\t\t";
+ protected final String TEXT_91 = ".addHandle(part, list, ";
+ protected final String TEXT_92 = ".";
+ protected final String TEXT_93 = ");" + NL + "\t\t\t\t";
+ protected final String TEXT_94 = NL + "\t\t\t\treturn list;" + NL + "\t\t\t}" + NL + "\t\t\tprivate void addMoveHandle(final ";
+ protected final String TEXT_95 = " part, final ";
+ protected final String TEXT_96 = " list) {" + NL + "\t\t\t\t";
+ protected final String TEXT_97 = " moveHandle = new ";
+ protected final String TEXT_98 = "(part);" + NL + "\t\t\t\tlist.add(moveHandle);" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}";
+ protected final String TEXT_99 = NL + "\t/**" + NL + "\t * Creates figure for this edit part." + NL + "\t * " + NL + "\t * Body of this method does not depend on settings in generation model" + NL + "\t * so you may safely remove <i>generated</i> tag and modify it." + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodeFigure() {" + NL + "\t\tNodeFigure figure = createNodePlate();" + NL + "\t\tfigure.setLayoutManager(new StackLayout());" + NL + "\t\tIFigure shape = createNodeShape();" + NL + "\t\tfigure.add(shape);" + NL + "\t\tcontentPane = setupContentPane(shape);" + NL + "\t\treturn figure;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure setupContentPane(IFigure nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {";
+ protected final String TEXT_100 = NL + "\t\t\t";
+ protected final String TEXT_101 = " layout = new ";
+ protected final String TEXT_102 = "();" + NL + "\t\t\tlayout.setSpacing(getMapMode().DPtoLP(5));" + NL + "\t\t\tnodeShape.setLayoutManager(layout);";
+ protected final String TEXT_103 = NL + "\t\tnodeShape.setLayoutManager(new ";
+ protected final String TEXT_104 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint(IFigure figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new ";
+ protected final String TEXT_105 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});";
+ protected final String TEXT_106 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\tif (contentPane != null) {" + NL + "\t\t\treturn contentPane;" + NL + "\t\t}" + NL + "\t\treturn super.getContentPane();" + NL + "\t}";
+ protected final String TEXT_107 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
+ protected final String TEXT_108 = " getPrimaryChildEditPart() {" + NL + "\t\treturn getChildBySemanticHint(";
+ protected final String TEXT_109 = ".getType(";
+ protected final String TEXT_110 = ".VISUAL_ID));" + NL + "\t}";
+ protected final String TEXT_111 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(";
+ protected final String TEXT_112 = " childEditPart, int index) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\tIFigure labelFigure = ((";
+ protected final String TEXT_113 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t} else {";
+ protected final String TEXT_114 = NL + "\t\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t\t}";
+ protected final String TEXT_115 = NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);";
+ protected final String TEXT_116 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual(";
+ protected final String TEXT_117 = " childEditPart) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\tIFigure labelFigure = ((";
+ protected final String TEXT_118 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel(";
+ protected final String TEXT_119 = " childEditPart) {";
+ protected final String TEXT_120 = NL + "\t\tif (childEditPart instanceof ";
+ protected final String TEXT_121 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
+ protected final String TEXT_122 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure getExternalLabelsContainer() {" + NL + "\t\t";
+ protected final String TEXT_123 = " root = (";
+ protected final String TEXT_124 = ") getRoot();" + NL + "\t\treturn root.getLayer(";
+ protected final String TEXT_125 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL;
+ protected final String TEXT_126 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(EditPart childEditPart, int index) {" + NL + "\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t}" + NL + "\t}";
protected final String TEXT_127 = NL;
+ protected final String TEXT_128 = NL + "}";
+ protected final String TEXT_129 = NL;
protected final String getFeatureValueGetter(String containerName, GenFeature feature, boolean isContainerEObject, ImportAssistant importManager) {
StringBuffer result = new StringBuffer();
@@ -332,50 +334,52 @@ if (!genNode.getChildNodes().isEmpty() || hasChildrenInListCompartments) {
stringBuffer.append(TEXT_26);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_27);
- stringBuffer.append(importManager.getImportedName(compartment.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_28);
+ stringBuffer.append(importManager.getImportedName(compartment.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_29);
}
}
}
- stringBuffer.append(TEXT_29);
- }
stringBuffer.append(TEXT_30);
- }
+ }
stringBuffer.append(TEXT_31);
- stringBuffer.append(importManager.getImportedName(genNode.getItemSemanticEditPolicyQualifiedClassName()));
+ }
stringBuffer.append(TEXT_32);
- stringBuffer.append(importManager.getImportedName(genNode.getGraphicalNodeEditPolicyQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genNode.getItemSemanticEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_33);
- if (!genNode.getChildNodes().isEmpty()) {
+ stringBuffer.append(importManager.getImportedName(genNode.getGraphicalNodeEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_34);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy"));
+ if (!genNode.getChildNodes().isEmpty()) {
stringBuffer.append(TEXT_35);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy"));
stringBuffer.append(TEXT_36);
- stringBuffer.append(importManager.getImportedName(genNode.getCanonicalEditPolicyQualifiedClassName()));
+ }
stringBuffer.append(TEXT_37);
- if (useFlowLayout) {
+ stringBuffer.append(importManager.getImportedName(genNode.getCanonicalEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_38);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy"));
+ if (useFlowLayout) {
stringBuffer.append(TEXT_39);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy"));
stringBuffer.append(TEXT_40);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_41);
- } else {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy"));
stringBuffer.append(TEXT_42);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy"));
+ } else {
stringBuffer.append(TEXT_43);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy"));
stringBuffer.append(TEXT_44);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_45);
- stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart"));
stringBuffer.append(TEXT_46);
- }
+ stringBuffer.append(importManager.getImportedName(genDiagram.getTextSelectionEditPolicyQualifiedClassName()));
stringBuffer.append(TEXT_47);
+ }
+ stringBuffer.append(TEXT_48);
boolean hasFixedChildren = false;
String figureQualifiedClassName = null;
@@ -386,39 +390,39 @@ if (viewmap instanceof FigureViewmap) {
figureQualifiedClassName = "org.eclipse.draw2d.RectangleFigure";
}
- stringBuffer.append(TEXT_48);
- stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
stringBuffer.append(TEXT_49);
- if (useFlowLayout) {
+ stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
stringBuffer.append(TEXT_50);
- } // use flow layout
+ if (useFlowLayout) {
stringBuffer.append(TEXT_51);
+ } // use flow layout
+ stringBuffer.append(TEXT_52);
} // instanceof FigureViewmap
else if (viewmap instanceof SnippetViewmap) {
- stringBuffer.append(TEXT_52);
- stringBuffer.append(((SnippetViewmap) viewmap).getBody());
stringBuffer.append(TEXT_53);
+ stringBuffer.append(((SnippetViewmap) viewmap).getBody());
+ stringBuffer.append(TEXT_54);
} // instanceof SnippetViewmap; FIXME : obtain figure class name to generate getter
else if (viewmap instanceof InnerClassViewmap) {
figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();
- stringBuffer.append(TEXT_54);
- stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_55);
stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_56);
- if (!genNode.getChildNodes().isEmpty() && useFlowLayout) { /*otherwise, leave to figure's default value*/
+ stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_57);
- }
+ if (!genNode.getChildNodes().isEmpty() && useFlowLayout) { /*otherwise, leave to figure's default value*/
stringBuffer.append(TEXT_58);
}
stringBuffer.append(TEXT_59);
- if (figureQualifiedClassName != null) {
+ }
stringBuffer.append(TEXT_60);
- stringBuffer.append(figureQualifiedClassName);
+ if (figureQualifiedClassName != null) {
stringBuffer.append(TEXT_61);
stringBuffer.append(figureQualifiedClassName);
stringBuffer.append(TEXT_62);
+ stringBuffer.append(figureQualifiedClassName);
+ stringBuffer.append(TEXT_63);
List innerLabels = new ArrayList(genNode.getLabels().size());
for (Iterator it = genNode.getLabels().iterator(); it.hasNext(); ) {
@@ -430,7 +434,7 @@ if (viewmap instanceof FigureViewmap) {
if (!innerLabels.isEmpty()) {
hasFixedChildren = true;
- stringBuffer.append(TEXT_63);
+ stringBuffer.append(TEXT_64);
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) {
GenNodeLabel genLabel = (GenNodeLabel) it.next();
@@ -449,30 +453,30 @@ if (viewmap instanceof FigureViewmap) {
isAccessor = false;
}
- stringBuffer.append(TEXT_64);
- stringBuffer.append(labelEditPart);
stringBuffer.append(TEXT_65);
- if (isAccessor) {
- stringBuffer.append(TEXT_66);
stringBuffer.append(labelEditPart);
+ stringBuffer.append(TEXT_66);
+ if (isAccessor) {
stringBuffer.append(TEXT_67);
- stringBuffer.append(labelFigureClassName);
+ stringBuffer.append(labelEditPart);
stringBuffer.append(TEXT_68);
- } else {
+ stringBuffer.append(labelFigureClassName);
stringBuffer.append(TEXT_69);
- stringBuffer.append(labelEditPart);
+ } else {
stringBuffer.append(TEXT_70);
- stringBuffer.append(labelFigureClassName);
+ stringBuffer.append(labelEditPart);
stringBuffer.append(TEXT_71);
- }
+ stringBuffer.append(labelFigureClassName);
stringBuffer.append(TEXT_72);
- }
+ }
stringBuffer.append(TEXT_73);
+ }
+ stringBuffer.append(TEXT_74);
}
}
- stringBuffer.append(TEXT_74);
+ stringBuffer.append(TEXT_75);
int width = 40;
int height = 40;
@@ -482,83 +486,85 @@ if (defSizeAttrs != null) {
height = defSizeAttrs.getHeight();
}
- stringBuffer.append(TEXT_75);
- stringBuffer.append(width);
stringBuffer.append(TEXT_76);
- stringBuffer.append(height);
+ stringBuffer.append(width);
stringBuffer.append(TEXT_77);
+ stringBuffer.append(height);
+ stringBuffer.append(TEXT_78);
if (genNode.getViewmap().find(ResizeConstraints.class) != null) {
final ResizeConstraints rc = (ResizeConstraints) genNode.getViewmap().find(ResizeConstraints.class);
final String javaUtilList = importManager.getImportedName("java.util.List");
- stringBuffer.append(TEXT_78);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy"));
stringBuffer.append(TEXT_79);
- stringBuffer.append(javaUtilList);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy"));
stringBuffer.append(TEXT_80);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
+ stringBuffer.append(javaUtilList);
stringBuffer.append(TEXT_81);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
stringBuffer.append(TEXT_82);
- stringBuffer.append(javaUtilList);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
stringBuffer.append(TEXT_83);
- stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(javaUtilList);
stringBuffer.append(TEXT_84);
+ stringBuffer.append(importManager.getImportedName("java.util.ArrayList"));
+ stringBuffer.append(TEXT_85);
for (Iterator it = rc.getResizeHandleNames().iterator(); it.hasNext();) {
String next = (String) it.next();
- stringBuffer.append(TEXT_85);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.ResizableHandleKit"));
stringBuffer.append(TEXT_86);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.ResizableHandleKit"));
stringBuffer.append(TEXT_87);
- stringBuffer.append(next);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants"));
stringBuffer.append(TEXT_88);
+ stringBuffer.append(next);
+ stringBuffer.append(TEXT_89);
} for (Iterator it = rc.getNonResizeHandleNames().iterator(); it.hasNext();) {
String next = (String) it.next();
- stringBuffer.append(TEXT_89);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.NonResizableHandleKit"));
stringBuffer.append(TEXT_90);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.NonResizableHandleKit"));
stringBuffer.append(TEXT_91);
- stringBuffer.append(next);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants"));
stringBuffer.append(TEXT_92);
- }
+ stringBuffer.append(next);
stringBuffer.append(TEXT_93);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
+ }
stringBuffer.append(TEXT_94);
- stringBuffer.append(javaUtilList);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
stringBuffer.append(TEXT_95);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.MoveHandle"));
+ stringBuffer.append(javaUtilList);
stringBuffer.append(TEXT_96);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.MoveHandle"));
stringBuffer.append(TEXT_97);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.handles.MoveHandle"));
stringBuffer.append(TEXT_98);
+ }
+ stringBuffer.append(TEXT_99);
if (!useFlowLayout) {
String layoutClassName = importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout");
- stringBuffer.append(TEXT_99);
- stringBuffer.append(layoutClassName);
stringBuffer.append(TEXT_100);
stringBuffer.append(layoutClassName);
stringBuffer.append(TEXT_101);
- } else {
+ stringBuffer.append(layoutClassName);
stringBuffer.append(TEXT_102);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout"));
+ } else {
stringBuffer.append(TEXT_103);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout"));
stringBuffer.append(TEXT_104);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
stringBuffer.append(TEXT_105);
+ }
+ stringBuffer.append(TEXT_106);
if (!genNode.getLabels().isEmpty()) {
GenNodeLabel primaryLabel = (GenNodeLabel) genNode.getLabels().get(0);
- stringBuffer.append(TEXT_106);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_107);
- stringBuffer.append(importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_108);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(TEXT_109);
+ stringBuffer.append(importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_110);
}
boolean hasExternalLabels = false;
@@ -571,57 +577,57 @@ for (Iterator labels = genNode.getLabels().iterator(); labels.hasNext();) {
}
if (hasExternalLabels) {
- stringBuffer.append(TEXT_109);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
- stringBuffer.append(TEXT_110);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
stringBuffer.append(TEXT_111);
- if (hasFixedChildren) {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_112);
- } else {
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
stringBuffer.append(TEXT_113);
- }
+ if (hasFixedChildren) {
stringBuffer.append(TEXT_114);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
+ } else {
stringBuffer.append(TEXT_115);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
+ }
stringBuffer.append(TEXT_116);
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
stringBuffer.append(TEXT_117);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
+ stringBuffer.append(TEXT_118);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
+ stringBuffer.append(TEXT_119);
for (Iterator labels = genNode.getLabels().iterator(); labels.hasNext();) {
GenNodeLabel label = (GenNodeLabel) labels.next();
if (label instanceof GenExternalNodeLabel) {
- stringBuffer.append(TEXT_118);
+ stringBuffer.append(TEXT_120);
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_119);
+ stringBuffer.append(TEXT_121);
}
}
- stringBuffer.append(TEXT_120);
+ stringBuffer.append(TEXT_122);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart"));
- stringBuffer.append(TEXT_121);
+ stringBuffer.append(TEXT_123);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart"));
- stringBuffer.append(TEXT_122);
+ stringBuffer.append(TEXT_124);
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
- stringBuffer.append(TEXT_123);
+ stringBuffer.append(TEXT_125);
} else {
if (hasFixedChildren) {
- stringBuffer.append(TEXT_124);
+ stringBuffer.append(TEXT_126);
}
}
if (genNode.getViewmap() instanceof InnerClassViewmap) {
- stringBuffer.append(TEXT_125);
+ stringBuffer.append(TEXT_127);
stringBuffer.append(((InnerClassViewmap) genNode.getViewmap()).getClassBody());
}
- stringBuffer.append(TEXT_126);
+ stringBuffer.append(TEXT_128);
importManager.emitSortedImports();
- stringBuffer.append(TEXT_127);
+ stringBuffer.append(TEXT_129);
return stringBuffer.toString();
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeLabelEditPartGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeLabelEditPartGenerator.java
index c5a04c882..6bc220ef3 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeLabelEditPartGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/parts/NodeLabelEditPartGenerator.java
@@ -22,8 +22,8 @@ public class NodeLabelEditPartGenerator
protected final String TEXT_5 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
protected final String TEXT_6 = " extends CompartmentEditPart implements ITextAwareEditPart {";
protected final String TEXT_7 = NL;
- protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static String VISUAL_ID = \"";
- protected final String TEXT_9 = "\";";
+ protected final String TEXT_8 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic static final int VISUAL_ID = ";
+ protected final String TEXT_9 = ";";
protected final String TEXT_10 = NL;
protected final String TEXT_11 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
protected final String TEXT_12 = " manager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/ChildContainerCanonicalEditPolicyGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/ChildContainerCanonicalEditPolicyGenerator.java
index aa9855b89..7cf710901 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/ChildContainerCanonicalEditPolicyGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/ChildContainerCanonicalEditPolicyGenerator.java
@@ -47,9 +47,9 @@ public class ChildContainerCanonicalEditPolicyGenerator {
protected final String TEXT_28 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
protected final String TEXT_29 = NL + "\tswitch (nodeVID) {";
protected final String TEXT_30 = NL + "\tcase ";
- protected final String TEXT_31 = ": {";
+ protected final String TEXT_31 = ".VISUAL_ID: {";
protected final String TEXT_32 = NL + "\tif (";
- protected final String TEXT_33 = " == nodeVID) {";
+ protected final String TEXT_33 = ".VISUAL_ID == nodeVID) {";
protected final String TEXT_34 = NL + "\t\tresult.add(nextValue);";
protected final String TEXT_35 = NL;
protected final String TEXT_36 = "\t\tbreak;";
@@ -87,7 +87,7 @@ public class ChildContainerCanonicalEditPolicyGenerator {
protected final String TEXT_68 = ") ";
protected final String TEXT_69 = ";";
protected final String TEXT_70 = NL + "\t\tif (";
- protected final String TEXT_71 = " == ";
+ protected final String TEXT_71 = ".VISUAL_ID == ";
protected final String TEXT_72 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
protected final String TEXT_73 = NL + "\t\t\tphantomNodes.add(nextDestination);";
protected final String TEXT_74 = NL;
@@ -340,11 +340,11 @@ for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
GenNode nextNode = (GenNode) genNodesIterator.next();
if (generateSwitch) {
stringBuffer.append(TEXT_30);
- stringBuffer.append(nextNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_31);
} else {
stringBuffer.append(TEXT_32);
- stringBuffer.append(nextNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_33);
}
stringBuffer.append(TEXT_34);
@@ -464,7 +464,7 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
}
if (phantomsOnly) {
stringBuffer.append(TEXT_70);
- stringBuffer.append(phantomNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_71);
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_72);
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/DiagramCanonicalEditPolicyGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/DiagramCanonicalEditPolicyGenerator.java
index 33adf9808..485a5f9ca 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/DiagramCanonicalEditPolicyGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/policies/DiagramCanonicalEditPolicyGenerator.java
@@ -47,9 +47,9 @@ public class DiagramCanonicalEditPolicyGenerator {
protected final String TEXT_28 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
protected final String TEXT_29 = NL + "\tswitch (nodeVID) {";
protected final String TEXT_30 = NL + "\tcase ";
- protected final String TEXT_31 = ": {";
+ protected final String TEXT_31 = ".VISUAL_ID: {";
protected final String TEXT_32 = NL + "\tif (";
- protected final String TEXT_33 = " == nodeVID) {";
+ protected final String TEXT_33 = ".VISUAL_ID == nodeVID) {";
protected final String TEXT_34 = NL + "\t\tresult.add(nextValue);";
protected final String TEXT_35 = NL;
protected final String TEXT_36 = "\t\tbreak;";
@@ -82,7 +82,7 @@ public class DiagramCanonicalEditPolicyGenerator {
protected final String TEXT_63 = ") it.next();" + NL + "\tif (nextResourceObject == diagramModelObject) {" + NL + "\t\tcontinue;" + NL + "\t}" + NL + "\tint nodeVID = ";
protected final String TEXT_64 = ".INSTANCE.getNodeVisualID(diagram, nextResourceObject);" + NL + "\tswitch (nodeVID) {";
protected final String TEXT_65 = NL + "\tcase ";
- protected final String TEXT_66 = ": {" + NL + "\t\t\tphantomNodes.add(nextResourceObject);";
+ protected final String TEXT_66 = ".VISUAL_ID: {" + NL + "\t\t\tphantomNodes.add(nextResourceObject);";
protected final String TEXT_67 = NL;
protected final String TEXT_68 = "\t\tbreak;" + NL + "\t}";
protected final String TEXT_69 = "\t}" + NL + "}";
@@ -140,7 +140,7 @@ public class DiagramCanonicalEditPolicyGenerator {
protected final String TEXT_121 = " modelElement = view.getElement();" + NL + "\t\tint diagramElementVisualID = ";
protected final String TEXT_122 = ".getVisualID(view);" + NL + "\t\tswitch (diagramElementVisualID) {";
protected final String TEXT_123 = NL + "\t\tcase ";
- protected final String TEXT_124 = ":";
+ protected final String TEXT_124 = ".VISUAL_ID:";
protected final String TEXT_125 = " { myEObject2ViewMap.put(modelElement, view);" + NL + "\t\t\tstoreLinks(modelElement, getDiagram());" + NL + "\t\t}" + NL + "\t\tdefault: {" + NL + "\t\t}" + NL + "\t\tfor (";
protected final String TEXT_126 = " children = view.getChildren().iterator(); children.hasNext();) {" + NL + "\t\t\t";
protected final String TEXT_127 = " childView = (";
@@ -199,7 +199,7 @@ public class DiagramCanonicalEditPolicyGenerator {
protected final String TEXT_180 = " src = container;";
protected final String TEXT_181 = NL + "\t\t\tint linkVID = ";
protected final String TEXT_182 = ".INSTANCE.getLinkWithClassVisualID(nextValue);" + NL + "\t\t\tif (";
- protected final String TEXT_183 = " == linkVID) {" + NL + "\t\t\t\tmyLinkDescriptors.add(new LinkDescriptor(src, dst, nextValue, linkVID));" + NL + "\t\t\t}";
+ protected final String TEXT_183 = ".VISUAL_ID == linkVID) {" + NL + "\t\t\t\tmyLinkDescriptors.add(new LinkDescriptor(src, dst, nextValue, linkVID));" + NL + "\t\t\t}";
protected final String TEXT_184 = NL + "\t\t\t}";
protected final String TEXT_185 = NL + "\t\t}";
protected final String TEXT_186 = NL + "\t\t}";
@@ -221,74 +221,75 @@ public class DiagramCanonicalEditPolicyGenerator {
protected final String TEXT_202 = ") ";
protected final String TEXT_203 = ";";
protected final String TEXT_204 = NL + "\t\tif (";
- protected final String TEXT_205 = " == ";
+ protected final String TEXT_205 = ".VISUAL_ID == ";
protected final String TEXT_206 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
protected final String TEXT_207 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
protected final String TEXT_208 = ".";
protected final String TEXT_209 = ", ";
- protected final String TEXT_210 = "));";
+ protected final String TEXT_210 = ".VISUAL_ID));";
protected final String TEXT_211 = NL + "\t\t";
protected final String TEXT_212 = " nextNode = ViewService.createNode(diagram, nextDestination, ";
- protected final String TEXT_213 = ".VISUAL_ID, ";
- protected final String TEXT_214 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextDestination, nextNode);" + NL + "\t\tcreate";
- protected final String TEXT_215 = "Children(nextNode, nextDestination);";
- protected final String TEXT_216 = NL;
- protected final String TEXT_217 = NL + "\t\t}";
+ protected final String TEXT_213 = ".getType(";
+ protected final String TEXT_214 = ".VISUAL_ID), ";
+ protected final String TEXT_215 = ".DIAGRAM_PREFERENCES_HINT);" + NL + "\t\tmyEObject2NodeMap.put(nextDestination, nextNode);" + NL + "\t\tcreate";
+ protected final String TEXT_216 = "Children(nextNode, nextDestination);";
+ protected final String TEXT_217 = NL;
protected final String TEXT_218 = NL + "\t\t}";
- protected final String TEXT_219 = NL + "\t}";
- protected final String TEXT_220 = NL;
- protected final String TEXT_221 = "\tif (";
- protected final String TEXT_222 = ".eINSTANCE.get";
- protected final String TEXT_223 = "().isSuperTypeOf(containerMetaclass)) {";
- protected final String TEXT_224 = NL + "\t\tfor (";
- protected final String TEXT_225 = " destinations = ";
- protected final String TEXT_226 = ".iterator(); destinations.hasNext();) {" + NL + "\t\t\t";
- protected final String TEXT_227 = " nextDestination = (";
- protected final String TEXT_228 = ") destinations.next();";
- protected final String TEXT_229 = NL + "\t\t";
- protected final String TEXT_230 = " nextDestination = (";
- protected final String TEXT_231 = ") ";
- protected final String TEXT_232 = ";";
- protected final String TEXT_233 = NL + "\t\tif (";
- protected final String TEXT_234 = " == ";
- protected final String TEXT_235 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
- protected final String TEXT_236 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
- protected final String TEXT_237 = ".";
- protected final String TEXT_238 = ", ";
- protected final String TEXT_239 = "));";
- protected final String TEXT_240 = NL;
- protected final String TEXT_241 = NL + "\t\t}";
+ protected final String TEXT_219 = NL + "\t\t}";
+ protected final String TEXT_220 = NL + "\t}";
+ protected final String TEXT_221 = NL;
+ protected final String TEXT_222 = "\tif (";
+ protected final String TEXT_223 = ".eINSTANCE.get";
+ protected final String TEXT_224 = "().isSuperTypeOf(containerMetaclass)) {";
+ protected final String TEXT_225 = NL + "\t\tfor (";
+ protected final String TEXT_226 = " destinations = ";
+ protected final String TEXT_227 = ".iterator(); destinations.hasNext();) {" + NL + "\t\t\t";
+ protected final String TEXT_228 = " nextDestination = (";
+ protected final String TEXT_229 = ") destinations.next();";
+ protected final String TEXT_230 = NL + "\t\t";
+ protected final String TEXT_231 = " nextDestination = (";
+ protected final String TEXT_232 = ") ";
+ protected final String TEXT_233 = ";";
+ protected final String TEXT_234 = NL + "\t\tif (";
+ protected final String TEXT_235 = ".VISUAL_ID == ";
+ protected final String TEXT_236 = ".INSTANCE.getNodeVisualID(diagram, nextDestination)) {";
+ protected final String TEXT_237 = NL + "\t\tmyLinkDescriptors.add(new LinkDescriptor(container, nextDestination, ";
+ protected final String TEXT_238 = ".";
+ protected final String TEXT_239 = ", ";
+ protected final String TEXT_240 = ".VISUAL_ID));";
+ protected final String TEXT_241 = NL;
protected final String TEXT_242 = NL + "\t\t}";
- protected final String TEXT_243 = NL + "\t}";
- protected final String TEXT_244 = NL + "}" + NL + "\t";
- protected final String TEXT_245 = NL;
- protected final String TEXT_246 = "/**" + NL + " * @generated" + NL + " */" + NL + "private ";
- protected final String TEXT_247 = " getDiagram() {" + NL + "\treturn ((";
- protected final String TEXT_248 = ") getHost().getModel()).getDiagram();" + NL + "}" + NL;
- protected final String TEXT_249 = NL;
- protected final String TEXT_250 = "/**" + NL + " * @generated" + NL + " */" + NL + "private class LinkDescriptor {" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_251 = " mySource;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_252 = " myDestination;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_253 = " myLinkElement;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate int myVisualID;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
- protected final String TEXT_254 = " mySemanticAdapter;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
- protected final String TEXT_255 = " source, ";
- protected final String TEXT_256 = " destination, ";
- protected final String TEXT_257 = " linkElement, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = linkElement;" + NL + "\t\tmySemanticAdapter = new ";
- protected final String TEXT_258 = "(linkElement);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
- protected final String TEXT_259 = " source, ";
- protected final String TEXT_260 = " destination, ";
- protected final String TEXT_261 = " elementType, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = null;" + NL + "\t\tfinal ";
- protected final String TEXT_262 = " elementTypeCopy = elementType;" + NL + "\t\tmySemanticAdapter = new ";
- protected final String TEXT_263 = "() {" + NL + "\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\tif (";
- protected final String TEXT_264 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\treturn elementTypeCopy;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate LinkDescriptor(";
- protected final String TEXT_265 = " source, ";
- protected final String TEXT_266 = " destination, int linkVID) {" + NL + "\t\tmySource = source;" + NL + "\t\tmyDestination = destination;" + NL + "\t\tmyVisualID = linkVID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_267 = " getSource() {" + NL + "\t\treturn mySource;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_268 = " getDestination() {" + NL + "\t\treturn myDestination;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_269 = " getLinkElement() {" + NL + "\t\treturn myLinkElement;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected int getVisualID() {" + NL + "\t\treturn myVisualID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
- protected final String TEXT_270 = " getSemanticAdapter() {" + NL + "\t\treturn mySemanticAdapter;" + NL + "\t}" + NL + "}";
- protected final String TEXT_271 = NL + NL + "}";
- protected final String TEXT_272 = NL;
+ protected final String TEXT_243 = NL + "\t\t}";
+ protected final String TEXT_244 = NL + "\t}";
+ protected final String TEXT_245 = NL + "}" + NL + "\t";
+ protected final String TEXT_246 = NL;
+ protected final String TEXT_247 = "/**" + NL + " * @generated" + NL + " */" + NL + "private ";
+ protected final String TEXT_248 = " getDiagram() {" + NL + "\treturn ((";
+ protected final String TEXT_249 = ") getHost().getModel()).getDiagram();" + NL + "}" + NL;
+ protected final String TEXT_250 = NL;
+ protected final String TEXT_251 = "/**" + NL + " * @generated" + NL + " */" + NL + "private class LinkDescriptor {" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_252 = " mySource;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_253 = " myDestination;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_254 = " myLinkElement;" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate int myVisualID;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate ";
+ protected final String TEXT_255 = " mySemanticAdapter;" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
+ protected final String TEXT_256 = " source, ";
+ protected final String TEXT_257 = " destination, ";
+ protected final String TEXT_258 = " linkElement, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = linkElement;" + NL + "\t\tmySemanticAdapter = new ";
+ protected final String TEXT_259 = "(linkElement);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected LinkDescriptor(";
+ protected final String TEXT_260 = " source, ";
+ protected final String TEXT_261 = " destination, ";
+ protected final String TEXT_262 = " elementType, int linkVID) {" + NL + "\t\tthis(source, destination, linkVID);" + NL + "\t\tmyLinkElement = null;" + NL + "\t\tfinal ";
+ protected final String TEXT_263 = " elementTypeCopy = elementType;" + NL + "\t\tmySemanticAdapter = new ";
+ protected final String TEXT_264 = "() {" + NL + "\t\t\tpublic Object getAdapter(Class adapter) {" + NL + "\t\t\t\tif (";
+ protected final String TEXT_265 = ".class.equals(adapter)) {" + NL + "\t\t\t\t\treturn elementTypeCopy;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprivate LinkDescriptor(";
+ protected final String TEXT_266 = " source, ";
+ protected final String TEXT_267 = " destination, int linkVID) {" + NL + "\t\tmySource = source;" + NL + "\t\tmyDestination = destination;" + NL + "\t\tmyVisualID = linkVID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_268 = " getSource() {" + NL + "\t\treturn mySource;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_269 = " getDestination() {" + NL + "\t\treturn myDestination;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_270 = " getLinkElement() {" + NL + "\t\treturn myLinkElement;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected int getVisualID() {" + NL + "\t\treturn myVisualID;" + NL + "\t}" + NL + "\t\t" + NL + "\t/**" + NL + " \t * @generated" + NL + " */" + NL + "\tprotected ";
+ protected final String TEXT_271 = " getSemanticAdapter() {" + NL + "\t\treturn mySemanticAdapter;" + NL + "\t}" + NL + "}";
+ protected final String TEXT_272 = NL + NL + "}";
+ protected final String TEXT_273 = NL;
protected final String getFeatureValueGetter(String containerName, GenFeature feature, boolean isContainerEObject, ImportAssistant importManager) {
StringBuffer result = new StringBuffer();
@@ -492,11 +493,11 @@ for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
GenNode nextNode = (GenNode) genNodesIterator.next();
if (generateSwitch) {
stringBuffer.append(TEXT_30);
- stringBuffer.append(nextNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_31);
} else {
stringBuffer.append(TEXT_32);
- stringBuffer.append(nextNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_33);
}
stringBuffer.append(TEXT_34);
@@ -581,7 +582,7 @@ for (Iterator phantoms = genClass2Phantom.values().iterator(); phantoms.hasNext(
GenTopLevelNode phantomNode = (GenTopLevelNode) phantoms.next();
stringBuffer.append(TEXT_65);
- stringBuffer.append(phantomNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_66);
stringBuffer.append(TEXT_67);
stringBuffer.append(TEXT_68);
@@ -699,7 +700,7 @@ for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.
}
stringBuffer.append(TEXT_123);
- stringBuffer.append(nextContainer.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextContainer.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_124);
}
@@ -826,7 +827,7 @@ for (Iterator it = genLinks.iterator(); it.hasNext();) {
stringBuffer.append(TEXT_181);
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_182);
- stringBuffer.append(nextLink.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_183);
if (typeLinkModelFacet.getSourceMetaFeature() != null) {
stringBuffer.append(TEXT_184);
@@ -893,7 +894,7 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
}
if (phantomsOnly) {
stringBuffer.append(TEXT_204);
- stringBuffer.append(phantomNode.getVisualID());
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_205);
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_206);
@@ -903,34 +904,36 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
stringBuffer.append(TEXT_208);
stringBuffer.append(nextLink.getUniqueIdentifier());
stringBuffer.append(TEXT_209);
- stringBuffer.append(nextLink.getVisualID());
+ stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_210);
if (createPhantoms) {
stringBuffer.append(TEXT_211);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
stringBuffer.append(TEXT_212);
- stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_213);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_214);
- stringBuffer.append(phantomNode.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
stringBuffer.append(TEXT_215);
- }
+ stringBuffer.append(phantomNode.getUniqueIdentifier());
stringBuffer.append(TEXT_216);
- if (phantomsOnly) {
- stringBuffer.append(TEXT_217);
}
- if (genFeature.isListType()) {
+ stringBuffer.append(TEXT_217);
+ if (phantomsOnly) {
stringBuffer.append(TEXT_218);
}
+ if (genFeature.isListType()) {
stringBuffer.append(TEXT_219);
+ }
+ stringBuffer.append(TEXT_220);
}
for (int linkIndex = 0; linkIndex < genLinks.size(); linkIndex++) {
boolean phantomsOnly = false;
- stringBuffer.append(TEXT_220);
+ stringBuffer.append(TEXT_221);
GenLink nextLink = (GenLink) genLinks.get(linkIndex);
if (false == nextLink.getModelFacet() instanceof FeatureModelFacet) {
@@ -944,94 +947,92 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
continue;
}
- stringBuffer.append(TEXT_221);
- stringBuffer.append(importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName()));
stringBuffer.append(TEXT_222);
- stringBuffer.append(genFeature.getGenClass().getClassifierAccessorName());
+ stringBuffer.append(importManager.getImportedName(genFeature.getGenPackage().getQualifiedPackageInterfaceName()));
stringBuffer.append(TEXT_223);
- if (genFeature.isListType()) {
+ stringBuffer.append(genFeature.getGenClass().getClassifierAccessorName());
stringBuffer.append(TEXT_224);
- stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
+ if (genFeature.isListType()) {
stringBuffer.append(TEXT_225);
- stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
stringBuffer.append(TEXT_226);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
stringBuffer.append(TEXT_227);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_228);
- } else {
- stringBuffer.append(TEXT_229);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_229);
+ } else {
stringBuffer.append(TEXT_230);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_231);
- stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_232);
+ stringBuffer.append(getFeatureValueGetter("container", genFeature, true, importManager));
+ stringBuffer.append(TEXT_233);
}
if (phantomsOnly) {
- stringBuffer.append(TEXT_233);
- stringBuffer.append(phantomNode.getVisualID());
stringBuffer.append(TEXT_234);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(phantomNode.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_235);
- }
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_236);
- stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
+ }
stringBuffer.append(TEXT_237);
- stringBuffer.append(nextLink.getUniqueIdentifier());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName()));
stringBuffer.append(TEXT_238);
- stringBuffer.append(nextLink.getVisualID());
+ stringBuffer.append(nextLink.getUniqueIdentifier());
stringBuffer.append(TEXT_239);
+ stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_240);
- if (phantomsOnly) {
stringBuffer.append(TEXT_241);
- }
- if (genFeature.isListType()) {
+ if (phantomsOnly) {
stringBuffer.append(TEXT_242);
}
+ if (genFeature.isListType()) {
stringBuffer.append(TEXT_243);
- }
+ }
stringBuffer.append(TEXT_244);
+ }
stringBuffer.append(TEXT_245);
stringBuffer.append(TEXT_246);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram"));
stringBuffer.append(TEXT_247);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram"));
stringBuffer.append(TEXT_248);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
stringBuffer.append(TEXT_249);
+ stringBuffer.append(TEXT_250);
// an inner class
- stringBuffer.append(TEXT_250);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_251);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_252);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_253);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
- stringBuffer.append(TEXT_254);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_254);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
stringBuffer.append(TEXT_255);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_256);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_257);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
- stringBuffer.append(TEXT_258);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(TEXT_258);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter"));
stringBuffer.append(TEXT_259);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_260);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_261);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_262);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
- stringBuffer.append(TEXT_263);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
+ stringBuffer.append(TEXT_263);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
stringBuffer.append(TEXT_264);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.emf.type.core.IElementType"));
stringBuffer.append(TEXT_265);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_266);
@@ -1041,12 +1042,14 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
stringBuffer.append(TEXT_268);
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_269);
- stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
stringBuffer.append(TEXT_270);
- }
+ stringBuffer.append(importManager.getImportedName("org.eclipse.core.runtime.IAdaptable"));
stringBuffer.append(TEXT_271);
- importManager.emitSortedImports();
+ }
stringBuffer.append(TEXT_272);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_273);
return stringBuffer.toString();
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/MetricProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/MetricProviderGenerator.java
index 97ca9bf06..0d192d5bd 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/MetricProviderGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/MetricProviderGenerator.java
@@ -509,7 +509,7 @@ String __javaOperationContainer;
}
} /*end of scope*/
stringBuffer.append(TEXT_111);
- stringBuffer.append(nextMetric.getTarget() instanceof GenDiagramElementTarget ? ((GenDiagramElementTarget)nextMetric.getTarget()).getElement().getVisualID() : -1);
+ stringBuffer.append(nextMetric.getTarget() instanceof GenDiagramElementTarget ? importManager.getImportedName(((GenDiagramElementTarget) nextMetric.getTarget()).getElement().getEditPartQualifiedClassName()) + ".VISUAL_ID" : "-1");
stringBuffer.append(TEXT_112);
if(nextMetric.getLowLimit()!=null){
stringBuffer.append(TEXT_113);
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ParserProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ParserProviderGenerator.java
index 9789e3735..8a2a77211 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ParserProviderGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ParserProviderGenerator.java
@@ -62,11 +62,12 @@ public class ParserProviderGenerator
protected final String TEXT_43 = NL + "\t\t\treturn get";
protected final String TEXT_44 = "();";
protected final String TEXT_45 = NL + "\t\t\tif (";
- protected final String TEXT_46 = ".VISUAL_ID.equals(viewType)) {" + NL + "\t\t\t\treturn get";
- protected final String TEXT_47 = "();" + NL + "\t\t\t}";
- protected final String TEXT_48 = NL + "\t\t}";
- protected final String TEXT_49 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IParser getParser(IAdaptable hint) {" + NL + "\t\tString viewType = (String) hint.getAdapter(String.class);" + NL + "\t\tIElementType type = (IElementType) hint.getAdapter(IElementType.class);" + NL + "\t\tif (type == null) {" + NL + "\t\t\tEObject element = (EObject) hint.getAdapter(EObject.class);" + NL + "\t\t\ttype = ElementTypeRegistry.getInstance().getElementType(element);" + NL + "\t\t}" + NL + "\t\treturn getParser(type, viewType);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean provides(IOperation operation) {" + NL + "\t\tif (operation instanceof GetParserOperation) {" + NL + "\t\t\treturn getParser(((GetParserOperation) operation).getHint()) != null;" + NL + "\t\t}" + NL + "\t\treturn false;" + NL + "\t}" + NL + "}";
- protected final String TEXT_50 = NL;
+ protected final String TEXT_46 = ".getType(";
+ protected final String TEXT_47 = ".VISUAL_ID).equals(viewType)) {" + NL + "\t\t\t\treturn get";
+ protected final String TEXT_48 = "();" + NL + "\t\t\t}";
+ protected final String TEXT_49 = NL + "\t\t}";
+ protected final String TEXT_50 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IParser getParser(IAdaptable hint) {" + NL + "\t\tString viewType = (String) hint.getAdapter(String.class);" + NL + "\t\tIElementType type = (IElementType) hint.getAdapter(IElementType.class);" + NL + "\t\tif (type == null) {" + NL + "\t\t\tEObject element = (EObject) hint.getAdapter(EObject.class);" + NL + "\t\t\ttype = ElementTypeRegistry.getInstance().getElementType(element);" + NL + "\t\t}" + NL + "\t\treturn getParser(type, viewType);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic boolean provides(IOperation operation) {" + NL + "\t\tif (operation instanceof GetParserOperation) {" + NL + "\t\t\treturn getParser(((GetParserOperation) operation).getHint()) != null;" + NL + "\t\t}" + NL + "\t\treturn false;" + NL + "\t}" + NL + "}";
+ protected final String TEXT_51 = NL;
public String generate(Object argument)
{
@@ -240,19 +241,21 @@ for (Iterator it1 = labels.keySet().iterator(); it1.hasNext(); ) {
GenLabel genLabel = (GenLabel) it2.next();
stringBuffer.append(TEXT_45);
- stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_46);
- stringBuffer.append(labelMethodNames.get(genLabel));
+ stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_47);
+ stringBuffer.append(labelMethodNames.get(genLabel));
+ stringBuffer.append(TEXT_48);
}
}
- stringBuffer.append(TEXT_48);
- }
stringBuffer.append(TEXT_49);
- importManager.emitSortedImports();
+ }
stringBuffer.append(TEXT_50);
+ importManager.emitSortedImports();
+ stringBuffer.append(TEXT_51);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewFactoryGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewFactoryGenerator.java
index 6d4da6c72..4bd3b71bf 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewFactoryGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewFactoryGenerator.java
@@ -32,55 +32,59 @@ public class ViewFactoryGenerator
protected final String TEXT_14 = NL + "\tprotected void decorateView(View view, IAdaptable semanticAdapter, String diagramKind){" + NL + "\t\tsuper.decorateView(view, semanticAdapter, diagramKind);";
protected final String TEXT_15 = NL + "\tprotected void decorateView(View containerView, View view, IAdaptable semanticAdapter," + NL + "\t\t\tString semanticHint, int index, boolean persisted) {" + NL + "\t\tif (semanticHint == null) { ";
protected final String TEXT_16 = NL + "\t\t\tsemanticHint = ";
- protected final String TEXT_17 = ".VISUAL_ID;" + NL + "\t\t\tview.setType(semanticHint);" + NL + "\t\t}";
- protected final String TEXT_18 = NL + "\t\tsuper.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);" + NL + "\t\tif (!";
- protected final String TEXT_19 = ".MODEL_ID.equals(";
- protected final String TEXT_20 = ".getModelID(containerView))) {" + NL + "\t\t\t";
- protected final String TEXT_21 = " shortcutAnnotation = ";
- protected final String TEXT_22 = ".eINSTANCE.createEAnnotation();" + NL + "\t\t\tshortcutAnnotation.setSource(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\t\tshortcutAnnotation.getDetails().put(\"modelID\", ";
- protected final String TEXT_23 = ".MODEL_ID);" + NL + "\t\t}";
- protected final String TEXT_24 = NL + "\t\t";
- protected final String TEXT_25 = ".setStructuralFeatureValue(view, ";
- protected final String TEXT_26 = ".eINSTANCE.getLineStyle_LineColor()," + NL + "\t\t\t";
- protected final String TEXT_27 = ".colorToInteger(";
- protected final String TEXT_28 = ".";
- protected final String TEXT_29 = "));";
- protected final String TEXT_30 = NL + "\t\t";
- protected final String TEXT_31 = ".setStructuralFeatureValue(view, ";
- protected final String TEXT_32 = ".eINSTANCE.getFillStyle_FillColor()," + NL + "\t\t\t";
- protected final String TEXT_33 = ".colorToInteger(";
- protected final String TEXT_34 = ".";
- protected final String TEXT_35 = "));";
- protected final String TEXT_36 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, ";
- protected final String TEXT_37 = ".VISUAL_ID," + NL + "\t\t\t";
- protected final String TEXT_38 = ".APPEND, true, getPreferencesHint());";
- protected final String TEXT_39 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, ";
- protected final String TEXT_40 = ".VISUAL_ID," + NL + "\t\t\t";
- protected final String TEXT_41 = ".APPEND, true, getPreferencesHint());";
- protected final String TEXT_42 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, ";
- protected final String TEXT_43 = ".VISUAL_ID," + NL + "\t\t\t";
+ protected final String TEXT_17 = ".getType(";
+ protected final String TEXT_18 = ".VISUAL_ID);" + NL + "\t\t\tview.setType(semanticHint);" + NL + "\t\t}";
+ protected final String TEXT_19 = NL + "\t\tsuper.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);" + NL + "\t\tif (!";
+ protected final String TEXT_20 = ".MODEL_ID.equals(";
+ protected final String TEXT_21 = ".getModelID(containerView))) {" + NL + "\t\t\t";
+ protected final String TEXT_22 = " shortcutAnnotation = ";
+ protected final String TEXT_23 = ".eINSTANCE.createEAnnotation();" + NL + "\t\t\tshortcutAnnotation.setSource(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\t\tshortcutAnnotation.getDetails().put(\"modelID\", ";
+ protected final String TEXT_24 = ".MODEL_ID);" + NL + "\t\t}";
+ protected final String TEXT_25 = NL + "\t\t";
+ protected final String TEXT_26 = ".setStructuralFeatureValue(view, ";
+ protected final String TEXT_27 = ".eINSTANCE.getLineStyle_LineColor()," + NL + "\t\t\t";
+ protected final String TEXT_28 = ".colorToInteger(";
+ protected final String TEXT_29 = ".";
+ protected final String TEXT_30 = "));";
+ protected final String TEXT_31 = NL + "\t\t";
+ protected final String TEXT_32 = ".setStructuralFeatureValue(view, ";
+ protected final String TEXT_33 = ".eINSTANCE.getFillStyle_FillColor()," + NL + "\t\t\t";
+ protected final String TEXT_34 = ".colorToInteger(";
+ protected final String TEXT_35 = ".";
+ protected final String TEXT_36 = "));";
+ protected final String TEXT_37 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, ";
+ protected final String TEXT_38 = ".getType(";
+ protected final String TEXT_39 = ".VISUAL_ID)," + NL + "\t\t\t";
+ protected final String TEXT_40 = ".APPEND, true, getPreferencesHint());";
+ protected final String TEXT_41 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, ";
+ protected final String TEXT_42 = ".getType(";
+ protected final String TEXT_43 = ".VISUAL_ID)," + NL + "\t\t\t";
protected final String TEXT_44 = ".APPEND, true, getPreferencesHint());";
- protected final String TEXT_45 = NL + "\t}";
- protected final String TEXT_46 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_47 = " createStyles(View view) {" + NL + "\t\t";
- protected final String TEXT_48 = " styles = super.createStyles(view);" + NL + "\t\tstyles.add(";
- protected final String TEXT_49 = ".eINSTANCE.createShapeStyle());" + NL + "\t\treturn styles;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_50 = " createLayoutConstraint() {" + NL + "\t\treturn ";
- protected final String TEXT_51 = ".eINSTANCE.createBounds();" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeFromPreferences(View view) {" + NL + "\t\tsuper.initializeFromPreferences(view);" + NL + "" + NL + "\t\t";
- protected final String TEXT_52 = " store = (";
- protected final String TEXT_53 = ") getPreferencesHint().getPreferenceStore();" + NL + "" + NL + "\t\t// fill color" + NL + "\t\t";
- protected final String TEXT_54 = " fillRGB = ";
- protected final String TEXT_55 = ".getColor(store, ";
- protected final String TEXT_56 = ".PREF_FILL_COLOR);" + NL + "\t\t";
- protected final String TEXT_57 = ".setStructuralFeatureValue(view, ";
- protected final String TEXT_58 = ".eINSTANCE.getFillStyle_FillColor(), ";
- protected final String TEXT_59 = ".RGBToInteger(fillRGB));" + NL + "\t}";
- protected final String TEXT_60 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
- protected final String TEXT_61 = " getMeasurementUnit() {" + NL + "\t\treturn ";
- protected final String TEXT_62 = ".";
- protected final String TEXT_63 = "_LITERAL;" + NL + "\t}";
- protected final String TEXT_64 = NL + "}";
- protected final String TEXT_65 = NL;
+ protected final String TEXT_45 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, ";
+ protected final String TEXT_46 = ".getType(";
+ protected final String TEXT_47 = ".VISUAL_ID)," + NL + "\t\t\t";
+ protected final String TEXT_48 = ".APPEND, true, getPreferencesHint());";
+ protected final String TEXT_49 = NL + "\t}";
+ protected final String TEXT_50 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_51 = " createStyles(View view) {" + NL + "\t\t";
+ protected final String TEXT_52 = " styles = super.createStyles(view);" + NL + "\t\tstyles.add(";
+ protected final String TEXT_53 = ".eINSTANCE.createShapeStyle());" + NL + "\t\treturn styles;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_54 = " createLayoutConstraint() {" + NL + "\t\treturn ";
+ protected final String TEXT_55 = ".eINSTANCE.createBounds();" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeFromPreferences(View view) {" + NL + "\t\tsuper.initializeFromPreferences(view);" + NL + "" + NL + "\t\t";
+ protected final String TEXT_56 = " store = (";
+ protected final String TEXT_57 = ") getPreferencesHint().getPreferenceStore();" + NL + "" + NL + "\t\t// fill color" + NL + "\t\t";
+ protected final String TEXT_58 = " fillRGB = ";
+ protected final String TEXT_59 = ".getColor(store, ";
+ protected final String TEXT_60 = ".PREF_FILL_COLOR);" + NL + "\t\t";
+ protected final String TEXT_61 = ".setStructuralFeatureValue(view, ";
+ protected final String TEXT_62 = ".eINSTANCE.getFillStyle_FillColor(), ";
+ protected final String TEXT_63 = ".RGBToInteger(fillRGB));" + NL + "\t}";
+ protected final String TEXT_64 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
+ protected final String TEXT_65 = " getMeasurementUnit() {" + NL + "\t\treturn ";
+ protected final String TEXT_66 = ".";
+ protected final String TEXT_67 = "_LITERAL;" + NL + "\t}";
+ protected final String TEXT_68 = NL + "}";
+ protected final String TEXT_69 = NL;
public String generate(Object argument)
{
@@ -144,52 +148,54 @@ if (isDiagram) {
stringBuffer.append(TEXT_15);
/* [++] importmant for the create shortcut functionality*/
stringBuffer.append(TEXT_16);
- stringBuffer.append(genElement.getEditPartQualifiedClassName());
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_17);
- /* [--] importmant for the create shortcut functionality*/
+ stringBuffer.append(genElement.getEditPartQualifiedClassName());
stringBuffer.append(TEXT_18);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
+ /* [--] importmant for the create shortcut functionality*/
stringBuffer.append(TEXT_19);
- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_20);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_21);
- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EcoreFactory"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation"));
stringBuffer.append(TEXT_22);
- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EcoreFactory"));
stringBuffer.append(TEXT_23);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_24);
}
ColorAttributes colorAttrs = genElement.getViewmap() != null ? (ColorAttributes) genElement.getViewmap().find(ColorAttributes.class) : null;
if (colorAttrs != null && colorAttrs.getForegroundColor() != null && colorAttrs.getForegroundColor().trim().length() > 0) {
- stringBuffer.append(TEXT_24);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
stringBuffer.append(TEXT_25);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
stringBuffer.append(TEXT_26);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_27);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities"));
stringBuffer.append(TEXT_28);
- stringBuffer.append(colorAttrs.getForegroundColor());
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants"));
stringBuffer.append(TEXT_29);
+ stringBuffer.append(colorAttrs.getForegroundColor());
+ stringBuffer.append(TEXT_30);
}
if (isNode) {
GenNode genNode = (GenNode) genElement;
if (colorAttrs != null && colorAttrs.getBackgroundColor() != null && colorAttrs.getBackgroundColor().trim().length() > 0) {
- stringBuffer.append(TEXT_30);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
stringBuffer.append(TEXT_31);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
stringBuffer.append(TEXT_32);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
stringBuffer.append(TEXT_33);
- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants"));
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities"));
stringBuffer.append(TEXT_34);
- stringBuffer.append(colorAttrs.getBackgroundColor());
+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants"));
stringBuffer.append(TEXT_35);
+ stringBuffer.append(colorAttrs.getBackgroundColor());
+ stringBuffer.append(TEXT_36);
}
if (!isLeaf) {
@@ -197,11 +203,13 @@ if (isNode) {
for (int j = 0; j < labels.size(); j++) {
GenNodeLabel label = (GenNodeLabel) labels.get(j);
- stringBuffer.append(TEXT_36);
- stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_37);
- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
stringBuffer.append(TEXT_38);
+ stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
+ stringBuffer.append(TEXT_39);
+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
+ stringBuffer.append(TEXT_40);
}
}
@@ -209,11 +217,13 @@ if (isNode) {
for (int j = 0; j < genChildContainers.size(); j++) {
GenCompartment genChildContainer = (GenCompartment) genChildContainers.get(j);
- stringBuffer.append(TEXT_39);
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(TEXT_42);
stringBuffer.append(importManager.getImportedName(genChildContainer.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_40);
+ stringBuffer.append(TEXT_43);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
- stringBuffer.append(TEXT_41);
+ stringBuffer.append(TEXT_44);
}
} else if (isLink) {
@@ -222,57 +232,59 @@ if (isNode) {
for (int j = 0; j < labels.size(); j++) {
GenLinkLabel label = (GenLinkLabel) labels.get(j);
- stringBuffer.append(TEXT_42);
+ stringBuffer.append(TEXT_45);
+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
+ stringBuffer.append(TEXT_46);
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
- stringBuffer.append(TEXT_43);
+ stringBuffer.append(TEXT_47);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
- stringBuffer.append(TEXT_44);
+ stringBuffer.append(TEXT_48);
}
}
- stringBuffer.append(TEXT_45);
+ stringBuffer.append(TEXT_49);
if (isFlowLayout) {
- stringBuffer.append(TEXT_46);
+ stringBuffer.append(TEXT_50);
stringBuffer.append(importManager.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_47);
+ stringBuffer.append(TEXT_51);
stringBuffer.append(importManager.getImportedName("java.util.List"));
- stringBuffer.append(TEXT_48);
+ stringBuffer.append(TEXT_52);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
- stringBuffer.append(TEXT_49);
+ stringBuffer.append(TEXT_53);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LayoutConstraint"));
- stringBuffer.append(TEXT_50);
+ stringBuffer.append(TEXT_54);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
- stringBuffer.append(TEXT_51);
+ stringBuffer.append(TEXT_55);
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore"));
- stringBuffer.append(TEXT_52);
+ stringBuffer.append(TEXT_56);
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore"));
- stringBuffer.append(TEXT_53);
+ stringBuffer.append(TEXT_57);
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.RGB"));
- stringBuffer.append(TEXT_54);
+ stringBuffer.append(TEXT_58);
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter"));
- stringBuffer.append(TEXT_55);
+ stringBuffer.append(TEXT_59);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants"));
- stringBuffer.append(TEXT_56);
+ stringBuffer.append(TEXT_60);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil"));
- stringBuffer.append(TEXT_57);
+ stringBuffer.append(TEXT_61);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
- stringBuffer.append(TEXT_58);
+ stringBuffer.append(TEXT_62);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities"));
- stringBuffer.append(TEXT_59);
+ stringBuffer.append(TEXT_63);
}
if (isDiagram && genDiagram.getUnits() != null && genDiagram.getUnits().trim().length() > 0) {
- stringBuffer.append(TEXT_60);
+ stringBuffer.append(TEXT_64);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.MeasurementUnit"));
- stringBuffer.append(TEXT_61);
+ stringBuffer.append(TEXT_65);
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.MeasurementUnit"));
- stringBuffer.append(TEXT_62);
+ stringBuffer.append(TEXT_66);
stringBuffer.append(genDiagram.getUnits().toUpperCase());
- stringBuffer.append(TEXT_63);
+ stringBuffer.append(TEXT_67);
}
- stringBuffer.append(TEXT_64);
+ stringBuffer.append(TEXT_68);
importManager.emitSortedImports();
- stringBuffer.append(TEXT_65);
+ stringBuffer.append(TEXT_69);
return stringBuffer.toString();
}
}
diff --git a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewProviderGenerator.java b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewProviderGenerator.java
index c2864b33e..0a39304af 100644
--- a/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewProviderGenerator.java
+++ b/plugins/org.eclipse.gmf.codegen/src-templates/org/eclipse/gmf/codegen/templates/providers/ViewProviderGenerator.java
@@ -33,13 +33,13 @@ public class ViewProviderGenerator
protected final String TEXT_15 = ".class;" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Class getNodeViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) {" + NL + "\t\tif (containerView == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "" + NL + "\t\tEClass semanticType = getSemanticEClass(semanticAdapter);" + NL + "\t\tEObject semanticElement = getSemanticElement(semanticAdapter);" + NL + "\t\tint nodeVID = ";
protected final String TEXT_16 = ".INSTANCE.getNodeVisualID(containerView, semanticElement, semanticType, semanticHint);" + NL + "" + NL + "\t\tswitch (nodeVID) {";
protected final String TEXT_17 = NL + "\t\tcase ";
- protected final String TEXT_18 = ":" + NL + "\t\t\t return ";
+ protected final String TEXT_18 = ".VISUAL_ID:" + NL + "\t\t\t return ";
protected final String TEXT_19 = ".class;";
protected final String TEXT_20 = NL + "\t\tcase ";
- protected final String TEXT_21 = ":" + NL + "\t\t\treturn ";
+ protected final String TEXT_21 = ".VISUAL_ID:" + NL + "\t\t\treturn ";
protected final String TEXT_22 = ".class;";
protected final String TEXT_23 = NL + "\t\tcase ";
- protected final String TEXT_24 = ":" + NL + "\t\t\treturn ";
+ protected final String TEXT_24 = ".VISUAL_ID:" + NL + "\t\t\treturn ";
protected final String TEXT_25 = ".class;";
protected final String TEXT_26 = NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected Class getEdgeViewClass(IAdaptable semanticAdapter, View containerView, String semanticHint) {";
protected final String TEXT_27 = NL + "\t\t";
@@ -51,7 +51,7 @@ public class ViewProviderGenerator
protected final String TEXT_33 = NL + NL + "\t\tEClass semanticType = getSemanticEClass(semanticAdapter);" + NL + "\t\tEObject semanticElement = getSemanticElement(semanticAdapter);" + NL + "" + NL + "\t\tint linkVID = ";
protected final String TEXT_34 = ".INSTANCE.getLinkWithClassVisualID(semanticElement, semanticType);" + NL + "\t\t" + NL + "\t\tswitch (linkVID) {";
protected final String TEXT_35 = NL + "\t\tcase ";
- protected final String TEXT_36 = ":" + NL + "\t\t\treturn ";
+ protected final String TEXT_36 = ".VISUAL_ID:" + NL + "\t\t\treturn ";
protected final String TEXT_37 = ".class;";
protected final String TEXT_38 = NL + "\t\t}" + NL + "\t\treturn getUnrecognizedConnectorViewClass(semanticAdapter, containerView, semanticHint);" + NL + "\t}";
protected final String TEXT_39 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
@@ -107,7 +107,7 @@ for (Iterator containers = genDiagram.getAllChildContainers().iterator(); contai
GenContainerBase container = (GenContainerBase) containers.next();
stringBuffer.append(TEXT_17);
- stringBuffer.append(container.getVisualID());
+ stringBuffer.append(importManager.getImportedName(container.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_18);
stringBuffer.append(importManager.getImportedName(container.getNotationViewFactoryQualifiedClassName()));
stringBuffer.append(TEXT_19);
@@ -118,7 +118,7 @@ for (Iterator containers = genDiagram.getAllChildContainers().iterator(); contai
GenNodeLabel label = (GenNodeLabel) labels.next();
stringBuffer.append(TEXT_20);
- stringBuffer.append(label.getVisualID());
+ stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_21);
stringBuffer.append(importManager.getImportedName(label.getNotationViewFactoryQualifiedClassName()));
stringBuffer.append(TEXT_22);
@@ -132,7 +132,7 @@ for (Iterator links = genLinks.iterator(); links.hasNext();) {
GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next();
stringBuffer.append(TEXT_23);
- stringBuffer.append(linkLabel.getVisualID());
+ stringBuffer.append(importManager.getImportedName(linkLabel.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_24);
stringBuffer.append(importManager.getImportedName(linkLabel.getNotationViewFactoryQualifiedClassName()));
stringBuffer.append(TEXT_25);
@@ -175,7 +175,7 @@ for (int i = 0; i < genLinks.size(); i++) {
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
stringBuffer.append(TEXT_35);
- stringBuffer.append(genLink.getVisualID());
+ stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
stringBuffer.append(TEXT_36);
stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName()));
stringBuffer.append(TEXT_37);
diff --git a/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet b/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
index 182397a92..0f5ded03d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/editor/NewDiagramFileWizard.javajet
@@ -123,7 +123,7 @@ public class <%=genDiagram.getNewDiagramFileWizardClassName()%> extends Wizard {
AbstractTransactionalCommand command = new AbstractTransactionalCommand(myEditingDomain, "Initializing diagram contents", affectedFiles) { //$NON-NLS-1$
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
int diagramVID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.INSTANCE.getDiagramVisualID(diagramModelObject);
- if (diagramVID != <%=genDiagram.getVisualID()%>) {
+ if (diagramVID != <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.VISUAL_ID) {
return CommandResult.newErrorCommandResult("Incorrect model object stored as a root resource object"); //$NON-NLS-1$
}
Diagram diagram = ViewService.createDiagram(diagramModelObject, <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.MODEL_ID, <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
diff --git a/plugins/org.eclipse.gmf.codegen/templates/editor/VisualIDRegistry.javajet b/plugins/org.eclipse.gmf.codegen/templates/editor/VisualIDRegistry.javajet
index 7cadd0778..2721f623f 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/editor/VisualIDRegistry.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/editor/VisualIDRegistry.javajet
@@ -39,17 +39,12 @@ public class <%=genDiagram.getVisualIDRegistryClassName()%> {
public static int getVisualID(View view) {
if (view instanceof Diagram) {
if (<%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.MODEL_ID.equals(view.getType())) {
- return <%=genDiagram.getVisualID()%>;
+ return <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.VISUAL_ID;
} else {
return -1;
}
}
- try {
- return Integer.parseInt(view.getType());
- } catch (NumberFormatException e) {
- <%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.getInstance().logInfo("Unable to parse view type as a visualID number: " + view.getType());
- }
- return -1;
+ return getVisualID(view.getType());
}
/**
@@ -66,7 +61,26 @@ public class <%=genDiagram.getVisualIDRegistryClassName()%> {
}
return diagram != null ? diagram.getType() : null;
}
-
+
+ /**
+ * @generated
+ */
+ public static int getVisualID(String type) {
+ try {
+ return Integer.parseInt(type);
+ } catch (NumberFormatException e) {
+ <%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.getInstance().logInfo("Unable to parse view type as a visualID number: " + type);
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static String getType(int visualID) {
+ return String.valueOf(visualID);
+ }
+
/**
* @generated
*/
@@ -88,7 +102,7 @@ if (genDiagram.getDomainDiagramElement() != null) {
String interfaceName = importManager.getImportedName(genDiagram.getDomainDiagramElement().getQualifiedInterfaceName());
%>
if (<%=genDiagram.getMetaPackageName(importManager)%>.eINSTANCE.get<%=classifierAccessorName%>().equals(domainElementMetaclass) && (domainElement == null || isDiagram<%=genDiagram.getUniqueIdentifier()%>((<%=interfaceName%>) domainElement))) {
- return <%=genDiagram.getVisualID()%>;
+ return <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.VISUAL_ID;
}
<%}%>
return getUnrecognizedDiagramID(domainElement);
@@ -130,33 +144,34 @@ for (Iterator it = genDiagram.getShortcutsProvidedFor().iterator(); it.hasNext()
containerVisualID = getVisualID(containerView);
} else {
if (containerView instanceof Diagram) {
- containerVisualID = <%=genDiagram.getVisualID()%>;
+ containerVisualID = <%=importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())%>.VISUAL_ID;
} else {
return -1;
}
}
+ int nodeVisualID = getVisualID(semanticHint);
switch (containerVisualID) {
<%
for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
GenContainerBase nextContainer = (GenContainerBase) containers.next();
%>
- case <%=nextContainer.getVisualID()%>:
+ case <%=importManager.getImportedName(nextContainer.getEditPartQualifiedClassName())%>.VISUAL_ID:
<%
if (nextContainer instanceof GenNode) {
GenNode node = (GenNode) nextContainer;
for (Iterator labels = node.getLabels().iterator(); labels.hasNext() && !node.isListContainerEntry();) {
GenNodeLabel label = (GenNodeLabel) labels.next();
%>
- if (<%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID.equals(semanticHint)) {
- return <%=label.getVisualID()%>;
+ if (<%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID == nodeVisualID) {
+ return <%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID;
}
<%
}
for (Iterator compartments = node.getCompartments().iterator(); compartments.hasNext();) {
GenCompartment compartment = (GenCompartment) compartments.next();
%>
- if (<%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID.equals(semanticHint)) {
- return <%=compartment.getVisualID()%>;
+ if (<%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID == nodeVisualID) {
+ return <%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID;
}
<%
}
@@ -168,8 +183,8 @@ for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
final String interfaceName = importManager.getImportedName(childNode.getDomainMetaClass().getQualifiedInterfaceName());
final String semanticPackageInterfaceName = importManager.getImportedName(childNode.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName());
%>
- if ((semanticHint == null || <%=importManager.getImportedName(childNode.getEditPartQualifiedClassName())%>.VISUAL_ID.equals(semanticHint)) && <%=semanticPackageInterfaceName%>.eINSTANCE.get<%=classifierAccessorName%>().equals(domainElementMetaclass) && (domainElement == null || isNode<%=childNode.getUniqueIdentifier()%>((<%=interfaceName%>) domainElement))) {
- return <%=childNode.getVisualID()%>;
+ if ((semanticHint == null || <%=importManager.getImportedName(childNode.getEditPartQualifiedClassName())%>.VISUAL_ID == nodeVisualID) && <%=semanticPackageInterfaceName%>.eINSTANCE.get<%=classifierAccessorName%>().equals(domainElementMetaclass) && (domainElement == null || isNode<%=childNode.getUniqueIdentifier()%>((<%=interfaceName%>) domainElement))) {
+ return <%=importManager.getImportedName(childNode.getEditPartQualifiedClassName())%>.VISUAL_ID;
}
<%
}
@@ -180,13 +195,13 @@ for (Iterator containers = allContainers.iterator(); containers.hasNext();) {
for (Iterator links = genLinks.iterator(); links.hasNext();) {
GenLink link = (GenLink) links.next();
%>
- case <%=link.getVisualID()%>:
+ case <%=importManager.getImportedName(link.getEditPartQualifiedClassName())%>.VISUAL_ID:
<%
for (Iterator linkLabels = link.getLabels().iterator(); linkLabels.hasNext();) {
GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next();
%>
- if (<%=importManager.getImportedName(linkLabel.getEditPartQualifiedClassName())%>.VISUAL_ID.equals(semanticHint)) {
- return <%=linkLabel.getVisualID()%>;
+ if (<%=importManager.getImportedName(linkLabel.getEditPartQualifiedClassName())%>.VISUAL_ID == nodeVisualID) {
+ return <%=importManager.getImportedName(linkLabel.getEditPartQualifiedClassName())%>.VISUAL_ID;
}
<% }%>
return getUnrecognized<%=link.getUniqueIdentifier()%>LinkLabelID(semanticHint);
@@ -217,7 +232,7 @@ for (int i = 0; i < genLinks.size(); i++) {
final String semanticPackageInterfaceName = importManager.getImportedName(modelFacet.getMetaClass().getGenPackage().getQualifiedPackageInterfaceName());
%>
if (<%=semanticPackageInterfaceName%>.eINSTANCE.get<%=semanticLinkInterfaceName%>().equals(domainElementMetaclass) && (domainElement == null || isLinkWithClass<%=genLink.getUniqueIdentifier()%>((<%=importManager.getImportedName(qualifiedInterfaceName)%>) domainElement))) {
- return <%=genLink.getVisualID()%>;
+ return <%=importManager.getImportedName(genLink.getEditPartQualifiedClassName())%>.VISUAL_ID;
} else
<%
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramEditPart.javajet b/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramEditPart.javajet
index 26ab43012..07126b6cd 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramEditPart.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/DiagramEditPart.javajet
@@ -21,6 +21,10 @@ public class <%=genDiagram.getEditPartClassName()%> extends DiagramEditPart {
* @generated
*/
public static String MODEL_ID = "<%=genDiagram.getEditorGen().getModelID()%>";
+<%{
+GenCommonBase genCommonBase = genDiagram;%>
+<%@ include file="visualID.jetinc"%>
+<%}%>
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/EditPartFactory.javajet b/plugins/org.eclipse.gmf.codegen/templates/parts/EditPartFactory.javajet
index d79aa99de..1883865f5 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/EditPartFactory.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/EditPartFactory.javajet
@@ -52,7 +52,7 @@ public class <%=genDiagram.getEditPartFactoryClassName()%> implements EditPartFa
for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.hasNext();) {
GenContainerBase container = (GenContainerBase) containers.next();
%>
- case <%=container.getVisualID()%>:
+ case <%=importManager.getImportedName(container.getEditPartQualifiedClassName())%>.VISUAL_ID:
return new <%=container.getEditPartClassName()%>(view);
<%
if (container instanceof GenNode && !((GenNode) container).isListContainerEntry()) {
@@ -60,7 +60,7 @@ for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.
for (Iterator labels = node.getLabels().iterator(); labels.hasNext();) {
GenNodeLabel label = (GenNodeLabel) labels.next();
%>
- case <%=label.getVisualID()%>:
+ case <%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID:
return new <%=label.getEditPartClassName()%>(view);
<%
}
@@ -69,13 +69,13 @@ for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.
for (Iterator links = genDiagram.getLinks().iterator(); links.hasNext();) {
GenLink link = (GenLink) links.next();
%>
- case <%=link.getVisualID()%>:
+ case <%=importManager.getImportedName(link.getEditPartQualifiedClassName())%>.VISUAL_ID:
return new <%=link.getEditPartClassName()%>(view);
<%
for (Iterator linkLabels = link.getLabels().iterator(); linkLabels.hasNext();) {
GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next();
%>
- case <%=linkLabel.getVisualID()%>:
+ case <%=importManager.getImportedName(linkLabel.getEditPartQualifiedClassName())%>.VISUAL_ID:
return new <%=linkLabel.getEditPartClassName()%>(view);
<%
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/ExternalNodeLabelEditPart.javajet b/plugins/org.eclipse.gmf.codegen/templates/parts/ExternalNodeLabelEditPart.javajet
index f1b722efa..8a0eb8fd5 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/ExternalNodeLabelEditPart.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/ExternalNodeLabelEditPart.javajet
@@ -32,7 +32,7 @@ GenCommonBase genCommonBase = genLabel;%>
* @generated
*/
static {
- registerSnapBackPosition(<%=importManager.getImportedName(genLabel.getEditPartQualifiedClassName())%>.VISUAL_ID, new Point(0, 0));
+ registerSnapBackPosition(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(genLabel.getEditPartQualifiedClassName())%>.VISUAL_ID), new Point(0, 0));
}
/**
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/LinkLabelEditPart.javajet b/plugins/org.eclipse.gmf.codegen/templates/parts/LinkLabelEditPart.javajet
index 6fa44e84b..96583f0a3 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/LinkLabelEditPart.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/LinkLabelEditPart.javajet
@@ -41,9 +41,7 @@ if (labelOffset != null) {
labelOffsetY = labelOffset.getY();
}
%>
- registerSnapBackPosition(
- <%=importManager.getImportedName(genLabel.getEditPartQualifiedClassName())%>.VISUAL_ID,
- new Point(<%=labelOffsetX%>, <%=labelOffsetY%>));
+ registerSnapBackPosition(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(genLabel.getEditPartQualifiedClassName())%>.VISUAL_ID), new Point(<%=labelOffsetX%>, <%=labelOffsetY%>));
}
/**
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/NodeEditPart.javajet b/plugins/org.eclipse.gmf.codegen/templates/parts/NodeEditPart.javajet
index 49cc6ea73..9c53a8bea 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/NodeEditPart.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/NodeEditPart.javajet
@@ -83,7 +83,7 @@ if (!genNode.getChildNodes().isEmpty() || hasChildrenInListCompartments) {
%>
if (type == <%=importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName())%>.<%=child.getUniqueIdentifier()%>) {
<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> compartmentEditPart =
- getChildBySemanticHint(<%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID);
+ getChildBySemanticHint(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID));
return compartmentEditPart == null ? null : compartmentEditPart.getCommand(request);
}
<%
@@ -334,7 +334,7 @@ if (!genNode.getLabels().isEmpty()) {
* @generated
*/
public <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> getPrimaryChildEditPart() {
- return getChildBySemanticHint(<%=importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName())%>.VISUAL_ID);
+ return getChildBySemanticHint(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName())%>.VISUAL_ID));
}
<%
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parts/visualID.jetinc b/plugins/org.eclipse.gmf.codegen/templates/parts/visualID.jetinc
index 4107054ea..f390c0914 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parts/visualID.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/parts/visualID.jetinc
@@ -2,4 +2,4 @@
/**
* @generated
*/
- public static String VISUAL_ID = "<%=genCommonBase.getVisualID()%>"; \ No newline at end of file
+ public static final int VISUAL_ID = <%=genCommonBase.getVisualID()%>; \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/MetricProvider.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/MetricProvider.javajet
index 7c97a0a08..46fa7cec8 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/MetricProvider.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/MetricProvider.javajet
@@ -600,7 +600,7 @@ for(Iterator it = genDiagram.getEditorGen().getMetrics().getMetrics().iterator()
<%@ include file="../expressions/initEnv.jetinc"%>
register(new MetricDef("<%=nextMetric.getKey()%>",
<%@ include file="../expressions/getExpression.jetinc"%>,
- <%=nextMetric.getTarget() instanceof GenDiagramElementTarget ? ((GenDiagramElementTarget)nextMetric.getTarget()).getElement().getVisualID() : -1%>,
+ <%=nextMetric.getTarget() instanceof GenDiagramElementTarget ? importManager.getImportedName(((GenDiagramElementTarget) nextMetric.getTarget()).getElement().getEditPartQualifiedClassName()) + ".VISUAL_ID" : "-1"%>,
<%if(nextMetric.getLowLimit()!=null){%>new Double(<%=nextMetric.getLowLimit()%>)<%}else{%>null<%}%>,
<%if(nextMetric.getHighLimit()!=null){%>new Double(<%=nextMetric.getHighLimit()%>)<%}else{%>null<%}%>,
<%if(nextMetric.getName()!=null){%>"<%=nextMetric.getName()%>"<%}else{%>null<%}%>,
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/ParserProvider.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/ParserProvider.javajet
index 63f2621cb..980d78ce8 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/ParserProvider.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/ParserProvider.javajet
@@ -143,7 +143,7 @@ for (Iterator it1 = labels.keySet().iterator(); it1.hasNext(); ) {
for (Iterator it2 = labelsList.iterator(); it2.hasNext(); ) {
GenLabel genLabel = (GenLabel) it2.next();
%>
- if (<%=importManager.getImportedName(genLabel.getEditPartQualifiedClassName())%>.VISUAL_ID.equals(viewType)) {
+ if (<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(genLabel.getEditPartQualifiedClassName())%>.VISUAL_ID).equals(viewType)) {
return get<%=labelMethodNames.get(genLabel)%>();
}
<%
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/ViewFactory.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/ViewFactory.javajet
index 11b3371cb..71b0f1be3 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/ViewFactory.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/ViewFactory.javajet
@@ -52,7 +52,7 @@ if (isDiagram) {
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter,
String semanticHint, int index, boolean persisted) {
if (semanticHint == null) { <%/* [++] importmant for the create shortcut functionality*/%>
- semanticHint = <%=genElement.getEditPartQualifiedClassName()%>.VISUAL_ID;
+ semanticHint = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=genElement.getEditPartQualifiedClassName()%>.VISUAL_ID);
view.setType(semanticHint);
}<%/* [--] importmant for the create shortcut functionality*/%>
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
@@ -82,7 +82,7 @@ if (isNode) {
for (int j = 0; j < labels.size(); j++) {
GenNodeLabel label = (GenNodeLabel) labels.get(j);
%>
- getViewService().createNode(semanticAdapter, view, <%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID,
+ getViewService().createNode(semanticAdapter, view, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID),
<%=importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")%>.APPEND, true, getPreferencesHint());
<%
}
@@ -91,7 +91,7 @@ if (isNode) {
for (int j = 0; j < genChildContainers.size(); j++) {
GenCompartment genChildContainer = (GenCompartment) genChildContainers.get(j);
%>
- getViewService().createNode(semanticAdapter, view, <%=importManager.getImportedName(genChildContainer.getEditPartQualifiedClassName())%>.VISUAL_ID,
+ getViewService().createNode(semanticAdapter, view, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(genChildContainer.getEditPartQualifiedClassName())%>.VISUAL_ID),
<%=importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")%>.APPEND, true, getPreferencesHint());
<%
}
@@ -101,7 +101,7 @@ if (isNode) {
for (int j = 0; j < labels.size(); j++) {
GenLinkLabel label = (GenLinkLabel) labels.get(j);
%>
- getViewService().createNode(semanticAdapter, view, <%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID,
+ getViewService().createNode(semanticAdapter, view, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID),
<%=importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")%>.APPEND, true, getPreferencesHint());
<%
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/providers/ViewProvider.javajet b/plugins/org.eclipse.gmf.codegen/templates/providers/ViewProvider.javajet
index 115b67027..21d831e20 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/providers/ViewProvider.javajet
+++ b/plugins/org.eclipse.gmf.codegen/templates/providers/ViewProvider.javajet
@@ -54,7 +54,7 @@ public class <%=genDiagram.getNotationViewProviderClassName()%> extends Abstract
for (Iterator containers = genDiagram.getAllChildContainers().iterator(); containers.hasNext();) {
GenContainerBase container = (GenContainerBase) containers.next();
%>
- case <%=container.getVisualID()%>:
+ case <%=importManager.getImportedName(container.getEditPartQualifiedClassName())%>.VISUAL_ID:
return <%=importManager.getImportedName(container.getNotationViewFactoryQualifiedClassName())%>.class;
<%
if (container instanceof GenNode && !((GenNode) container).isListContainerEntry()) {
@@ -62,7 +62,7 @@ for (Iterator containers = genDiagram.getAllChildContainers().iterator(); contai
for (Iterator labels = node.getLabels().iterator(); labels.hasNext();) {
GenNodeLabel label = (GenNodeLabel) labels.next();
%>
- case <%=label.getVisualID()%>:
+ case <%=importManager.getImportedName(label.getEditPartQualifiedClassName())%>.VISUAL_ID:
return <%=importManager.getImportedName(label.getNotationViewFactoryQualifiedClassName())%>.class;
<%
}
@@ -73,7 +73,7 @@ for (Iterator links = genLinks.iterator(); links.hasNext();) {
for (Iterator linkLabels = link.getLabels().iterator(); linkLabels.hasNext();) {
GenLinkLabel linkLabel = (GenLinkLabel) linkLabels.next();
%>
- case <%=linkLabel.getVisualID()%>:
+ case <%=importManager.getImportedName(linkLabel.getEditPartQualifiedClassName())%>.VISUAL_ID:
return <%=importManager.getImportedName(linkLabel.getNotationViewFactoryQualifiedClassName())%>.class;
<%
}
@@ -118,7 +118,7 @@ for (int i = 0; i < genLinks.size(); i++) {
GenLink genLink = (GenLink) genLinks.get(i);
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
%>
- case <%=genLink.getVisualID()%>:
+ case <%=importManager.getImportedName(genLink.getEditPartQualifiedClassName())%>.VISUAL_ID:
return <%=importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName())%>.class;
<%
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectDiagramPhantoms_header.jetinc b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectDiagramPhantoms_header.jetinc
index 787f5641f..ce2c211b2 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectDiagramPhantoms_header.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectDiagramPhantoms_header.jetinc
@@ -12,4 +12,4 @@ for (<%=importManager.getImportedName("java.util.Iterator")%> it = resource.getC
for (Iterator phantoms = genClass2Phantom.values().iterator(); phantoms.hasNext();) {
GenTopLevelNode phantomNode = (GenTopLevelNode) phantoms.next();
%>
- case <%=phantomNode.getVisualID()%>: { \ No newline at end of file
+ case <%=importManager.getImportedName(phantomNode.getEditPartQualifiedClassName())%>.VISUAL_ID: { \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectFMFLinks_header.jetinc b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectFMFLinks_header.jetinc
index 29db531cb..a6d49c23d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectFMFLinks_header.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectFMFLinks_header.jetinc
@@ -18,5 +18,5 @@ if (phantomsOnly ? (!genFeature.isContains() || phantomNode == null) : (genFeatu
<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> nextDestination = (<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%>) <%=getFeatureValueGetter("container", genFeature, true, importManager)%>;
<% }%>
<% if (phantomsOnly) {%>
- if (<%=phantomNode.getVisualID()%> == <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.INSTANCE.getNodeVisualID(diagram, nextDestination)) {
+ if (<%=importManager.getImportedName(phantomNode.getEditPartQualifiedClassName())%>.VISUAL_ID == <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.INSTANCE.getNodeVisualID(diagram, nextDestination)) {
<% }%> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectSemanticChildren_header.jetinc b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectSemanticChildren_header.jetinc
index 6f614452c..d9bf776a7 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectSemanticChildren_header.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/collectSemanticChildren_header.jetinc
@@ -39,7 +39,7 @@ for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
GenNode nextNode = (GenNode) genNodesIterator.next();
if (generateSwitch) {%>
- case <%=nextNode.getVisualID()%>: {
+ case <%=importManager.getImportedName(nextNode.getEditPartQualifiedClassName())%>.VISUAL_ID: {
<% } else {%>
- if (<%=nextNode.getVisualID()%> == nodeVID) {
+ if (<%=importManager.getImportedName(nextNode.getEditPartQualifiedClassName())%>.VISUAL_ID == nodeVID) {
<% }%> \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/initDiagramContents.jetinc b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/initDiagramContents.jetinc
index 357cf6542..ba4c189cf 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/initDiagramContents.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/initDiagramContents.jetinc
@@ -19,7 +19,7 @@ private <%=importManager.getImportedName("java.util.Map")%> myEObject2NodeMap =
private void initDiagramContents(<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Diagram")%> diagram, <%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> diagramModelObject) {
create<%=genDiagram.getUniqueIdentifier()%>Children(diagram, diagramModelObject);
<%@ include file="collectDiagramPhantoms_header.jetinc"%>
- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> nextNode = ViewService.createNode(diagram, nextResourceObject, <%=importManager.getImportedName(phantomNode.getEditPartQualifiedClassName())%>.VISUAL_ID, <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> nextNode = ViewService.createNode(diagram, nextResourceObject, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(phantomNode.getEditPartQualifiedClassName())%>.VISUAL_ID), <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
myEObject2NodeMap.put(nextResourceObject, nextNode);
create<%=phantomNode.getUniqueIdentifier()%>Children(nextNode, nextResourceObject);
<%@ include file="collectDiagramPhantoms_footer.jetinc"%>
@@ -42,7 +42,7 @@ private void create<%=nextContainer.getUniqueIdentifier()%>Children(<%=importMan
<% {
List genNodes = nextContainer.getContainedNodes();%>
<%@ include file="collectSemanticChildren_header.jetinc"%>
- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> nextNode = ViewService.createNode(viewObject, nextValue, <%=importManager.getImportedName(nextNode.getEditPartQualifiedClassName())%>.VISUAL_ID, <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> nextNode = ViewService.createNode(viewObject, nextValue, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextNode.getEditPartQualifiedClassName())%>.VISUAL_ID), <%=pluginActivatorClass%>.DIAGRAM_PREFERENCES_HINT);
myEObject2NodeMap.put(nextValue, nextNode);
create<%=nextNode.getUniqueIdentifier()%>Children(nextNode, nextValue);
<%@ include file="collectSemanticChildren_footer.jetinc"%>
@@ -54,7 +54,7 @@ private void create<%=nextContainer.getUniqueIdentifier()%>Children(<%=importMan
generateGetCompartment = true;
GenCompartment nextCompartment = (GenCompartment) nextNode.getCompartments().get(i);
%>
- <%=i == 0 ? importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node") : ""%> nextCompartment = getCompartment(viewObject, <%=importManager.getImportedName(nextCompartment.getEditPartQualifiedClassName())%>.VISUAL_ID);
+ <%=i == 0 ? importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node") : ""%> nextCompartment = getCompartment(viewObject, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(nextCompartment.getEditPartQualifiedClassName())%>.VISUAL_ID));
if (nextCompartment != null) {
create<%=nextCompartment.getUniqueIdentifier()%>Children(nextCompartment, modelObject);
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/refreshSemanticDiagram.jetinc b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/refreshSemanticDiagram.jetinc
index f37db4c3b..8d64db47d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/refreshSemanticDiagram.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/refreshSemanticDiagram.jetinc
@@ -82,7 +82,7 @@ for (Iterator containers = genDiagram.getAllContainers().iterator(); containers.
continue;
}
%>
- case <%=nextContainer.getVisualID()%>:<%
+ case <%=importManager.getImportedName(nextContainer.getEditPartQualifiedClassName())%>.VISUAL_ID:<%
} %> { myEObject2ViewMap.put(modelElement, view);
storeLinks(modelElement, getDiagram());
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/storeLinks.jetinc b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/storeLinks.jetinc
index fef4a8bb0..9796c4841 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/storeLinks.jetinc
+++ b/plugins/org.eclipse.gmf.codegen/templates/semanticSync.jetinc/storeLinks.jetinc
@@ -36,7 +36,7 @@ for (Iterator it = genLinks.iterator(); it.hasNext();) {
<%=importManager.getImportedName("org.eclipse.emf.ecore.EObject")%> src = container;
<% }%>
int linkVID = <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.INSTANCE.getLinkWithClassVisualID(nextValue);
- if (<%=nextLink.getVisualID()%> == linkVID) {
+ if (<%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID == linkVID) {
myLinkDescriptors.add(new LinkDescriptor(src, dst, nextValue, linkVID));
}
<% if (typeLinkModelFacet.getSourceMetaFeature() != null) {%>
@@ -66,9 +66,9 @@ for (int linkIndex = 0; linkIndex < genLinks.size(); linkIndex++) {
boolean phantomsOnly = true;
%>
<%@ include file="collectFMFLinks_header.jetinc"%>
- myLinkDescriptors.add(new LinkDescriptor(container, nextDestination, <%=importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName())%>.<%=nextLink.getUniqueIdentifier()%>, <%=nextLink.getVisualID()%>));
+ myLinkDescriptors.add(new LinkDescriptor(container, nextDestination, <%=importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName())%>.<%=nextLink.getUniqueIdentifier()%>, <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID));
<% if (createPhantoms) {%>
- <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> nextNode = ViewService.createNode(diagram, nextDestination, <%=importManager.getImportedName(phantomNode.getEditPartQualifiedClassName())%>.VISUAL_ID, <%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.DIAGRAM_PREFERENCES_HINT);
+ <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> nextNode = ViewService.createNode(diagram, nextDestination, <%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(phantomNode.getEditPartQualifiedClassName())%>.VISUAL_ID), <%=importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())%>.DIAGRAM_PREFERENCES_HINT);
myEObject2NodeMap.put(nextDestination, nextNode);
create<%=phantomNode.getUniqueIdentifier()%>Children(nextNode, nextDestination);
<% }%>
@@ -80,7 +80,7 @@ for (int linkIndex = 0; linkIndex < genLinks.size(); linkIndex++) {
boolean phantomsOnly = false;
%>
<%@ include file="collectFMFLinks_header.jetinc"%>
- myLinkDescriptors.add(new LinkDescriptor(container, nextDestination, <%=importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName())%>.<%=nextLink.getUniqueIdentifier()%>, <%=nextLink.getVisualID()%>));
+ myLinkDescriptors.add(new LinkDescriptor(container, nextDestination, <%=importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName())%>.<%=nextLink.getUniqueIdentifier()%>, <%=importManager.getImportedName(nextLink.getEditPartQualifiedClassName())%>.VISUAL_ID));
<%@ include file="collectFMFLinks_footer.jetinc"%>
<%}%>
} \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/META-INF/MANIFEST.MF b/plugins/org.eclipse.gmf.graphdef.editor/META-INF/MANIFEST.MF
index 67435efb3..49faa4ce7 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.gmf.graphdef.editor/META-INF/MANIFEST.MF
@@ -30,5 +30,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide,
org.eclipse.gmf.runtime.notation.providers,
org.eclipse.gmf.graphdef;visibility:=reexport,
- org.eclipse.gmf.graphdef.edit;visibility:=reexport
+ org.eclipse.gmf.graphdef.edit;visibility:=reexport,
+ org.eclipse.gmf.runtime.draw2d.ui;visibility:=reexport,
+ org.eclipse.draw2d;visibility:=reexport
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen
index 98c8743d6..6809e46e5 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen
+++ b/plugins/org.eclipse.gmf.graphdef.editor/models/graphdef.gmfgen
@@ -13,6 +13,8 @@
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="RectangleFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class RectangleFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public RectangleFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet>
<metaClass href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Rectangle"/>
@@ -25,6 +27,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="RectangleFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class RectangleFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public RectangleFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -38,6 +42,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="EllipseFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class EllipseFigure extends org.eclipse.draw2d.Ellipse {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public EllipseFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -51,6 +57,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="RoundedRectangleFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class RoundedRectangleFigure extends org.eclipse.draw2d.RoundedRectangle {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public RoundedRectangleFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(8), getMapMode().DPtoLP(8)));&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -64,6 +72,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="PolylineFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class PolylineFigure extends org.eclipse.draw2d.Polyline {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public PolylineFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -77,6 +87,8 @@
<elementType xsi:type="gmfgen:SpecializationType" metamodelType="//@diagram/@childNodes.2/@elementType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="EllipseFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class EllipseFigure extends org.eclipse.draw2d.Ellipse {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public EllipseFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -90,6 +102,8 @@
<elementType xsi:type="gmfgen:SpecializationType" metamodelType="//@diagram/@childNodes.3/@elementType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="RoundedRectangleFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class RoundedRectangleFigure extends org.eclipse.draw2d.RoundedRectangle {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public RoundedRectangleFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;this.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(8), getMapMode().DPtoLP(8)));&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -103,6 +117,8 @@
<elementType xsi:type="gmfgen:SpecializationType" metamodelType="//@diagram/@childNodes.4/@elementType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="PolylineFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class PolylineFigure extends org.eclipse.draw2d.Polyline {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public PolylineFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
<attributes xsi:type="gmfgen:DefaultSizeAttributes" width="0" height="0"/>
</viewmap>
<modelFacet>
@@ -116,6 +132,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel childDiagramElementFigure_NameLabel = createFigureDiagramElementFigure_NameLabel();&#xD;&#xA;&#x9;&#x9;setFigureDiagramElementFigure_NameLabel(childDiagramElementFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;add(childDiagramElementFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel fDiagramElementFigure_NameLabel; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel getFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;return fDiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setFigureDiagramElementFigure_NameLabel(org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel figure) {&#xD;&#xA;&#x9;&#x9;fDiagramElementFigure_NameLabel = figure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel createFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel DiagramElementFigure_NameLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return DiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet>
<metaClass href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Compartment"/>
@@ -124,7 +142,10 @@
</modelFacet>
<labels visualID="4001" editPartClassName="Compartment_nameEditPart" itemSemanticEditPolicyClassName="Compartment_nameItemSemanticEditPolicy" notationViewFactoryClassName="Compartment_nameViewFactory">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;"/>
+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
<modelFacet xsi:type="gmfgen:FeatureLabelModelFacet">
<metaFeature href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Identity/name"/>
</modelFacet>
@@ -135,6 +156,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel childDiagramElementFigure_NameLabel = createFigureDiagramElementFigure_NameLabel();&#xD;&#xA;&#x9;&#x9;setFigureDiagramElementFigure_NameLabel(childDiagramElementFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;add(childDiagramElementFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel fDiagramElementFigure_NameLabel; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel getFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;return fDiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setFigureDiagramElementFigure_NameLabel(org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel figure) {&#xD;&#xA;&#x9;&#x9;fDiagramElementFigure_NameLabel = figure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel createFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel DiagramElementFigure_NameLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return DiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet>
<metaClass href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Node"/>
@@ -143,7 +166,10 @@
</modelFacet>
<labels visualID="4002" editPartClassName="Node_nameEditPart" itemSemanticEditPolicyClassName="Node_nameItemSemanticEditPolicy" notationViewFactoryClassName="Node_nameViewFactory">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;"/>
+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
<modelFacet xsi:type="gmfgen:FeatureLabelModelFacet">
<metaFeature href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Identity/name"/>
</modelFacet>
@@ -154,6 +180,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel childDiagramElementFigure_NameLabel = createFigureDiagramElementFigure_NameLabel();&#xD;&#xA;&#x9;&#x9;setFigureDiagramElementFigure_NameLabel(childDiagramElementFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;add(childDiagramElementFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel fDiagramElementFigure_NameLabel; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel getFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;return fDiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setFigureDiagramElementFigure_NameLabel(org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel figure) {&#xD;&#xA;&#x9;&#x9;fDiagramElementFigure_NameLabel = figure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel createFigureDiagramElementFigure_NameLabel() {&#xD;&#xA;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel DiagramElementFigure_NameLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return DiagramElementFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet>
<metaClass href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Connection"/>
@@ -162,7 +190,10 @@
</modelFacet>
<labels visualID="4003" editPartClassName="Connection_nameEditPart" itemSemanticEditPolicyClassName="Connection_nameItemSemanticEditPolicy" notationViewFactoryClassName="Connection_nameViewFactory">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;"/>
+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="DiagramElementFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class DiagramElementFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public DiagramElementFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
<modelFacet xsi:type="gmfgen:FeatureLabelModelFacet">
<metaFeature href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Identity/name"/>
</modelFacet>
@@ -173,6 +204,8 @@
<elementType xsi:type="gmfgen:MetamodelType"/>
<viewmap xsi:type="gmfgen:InnerClassViewmap" className="FigureGalleryFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class FigureGalleryFigure extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public FigureGalleryFigure() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel childFigureGalleryFigure_NameLabel = createFigureFigureGalleryFigure_NameLabel();&#xD;&#xA;&#x9;&#x9;setFigureFigureGalleryFigure_NameLabel(childFigureGalleryFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;add(childFigureGalleryFigure_NameLabel);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel fFigureGalleryFigure_NameLabel; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel getFigureFigureGalleryFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;return fFigureGalleryFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setFigureFigureGalleryFigure_NameLabel(org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel figure) {&#xD;&#xA;&#x9;&#x9;fFigureGalleryFigure_NameLabel = figure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel createFigureFigureGalleryFigure_NameLabel() {&#xD;&#xA;org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel FigureGalleryFigure_NameLabel = new org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return FigureGalleryFigure_NameLabel;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
<attributes xsi:type="gmfgen:ResizeConstraints" resizeHandles="29"/>
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
</viewmap>
<modelFacet>
<metaClass href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/FigureGallery"/>
@@ -181,7 +214,10 @@
</modelFacet>
<labels visualID="4004" editPartClassName="FigureGallery_nameEditPart" itemSemanticEditPolicyClassName="FigureGallery_nameItemSemanticEditPolicy" notationViewFactoryClassName="FigureGallery_nameViewFactory">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="FigureGalleryFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class FigureGalleryFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public FigureGalleryFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;"/>
+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="FigureGalleryFigure_NameLabel" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class FigureGalleryFigure_NameLabel extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrapLabel {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public FigureGalleryFigure_NameLabel() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;}&#xD;&#xA;">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
<modelFacet xsi:type="gmfgen:FeatureLabelModelFacet">
<metaFeature href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/Identity/name"/>
</modelFacet>
@@ -190,26 +226,41 @@
<links visualID="3001" editPartClassName="FigureEditPart" itemSemanticEditPolicyClassName="FigureItemSemanticEditPolicy" notationViewFactoryClassName="FigureViewFactory">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType xsi:type="gmfgen:SpecializationType"/>
- <viewmap xsi:type="gmfgen:InnerClassViewmap" className="FigureConnectionFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class FigureConnectionFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public FigureConnectionFigure() {&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASHDOT);&#xD;&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineDecoration createTargetDecoration() {&#xD;&#xA;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xD;&#xA;// dispatchNext?&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xD;&#xA;&#x9;&#x9;pl.addPoint(-1, 1);&#xD;&#xA;&#x9;&#x9;pl.addPoint(0, 0);&#xD;&#xA;&#x9;&#x9;pl.addPoint(-1, -1);&#xD;&#xA;&#x9;&#x9;df.setTemplate(pl);&#xD;&#xA;&#x9;&#x9;df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return df;&#xD;&#xA;&#x9;}&#xD;&#xA;}"/>
+ <viewmap xsi:type="gmfgen:InnerClassViewmap" className="FigureConnectionFigure" classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class FigureConnectionFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public FigureConnectionFigure() {&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASHDOT);&#xD;&#xA;&#x9;&#x9;setTargetDecoration(createTargetDecoration());&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.PolylineDecoration createTargetDecoration() {&#xD;&#xA;org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration();&#xD;&#xA;// dispatchNext?&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList();&#xD;&#xA;&#x9;&#x9;pl.addPoint(-1, 1);&#xD;&#xA;&#x9;&#x9;pl.addPoint(0, 0);&#xD;&#xA;&#x9;&#x9;pl.addPoint(-1, -1);&#xD;&#xA;&#x9;&#x9;df.setTemplate(pl);&#xD;&#xA;&#x9;&#x9;df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3));&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;return df;&#xD;&#xA;&#x9;}&#xD;&#xA;}">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
<modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
<metaFeature href="../../../plugin/org.eclipse.gmf.graphdef/models/gmfgraph.genmodel#//gmfgraph/DiagramElement/figure"/>
</modelFacet>
</links>
<compartments visualID="5001" editPartClassName="Compartment_VisualFacetsEditPart" itemSemanticEditPolicyClassName="Compartment_VisualFacetsItemSemanticEditPolicy" notationViewFactoryClassName="Compartment_VisualFacetsViewFactory" canonicalEditPolicyClassName="Compartment_VisualFacetsCanonicalEditPolicy" title="VisualFacets" node="//@diagram/@topLevelNodes.0">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
</compartments>
<compartments visualID="5002" editPartClassName="Node_VisualFacetsEditPart" itemSemanticEditPolicyClassName="Node_VisualFacetsItemSemanticEditPolicy" notationViewFactoryClassName="Node_VisualFacetsViewFactory" canonicalEditPolicyClassName="Node_VisualFacetsCanonicalEditPolicy" title="VisualFacets" node="//@diagram/@topLevelNodes.1">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
</compartments>
<compartments visualID="5003" editPartClassName="Connection_VisualFacetsEditPart" itemSemanticEditPolicyClassName="Connection_VisualFacetsItemSemanticEditPolicy" notationViewFactoryClassName="Connection_VisualFacetsViewFactory" canonicalEditPolicyClassName="Connection_VisualFacetsCanonicalEditPolicy" title="VisualFacets" node="//@diagram/@topLevelNodes.2">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
</compartments>
<compartments visualID="5004" editPartClassName="FigureGallery_FiguresEditPart" itemSemanticEditPolicyClassName="FigureGallery_FiguresItemSemanticEditPolicy" notationViewFactoryClassName="FigureGallery_FiguresViewFactory" childNodes="//@diagram/@childNodes.0 //@diagram/@childNodes.5 //@diagram/@childNodes.6 //@diagram/@childNodes.7" canonicalEditPolicyClassName="FigureGallery_FiguresCanonicalEditPolicy" listLayout="false" title="Figures" node="//@diagram/@topLevelNodes.3">
<diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="XXX">
+ <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
+ <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ </viewmap>
</compartments>
<palette>
<groups title="Diagram Elements" description="Can visualize domain model elements" collapse="true">
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CanvasEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CanvasEditPart.java
index 62b16661c..5d96ad70d 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CanvasEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CanvasEditPart.java
@@ -19,6 +19,11 @@ public class CanvasEditPart extends DiagramEditPart {
/**
* @generated
*/
+ public static final int VISUAL_ID = 79;
+
+ /**
+ * @generated
+ */
public CanvasEditPart(View view) {
super(view);
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CompartmentEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CompartmentEditPart.java
index e3c04bb9c..aea012703 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CompartmentEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/CompartmentEditPart.java
@@ -19,6 +19,8 @@ import org.eclipse.gmf.graphdef.editor.edit.policies.CompartmentGraphicalNodeEdi
import org.eclipse.gmf.graphdef.editor.edit.policies.CompartmentItemSemanticEditPolicy;
import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
@@ -41,7 +43,7 @@ public class CompartmentEditPart extends ShapeNodeEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "1001";
+ public static final int VISUAL_ID = 1001;
/**
* @generated
@@ -199,7 +201,7 @@ public class CompartmentEditPart extends ShapeNodeEditPart {
* @generated
*/
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(Compartment_nameEditPart.VISUAL_ID);
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(Compartment_nameEditPart.VISUAL_ID));
}
/**
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_VisualFacetsEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_VisualFacetsEditPart.java
index b8156eac9..778a7b4dd 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_VisualFacetsEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_VisualFacetsEditPart.java
@@ -31,7 +31,7 @@ public class Compartment_VisualFacetsEditPart extends ListCompartmentEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "5001";
+ public static final int VISUAL_ID = 5001;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_nameEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_nameEditPart.java
index 1247c6802..f87557d73 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_nameEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Compartment_nameEditPart.java
@@ -85,7 +85,7 @@ public class Compartment_nameEditPart extends CompartmentEditPart implements ITe
/**
* @generated
*/
- public static String VISUAL_ID = "4001";
+ public static final int VISUAL_ID = 4001;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/ConnectionEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/ConnectionEditPart.java
index 68a08bd7f..04b6380a0 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/ConnectionEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/ConnectionEditPart.java
@@ -19,6 +19,8 @@ import org.eclipse.gmf.graphdef.editor.edit.policies.ConnectionGraphicalNodeEdit
import org.eclipse.gmf.graphdef.editor.edit.policies.ConnectionItemSemanticEditPolicy;
import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
@@ -41,7 +43,7 @@ public class ConnectionEditPart extends ShapeNodeEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "1003";
+ public static final int VISUAL_ID = 1003;
/**
* @generated
@@ -199,7 +201,7 @@ public class ConnectionEditPart extends ShapeNodeEditPart {
* @generated
*/
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(Connection_nameEditPart.VISUAL_ID);
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(Connection_nameEditPart.VISUAL_ID));
}
/**
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_VisualFacetsEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_VisualFacetsEditPart.java
index 437b1c345..44a615e52 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_VisualFacetsEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_VisualFacetsEditPart.java
@@ -31,7 +31,7 @@ public class Connection_VisualFacetsEditPart extends ListCompartmentEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "5003";
+ public static final int VISUAL_ID = 5003;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_nameEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_nameEditPart.java
index 9d495f764..07251649b 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_nameEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Connection_nameEditPart.java
@@ -85,7 +85,7 @@ public class Connection_nameEditPart extends CompartmentEditPart implements ITex
/**
* @generated
*/
- public static String VISUAL_ID = "4003";
+ public static final int VISUAL_ID = 4003;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Ellipse2EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Ellipse2EditPart.java
index 48d03874d..b83daded1 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Ellipse2EditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Ellipse2EditPart.java
@@ -79,7 +79,7 @@ public class Ellipse2EditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2006";
+ public static final int VISUAL_ID = 2006;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/EllipseEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/EllipseEditPart.java
index bb46cc7c9..736807c38 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/EllipseEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/EllipseEditPart.java
@@ -79,7 +79,7 @@ public class EllipseEditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2003";
+ public static final int VISUAL_ID = 2003;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureEditPart.java
index 08ced21ef..4befd03d6 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureEditPart.java
@@ -14,7 +14,7 @@ public class FigureEditPart extends ConnectionNodeEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "3001";
+ public static final int VISUAL_ID = 3001;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGalleryEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGalleryEditPart.java
index 9e4a89bbf..e96002edf 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGalleryEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGalleryEditPart.java
@@ -19,6 +19,8 @@ import org.eclipse.gmf.graphdef.editor.edit.policies.FigureGalleryGraphicalNodeE
import org.eclipse.gmf.graphdef.editor.edit.policies.FigureGalleryItemSemanticEditPolicy;
import org.eclipse.gmf.graphdef.editor.edit.policies.GMFGraphTextSelectionEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
@@ -41,7 +43,7 @@ public class FigureGalleryEditPart extends ShapeNodeEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "1004";
+ public static final int VISUAL_ID = 1004;
/**
* @generated
@@ -199,7 +201,7 @@ public class FigureGalleryEditPart extends ShapeNodeEditPart {
* @generated
*/
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(FigureGallery_nameEditPart.VISUAL_ID);
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(FigureGallery_nameEditPart.VISUAL_ID));
}
/**
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_FiguresEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_FiguresEditPart.java
index 9b99b54e4..8c298df54 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_FiguresEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_FiguresEditPart.java
@@ -33,7 +33,7 @@ public class FigureGallery_FiguresEditPart extends ShapeCompartmentEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "5004";
+ public static final int VISUAL_ID = 5004;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_nameEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_nameEditPart.java
index 7d8d430bf..463da5582 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_nameEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/FigureGallery_nameEditPart.java
@@ -85,7 +85,7 @@ public class FigureGallery_nameEditPart extends CompartmentEditPart implements I
/**
* @generated
*/
- public static String VISUAL_ID = "4004";
+ public static final int VISUAL_ID = 4004;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java
index a794961bb..43fbbc7de 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/GMFGraphEditPartFactory.java
@@ -38,49 +38,49 @@ public class GMFGraphEditPartFactory implements EditPartFactory {
int viewVisualID = GMFGraphVisualIDRegistry.getVisualID(view);
switch (viewVisualID) {
- case 1001:
+ case CompartmentEditPart.VISUAL_ID:
return new CompartmentEditPart(view);
- case 4001:
+ case Compartment_nameEditPart.VISUAL_ID:
return new Compartment_nameEditPart(view);
- case 1002:
+ case NodeEditPart.VISUAL_ID:
return new NodeEditPart(view);
- case 4002:
+ case Node_nameEditPart.VISUAL_ID:
return new Node_nameEditPart(view);
- case 1003:
+ case ConnectionEditPart.VISUAL_ID:
return new ConnectionEditPart(view);
- case 4003:
+ case Connection_nameEditPart.VISUAL_ID:
return new Connection_nameEditPart(view);
- case 1004:
+ case FigureGalleryEditPart.VISUAL_ID:
return new FigureGalleryEditPart(view);
- case 4004:
+ case FigureGallery_nameEditPart.VISUAL_ID:
return new FigureGallery_nameEditPart(view);
- case 2001:
+ case RectangleEditPart.VISUAL_ID:
return new RectangleEditPart(view);
- case 2002:
+ case Rectangle2EditPart.VISUAL_ID:
return new Rectangle2EditPart(view);
- case 2003:
+ case EllipseEditPart.VISUAL_ID:
return new EllipseEditPart(view);
- case 2004:
+ case RoundedRectangleEditPart.VISUAL_ID:
return new RoundedRectangleEditPart(view);
- case 2005:
+ case PolylineEditPart.VISUAL_ID:
return new PolylineEditPart(view);
- case 2006:
+ case Ellipse2EditPart.VISUAL_ID:
return new Ellipse2EditPart(view);
- case 2007:
+ case RoundedRectangle2EditPart.VISUAL_ID:
return new RoundedRectangle2EditPart(view);
- case 2008:
+ case Polyline2EditPart.VISUAL_ID:
return new Polyline2EditPart(view);
- case 5001:
+ case Compartment_VisualFacetsEditPart.VISUAL_ID:
return new Compartment_VisualFacetsEditPart(view);
- case 5002:
+ case Node_VisualFacetsEditPart.VISUAL_ID:
return new Node_VisualFacetsEditPart(view);
- case 5003:
+ case Connection_VisualFacetsEditPart.VISUAL_ID:
return new Connection_VisualFacetsEditPart(view);
- case 5004:
+ case FigureGallery_FiguresEditPart.VISUAL_ID:
return new FigureGallery_FiguresEditPart(view);
- case 79:
+ case CanvasEditPart.VISUAL_ID:
return new CanvasEditPart(view);
- case 3001:
+ case FigureEditPart.VISUAL_ID:
return new FigureEditPart(view);
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/NodeEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/NodeEditPart.java
index c20257493..20121e876 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/NodeEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/NodeEditPart.java
@@ -19,6 +19,8 @@ import org.eclipse.gmf.graphdef.editor.edit.policies.NodeCanonicalEditPolicy;
import org.eclipse.gmf.graphdef.editor.edit.policies.NodeGraphicalNodeEditPolicy;
import org.eclipse.gmf.graphdef.editor.edit.policies.NodeItemSemanticEditPolicy;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+
import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
@@ -41,7 +43,7 @@ public class NodeEditPart extends ShapeNodeEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "1002";
+ public static final int VISUAL_ID = 1002;
/**
* @generated
@@ -199,7 +201,7 @@ public class NodeEditPart extends ShapeNodeEditPart {
* @generated
*/
public EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(Node_nameEditPart.VISUAL_ID);
+ return getChildBySemanticHint(GMFGraphVisualIDRegistry.getType(Node_nameEditPart.VISUAL_ID));
}
/**
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_VisualFacetsEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_VisualFacetsEditPart.java
index bb6a37149..bf834bff4 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_VisualFacetsEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_VisualFacetsEditPart.java
@@ -31,7 +31,7 @@ public class Node_VisualFacetsEditPart extends ListCompartmentEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "5002";
+ public static final int VISUAL_ID = 5002;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_nameEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_nameEditPart.java
index c7525af89..8db61d9e3 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_nameEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Node_nameEditPart.java
@@ -85,7 +85,7 @@ public class Node_nameEditPart extends CompartmentEditPart implements ITextAware
/**
* @generated
*/
- public static String VISUAL_ID = "4002";
+ public static final int VISUAL_ID = 4002;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Polyline2EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Polyline2EditPart.java
index d7ee60a80..1df4c05a3 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Polyline2EditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Polyline2EditPart.java
@@ -78,7 +78,7 @@ public class Polyline2EditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2008";
+ public static final int VISUAL_ID = 2008;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/PolylineEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/PolylineEditPart.java
index 91aceace8..2ba7305d6 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/PolylineEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/PolylineEditPart.java
@@ -78,7 +78,7 @@ public class PolylineEditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2005";
+ public static final int VISUAL_ID = 2005;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Rectangle2EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Rectangle2EditPart.java
index facc1cb30..c937f604a 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Rectangle2EditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/Rectangle2EditPart.java
@@ -77,7 +77,7 @@ public class Rectangle2EditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2002";
+ public static final int VISUAL_ID = 2002;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RectangleEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RectangleEditPart.java
index 521789b58..e065f80fb 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RectangleEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RectangleEditPart.java
@@ -77,7 +77,7 @@ public class RectangleEditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2001";
+ public static final int VISUAL_ID = 2001;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangle2EditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangle2EditPart.java
index 7c5ff6a85..2c2bea5f6 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangle2EditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangle2EditPart.java
@@ -79,7 +79,7 @@ public class RoundedRectangle2EditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2007";
+ public static final int VISUAL_ID = 2007;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangleEditPart.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangleEditPart.java
index bd28567b3..c739ce0ff 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangleEditPart.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/parts/RoundedRectangleEditPart.java
@@ -79,7 +79,7 @@ public class RoundedRectangleEditPart extends AbstractFigureEditPart {
/**
* @generated
*/
- public static String VISUAL_ID = "2004";
+ public static final int VISUAL_ID = 2004;
/**
* @generated
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java
index 78ca554e7..f5ed4a0bc 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/CanvasCanonicalEditPolicy.java
@@ -24,6 +24,21 @@ import org.eclipse.gmf.gmfgraph.Canvas;
import org.eclipse.gmf.gmfgraph.DiagramElement;
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
+import org.eclipse.gmf.graphdef.editor.edit.parts.CanvasEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.FigureEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
import org.eclipse.gmf.graphdef.editor.providers.GMFGraphElementTypes;
@@ -60,28 +75,28 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
for (Iterator values = ((Canvas) modelObject).getCompartments().iterator(); values.hasNext();) {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
- if (1001 == nodeVID) {
+ if (CompartmentEditPart.VISUAL_ID == nodeVID) {
result.add(nextValue);
}
}
for (Iterator values = ((Canvas) modelObject).getNodes().iterator(); values.hasNext();) {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
- if (1002 == nodeVID) {
+ if (NodeEditPart.VISUAL_ID == nodeVID) {
result.add(nextValue);
}
}
for (Iterator values = ((Canvas) modelObject).getConnections().iterator(); values.hasNext();) {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
- if (1003 == nodeVID) {
+ if (ConnectionEditPart.VISUAL_ID == nodeVID) {
result.add(nextValue);
}
}
for (Iterator values = ((Canvas) modelObject).getFigures().iterator(); values.hasNext();) {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
- if (1004 == nodeVID) {
+ if (FigureGalleryEditPart.VISUAL_ID == nodeVID) {
result.add(nextValue);
}
}
@@ -186,19 +201,19 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
EObject modelElement = view.getElement();
int diagramElementVisualID = GMFGraphVisualIDRegistry.getVisualID(view);
switch (diagramElementVisualID) {
- case 1001:
- case 1002:
- case 1003:
- case 1004:
- case 2001:
- case 2002:
- case 2003:
- case 2004:
- case 2005:
- case 2006:
- case 2007:
- case 2008:
- case 79: {
+ case CompartmentEditPart.VISUAL_ID:
+ case NodeEditPart.VISUAL_ID:
+ case ConnectionEditPart.VISUAL_ID:
+ case FigureGalleryEditPart.VISUAL_ID:
+ case RectangleEditPart.VISUAL_ID:
+ case Rectangle2EditPart.VISUAL_ID:
+ case EllipseEditPart.VISUAL_ID:
+ case RoundedRectangleEditPart.VISUAL_ID:
+ case PolylineEditPart.VISUAL_ID:
+ case Ellipse2EditPart.VISUAL_ID:
+ case RoundedRectangle2EditPart.VISUAL_ID:
+ case Polyline2EditPart.VISUAL_ID:
+ case CanvasEditPart.VISUAL_ID: {
myEObject2ViewMap.put(modelElement, view);
storeLinks(modelElement, getDiagram());
}
@@ -275,7 +290,7 @@ public class CanvasCanonicalEditPolicy extends CanonicalConnectionEditPolicy {
if (GMFGraphPackage.eINSTANCE.getDiagramElement().isSuperTypeOf(containerMetaclass)) {
EObject nextDestination = (EObject) ((DiagramElement) container).getFigure();
- myLinkDescriptors.add(new LinkDescriptor(container, nextDestination, GMFGraphElementTypes.DiagramElementFigure_3001, 3001));
+ myLinkDescriptors.add(new LinkDescriptor(container, nextDestination, GMFGraphElementTypes.DiagramElementFigure_3001, FigureEditPart.VISUAL_ID));
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java
index 6ff0d3b42..2f94a2009 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Ellipse2CanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class Ellipse2CanonicalEditPolicy extends CanonicalEditPolicy {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2002: {
+ case Rectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2003: {
+ case EllipseEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2004: {
+ case RoundedRectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2005: {
+ case PolylineEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java
index 3853a4714..2333fad97 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/EllipseCanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class EllipseCanonicalEditPolicy extends CanonicalEditPolicy {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2002: {
+ case Rectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2003: {
+ case EllipseEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2004: {
+ case RoundedRectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2005: {
+ case PolylineEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGallery_FiguresCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGallery_FiguresCanonicalEditPolicy.java
index c2313ceeb..f99f05401 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGallery_FiguresCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/FigureGallery_FiguresCanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.FigureGallery;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangle2EditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class FigureGallery_FiguresCanonicalEditPolicy extends CanonicalEditPolic
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2001: {
+ case RectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2006: {
+ case Ellipse2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2007: {
+ case RoundedRectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2008: {
+ case Polyline2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java
index 1536d57cb..459c9a78f 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/Rectangle2CanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class Rectangle2CanonicalEditPolicy extends CanonicalEditPolicy {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2002: {
+ case Rectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2003: {
+ case EllipseEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2004: {
+ case RoundedRectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2005: {
+ case PolylineEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java
index eb15a2af8..d03b98703 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RectangleCanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class RectangleCanonicalEditPolicy extends CanonicalEditPolicy {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2002: {
+ case Rectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2003: {
+ case EllipseEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2004: {
+ case RoundedRectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2005: {
+ case PolylineEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java
index c087f6fce..9637cbede 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangle2CanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class RoundedRectangle2CanonicalEditPolicy extends CanonicalEditPolicy {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2002: {
+ case Rectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2003: {
+ case EllipseEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2004: {
+ case RoundedRectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2005: {
+ case PolylineEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java
index 85cd8d681..2c5e24aca 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/edit/policies/RoundedRectangleCanonicalEditPolicy.java
@@ -10,6 +10,11 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.gmfgraph.Figure;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
/**
@@ -30,19 +35,19 @@ public class RoundedRectangleCanonicalEditPolicy extends CanonicalEditPolicy {
nextValue = (EObject) values.next();
nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(viewObject, nextValue);
switch (nodeVID) {
- case 2002: {
+ case Rectangle2EditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2003: {
+ case EllipseEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2004: {
+ case RoundedRectangleEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
- case 2005: {
+ case PolylineEditPart.VISUAL_ID: {
result.add(nextValue);
break;
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java
index d80e16688..d52f7f1ac 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphNewDiagramFileWizard.java
@@ -130,7 +130,7 @@ public class GMFGraphNewDiagramFileWizard extends Wizard {
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
int diagramVID = GMFGraphVisualIDRegistry.INSTANCE.getDiagramVisualID(diagramModelObject);
- if (diagramVID != 79) {
+ if (diagramVID != CanvasEditPart.VISUAL_ID) {
return CommandResult.newErrorCommandResult("Incorrect model object stored as a root resource object"); //$NON-NLS-1$
}
Diagram diagram = ViewService.createDiagram(diagramModelObject, CanvasEditPart.MODEL_ID, GMFGraphDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java
index f7551af5e..83740b547 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/part/GMFGraphVisualIDRegistry.java
@@ -24,6 +24,7 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.Connection_VisualFacetsEditPar
import org.eclipse.gmf.graphdef.editor.edit.parts.Connection_nameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.FigureEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_FiguresEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_nameEditPart;
@@ -60,17 +61,12 @@ public class GMFGraphVisualIDRegistry {
public static int getVisualID(View view) {
if (view instanceof Diagram) {
if (CanvasEditPart.MODEL_ID.equals(view.getType())) {
- return 79;
+ return CanvasEditPart.VISUAL_ID;
} else {
return -1;
}
}
- try {
- return Integer.parseInt(view.getType());
- } catch (NumberFormatException e) {
- GMFGraphDiagramEditorPlugin.getInstance().logInfo("Unable to parse view type as a visualID number: " + view.getType());
- }
- return -1;
+ return getVisualID(view.getType());
}
/**
@@ -91,6 +87,25 @@ public class GMFGraphVisualIDRegistry {
/**
* @generated
*/
+ public static int getVisualID(String type) {
+ try {
+ return Integer.parseInt(type);
+ } catch (NumberFormatException e) {
+ GMFGraphDiagramEditorPlugin.getInstance().logInfo("Unable to parse view type as a visualID number: " + type);
+ }
+ return -1;
+ }
+
+ /**
+ * @generated
+ */
+ public static String getType(int visualID) {
+ return String.valueOf(visualID);
+ }
+
+ /**
+ * @generated
+ */
public int getDiagramVisualID(EObject domainElement) {
if (domainElement == null) {
return -1;
@@ -104,7 +119,7 @@ public class GMFGraphVisualIDRegistry {
*/
public int getDiagramVisualID(EObject domainElement, EClass domainElementMetaclass) {
if (GMFGraphPackage.eINSTANCE.getCanvas().equals(domainElementMetaclass) && (domainElement == null || isDiagramCanvas_79((Canvas) domainElement))) {
- return 79;
+ return CanvasEditPart.VISUAL_ID;
}
return getUnrecognizedDiagramID(domainElement);
}
@@ -133,199 +148,200 @@ public class GMFGraphVisualIDRegistry {
containerVisualID = getVisualID(containerView);
} else {
if (containerView instanceof Diagram) {
- containerVisualID = 79;
+ containerVisualID = CanvasEditPart.VISUAL_ID;
} else {
return -1;
}
}
+ int nodeVisualID = getVisualID(semanticHint);
switch (containerVisualID) {
- case 1001:
- if (Compartment_nameEditPart.VISUAL_ID.equals(semanticHint)) {
- return 4001;
+ case CompartmentEditPart.VISUAL_ID:
+ if (Compartment_nameEditPart.VISUAL_ID == nodeVisualID) {
+ return Compartment_nameEditPart.VISUAL_ID;
}
- if (Compartment_VisualFacetsEditPart.VISUAL_ID.equals(semanticHint)) {
- return 5001;
+ if (Compartment_VisualFacetsEditPart.VISUAL_ID == nodeVisualID) {
+ return Compartment_VisualFacetsEditPart.VISUAL_ID;
}
return getUnrecognizedCompartment_1001ChildNodeID(domainElement, semanticHint);
- case 1002:
- if (Node_nameEditPart.VISUAL_ID.equals(semanticHint)) {
- return 4002;
+ case NodeEditPart.VISUAL_ID:
+ if (Node_nameEditPart.VISUAL_ID == nodeVisualID) {
+ return Node_nameEditPart.VISUAL_ID;
}
- if (Node_VisualFacetsEditPart.VISUAL_ID.equals(semanticHint)) {
- return 5002;
+ if (Node_VisualFacetsEditPart.VISUAL_ID == nodeVisualID) {
+ return Node_VisualFacetsEditPart.VISUAL_ID;
}
return getUnrecognizedNode_1002ChildNodeID(domainElement, semanticHint);
- case 1003:
- if (Connection_nameEditPart.VISUAL_ID.equals(semanticHint)) {
- return 4003;
+ case ConnectionEditPart.VISUAL_ID:
+ if (Connection_nameEditPart.VISUAL_ID == nodeVisualID) {
+ return Connection_nameEditPart.VISUAL_ID;
}
- if (Connection_VisualFacetsEditPart.VISUAL_ID.equals(semanticHint)) {
- return 5003;
+ if (Connection_VisualFacetsEditPart.VISUAL_ID == nodeVisualID) {
+ return Connection_VisualFacetsEditPart.VISUAL_ID;
}
return getUnrecognizedConnection_1003ChildNodeID(domainElement, semanticHint);
- case 1004:
- if (FigureGallery_nameEditPart.VISUAL_ID.equals(semanticHint)) {
- return 4004;
+ case FigureGalleryEditPart.VISUAL_ID:
+ if (FigureGallery_nameEditPart.VISUAL_ID == nodeVisualID) {
+ return FigureGallery_nameEditPart.VISUAL_ID;
}
- if (FigureGallery_FiguresEditPart.VISUAL_ID.equals(semanticHint)) {
- return 5004;
+ if (FigureGallery_FiguresEditPart.VISUAL_ID == nodeVisualID) {
+ return FigureGallery_FiguresEditPart.VISUAL_ID;
}
return getUnrecognizedFigureGallery_1004ChildNodeID(domainElement, semanticHint);
- case 2001:
- if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case RectangleEditPart.VISUAL_ID:
+ if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2002((Rectangle) domainElement))) {
- return 2002;
+ return Rectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || EllipseEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || EllipseEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2003((Ellipse) domainElement))) {
- return 2003;
+ return EllipseEditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2004((RoundedRectangle) domainElement))) {
- return 2004;
+ return RoundedRectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || PolylineEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || PolylineEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2005((Polyline) domainElement))) {
- return 2005;
+ return PolylineEditPart.VISUAL_ID;
}
return getUnrecognizedRectangle_2001ChildNodeID(domainElement, semanticHint);
- case 2002:
- if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case Rectangle2EditPart.VISUAL_ID:
+ if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2002((Rectangle) domainElement))) {
- return 2002;
+ return Rectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || EllipseEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || EllipseEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2003((Ellipse) domainElement))) {
- return 2003;
+ return EllipseEditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2004((RoundedRectangle) domainElement))) {
- return 2004;
+ return RoundedRectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || PolylineEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || PolylineEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2005((Polyline) domainElement))) {
- return 2005;
+ return PolylineEditPart.VISUAL_ID;
}
return getUnrecognizedRectangle_2002ChildNodeID(domainElement, semanticHint);
- case 2003:
- if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case EllipseEditPart.VISUAL_ID:
+ if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2002((Rectangle) domainElement))) {
- return 2002;
+ return Rectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || EllipseEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || EllipseEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2003((Ellipse) domainElement))) {
- return 2003;
+ return EllipseEditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2004((RoundedRectangle) domainElement))) {
- return 2004;
+ return RoundedRectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || PolylineEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || PolylineEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2005((Polyline) domainElement))) {
- return 2005;
+ return PolylineEditPart.VISUAL_ID;
}
return getUnrecognizedEllipse_2003ChildNodeID(domainElement, semanticHint);
- case 2004:
- if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case RoundedRectangleEditPart.VISUAL_ID:
+ if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2002((Rectangle) domainElement))) {
- return 2002;
+ return Rectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || EllipseEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || EllipseEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2003((Ellipse) domainElement))) {
- return 2003;
+ return EllipseEditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2004((RoundedRectangle) domainElement))) {
- return 2004;
+ return RoundedRectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || PolylineEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || PolylineEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2005((Polyline) domainElement))) {
- return 2005;
+ return PolylineEditPart.VISUAL_ID;
}
return getUnrecognizedRoundedRectangle_2004ChildNodeID(domainElement, semanticHint);
- case 2005:
+ case PolylineEditPart.VISUAL_ID:
return getUnrecognizedPolyline_2005ChildNodeID(domainElement, semanticHint);
- case 2006:
- if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case Ellipse2EditPart.VISUAL_ID:
+ if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2002((Rectangle) domainElement))) {
- return 2002;
+ return Rectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || EllipseEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || EllipseEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2003((Ellipse) domainElement))) {
- return 2003;
+ return EllipseEditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2004((RoundedRectangle) domainElement))) {
- return 2004;
+ return RoundedRectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || PolylineEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || PolylineEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2005((Polyline) domainElement))) {
- return 2005;
+ return PolylineEditPart.VISUAL_ID;
}
return getUnrecognizedEllipse_2006ChildNodeID(domainElement, semanticHint);
- case 2007:
- if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case RoundedRectangle2EditPart.VISUAL_ID:
+ if ((semanticHint == null || Rectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2002((Rectangle) domainElement))) {
- return 2002;
+ return Rectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || EllipseEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || EllipseEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2003((Ellipse) domainElement))) {
- return 2003;
+ return EllipseEditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2004((RoundedRectangle) domainElement))) {
- return 2004;
+ return RoundedRectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || PolylineEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || PolylineEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2005((Polyline) domainElement))) {
- return 2005;
+ return PolylineEditPart.VISUAL_ID;
}
return getUnrecognizedRoundedRectangle_2007ChildNodeID(domainElement, semanticHint);
- case 2008:
+ case Polyline2EditPart.VISUAL_ID:
return getUnrecognizedPolyline_2008ChildNodeID(domainElement, semanticHint);
- case 5001:
+ case Compartment_VisualFacetsEditPart.VISUAL_ID:
return getUnrecognizedVisualFacets_5001ChildNodeID(domainElement, semanticHint);
- case 5002:
+ case Node_VisualFacetsEditPart.VISUAL_ID:
return getUnrecognizedVisualFacets_5002ChildNodeID(domainElement, semanticHint);
- case 5003:
+ case Connection_VisualFacetsEditPart.VISUAL_ID:
return getUnrecognizedVisualFacets_5003ChildNodeID(domainElement, semanticHint);
- case 5004:
- if ((semanticHint == null || RectangleEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
+ case FigureGallery_FiguresEditPart.VISUAL_ID:
+ if ((semanticHint == null || RectangleEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRectangle_2001((Rectangle) domainElement))) {
- return 2001;
+ return RectangleEditPart.VISUAL_ID;
}
- if ((semanticHint == null || Ellipse2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
+ if ((semanticHint == null || Ellipse2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getEllipse().equals(domainElementMetaclass)
&& (domainElement == null || isNodeEllipse_2006((Ellipse) domainElement))) {
- return 2006;
+ return Ellipse2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || RoundedRectangle2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
+ if ((semanticHint == null || RoundedRectangle2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getRoundedRectangle().equals(domainElementMetaclass)
&& (domainElement == null || isNodeRoundedRectangle_2007((RoundedRectangle) domainElement))) {
- return 2007;
+ return RoundedRectangle2EditPart.VISUAL_ID;
}
- if ((semanticHint == null || Polyline2EditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
+ if ((semanticHint == null || Polyline2EditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getPolyline().equals(domainElementMetaclass)
&& (domainElement == null || isNodePolyline_2008((Polyline) domainElement))) {
- return 2008;
+ return Polyline2EditPart.VISUAL_ID;
}
return getUnrecognizedFigures_5004ChildNodeID(domainElement, semanticHint);
- case 79:
- if ((semanticHint == null || CompartmentEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getCompartment().equals(domainElementMetaclass)
+ case CanvasEditPart.VISUAL_ID:
+ if ((semanticHint == null || CompartmentEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getCompartment().equals(domainElementMetaclass)
&& (domainElement == null || isNodeCompartment_1001((Compartment) domainElement))) {
- return 1001;
+ return CompartmentEditPart.VISUAL_ID;
}
- if ((semanticHint == null || NodeEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getNode().equals(domainElementMetaclass)
+ if ((semanticHint == null || NodeEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getNode().equals(domainElementMetaclass)
&& (domainElement == null || isNodeNode_1002((Node) domainElement))) {
- return 1002;
+ return NodeEditPart.VISUAL_ID;
}
- if ((semanticHint == null || ConnectionEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getConnection().equals(domainElementMetaclass)
+ if ((semanticHint == null || ConnectionEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getConnection().equals(domainElementMetaclass)
&& (domainElement == null || isNodeConnection_1003((Connection) domainElement))) {
- return 1003;
+ return ConnectionEditPart.VISUAL_ID;
}
- if ((semanticHint == null || FigureGalleryEditPart.VISUAL_ID.equals(semanticHint)) && GMFGraphPackage.eINSTANCE.getFigureGallery().equals(domainElementMetaclass)
+ if ((semanticHint == null || FigureGalleryEditPart.VISUAL_ID == nodeVisualID) && GMFGraphPackage.eINSTANCE.getFigureGallery().equals(domainElementMetaclass)
&& (domainElement == null || isNodeFigureGallery_1004((FigureGallery) domainElement))) {
- return 1004;
+ return FigureGalleryEditPart.VISUAL_ID;
}
return getUnrecognizedCanvas_79ChildNodeID(domainElement, semanticHint);
- case 3001:
+ case FigureEditPart.VISUAL_ID:
return getUnrecognizedDiagramElementFigure_3001LinkLabelID(semanticHint);
}
return -1;
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java
index 83797b903..b7695bf9f 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphParserProvider.java
@@ -16,6 +16,8 @@ import org.eclipse.gmf.graphdef.editor.edit.parts.Connection_nameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_nameEditPart;
import org.eclipse.gmf.graphdef.editor.edit.parts.Node_nameEditPart;
+import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
+
/**
* @generated
*/
@@ -118,22 +120,22 @@ public class GMFGraphParserProvider extends AbstractProvider implements IParserP
*/
protected IParser getParser(IElementType type, String viewType) {
if (GMFGraphElementTypes.Compartment_1001 == type) {
- if (Compartment_nameEditPart.VISUAL_ID.equals(viewType)) {
+ if (GMFGraphVisualIDRegistry.getType(Compartment_nameEditPart.VISUAL_ID).equals(viewType)) {
return getCompartmentCompartmentName_4001Parser();
}
}
if (GMFGraphElementTypes.Node_1002 == type) {
- if (Node_nameEditPart.VISUAL_ID.equals(viewType)) {
+ if (GMFGraphVisualIDRegistry.getType(Node_nameEditPart.VISUAL_ID).equals(viewType)) {
return getNodeNodeName_4002Parser();
}
}
if (GMFGraphElementTypes.Connection_1003 == type) {
- if (Connection_nameEditPart.VISUAL_ID.equals(viewType)) {
+ if (GMFGraphVisualIDRegistry.getType(Connection_nameEditPart.VISUAL_ID).equals(viewType)) {
return getConnectionConnectionName_4003Parser();
}
}
if (GMFGraphElementTypes.FigureGallery_1004 == type) {
- if (FigureGallery_nameEditPart.VISUAL_ID.equals(viewType)) {
+ if (GMFGraphVisualIDRegistry.getType(FigureGallery_nameEditPart.VISUAL_ID).equals(viewType)) {
return getFigureGalleryFigureGalleryName_4004Parser();
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java
index 425b78fa3..9c85aaf84 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/providers/GMFGraphViewProvider.java
@@ -7,6 +7,27 @@ import org.eclipse.gmf.runtime.diagram.core.providers.AbstractViewProvider;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.graphdef.editor.edit.parts.CanvasEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Compartment_VisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Compartment_nameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Connection_VisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Connection_nameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_FiguresEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_nameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Node_VisualFacetsEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Node_nameEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangle2EditPart;
+import org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart;
+
import org.eclipse.gmf.graphdef.editor.part.GMFGraphVisualIDRegistry;
import org.eclipse.gmf.graphdef.editor.view.factories.CanvasViewFactory;
@@ -63,45 +84,45 @@ public class GMFGraphViewProvider extends AbstractViewProvider {
int nodeVID = GMFGraphVisualIDRegistry.INSTANCE.getNodeVisualID(containerView, semanticElement, semanticType, semanticHint);
switch (nodeVID) {
- case 1001:
+ case CompartmentEditPart.VISUAL_ID:
return CompartmentViewFactory.class;
- case 4001:
+ case Compartment_nameEditPart.VISUAL_ID:
return Compartment_nameViewFactory.class;
- case 1002:
+ case NodeEditPart.VISUAL_ID:
return NodeViewFactory.class;
- case 4002:
+ case Node_nameEditPart.VISUAL_ID:
return Node_nameViewFactory.class;
- case 1003:
+ case ConnectionEditPart.VISUAL_ID:
return ConnectionViewFactory.class;
- case 4003:
+ case Connection_nameEditPart.VISUAL_ID:
return Connection_nameViewFactory.class;
- case 1004:
+ case FigureGalleryEditPart.VISUAL_ID:
return FigureGalleryViewFactory.class;
- case 4004:
+ case FigureGallery_nameEditPart.VISUAL_ID:
return FigureGallery_nameViewFactory.class;
- case 2001:
+ case RectangleEditPart.VISUAL_ID:
return RectangleViewFactory.class;
- case 2002:
+ case Rectangle2EditPart.VISUAL_ID:
return Rectangle2ViewFactory.class;
- case 2003:
+ case EllipseEditPart.VISUAL_ID:
return EllipseViewFactory.class;
- case 2004:
+ case RoundedRectangleEditPart.VISUAL_ID:
return RoundedRectangleViewFactory.class;
- case 2005:
+ case PolylineEditPart.VISUAL_ID:
return PolylineViewFactory.class;
- case 2006:
+ case Ellipse2EditPart.VISUAL_ID:
return Ellipse2ViewFactory.class;
- case 2007:
+ case RoundedRectangle2EditPart.VISUAL_ID:
return RoundedRectangle2ViewFactory.class;
- case 2008:
+ case Polyline2EditPart.VISUAL_ID:
return Polyline2ViewFactory.class;
- case 5001:
+ case Compartment_VisualFacetsEditPart.VISUAL_ID:
return Compartment_VisualFacetsViewFactory.class;
- case 5002:
+ case Node_VisualFacetsEditPart.VISUAL_ID:
return Node_VisualFacetsViewFactory.class;
- case 5003:
+ case Connection_VisualFacetsEditPart.VISUAL_ID:
return Connection_VisualFacetsViewFactory.class;
- case 5004:
+ case FigureGallery_FiguresEditPart.VISUAL_ID:
return FigureGallery_FiguresViewFactory.class;
}
return null;
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/CompartmentViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/CompartmentViewFactory.java
index b4847d7e3..13d08e0e2 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/CompartmentViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/CompartmentViewFactory.java
@@ -27,7 +27,7 @@ public class CompartmentViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.CompartmentEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
@@ -36,7 +36,7 @@ public class CompartmentViewFactory extends AbstractShapeViewFactory {
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", CanvasEditPart.MODEL_ID);
}
- getViewService().createNode(semanticAdapter, view, Compartment_nameEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
- getViewService().createNode(semanticAdapter, view, Compartment_VisualFacetsEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(Compartment_nameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(Compartment_VisualFacetsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Compartment_VisualFacetsViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Compartment_VisualFacetsViewFactory.java
index 746fd7110..7906cf854 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Compartment_VisualFacetsViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Compartment_VisualFacetsViewFactory.java
@@ -23,7 +23,7 @@ public class Compartment_VisualFacetsViewFactory extends ListCompartmentViewFact
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.Compartment_VisualFacetsEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.Compartment_VisualFacetsEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/ConnectionViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/ConnectionViewFactory.java
index 63d8c00e6..4765b4346 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/ConnectionViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/ConnectionViewFactory.java
@@ -27,7 +27,7 @@ public class ConnectionViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.ConnectionEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
@@ -36,7 +36,7 @@ public class ConnectionViewFactory extends AbstractShapeViewFactory {
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", CanvasEditPart.MODEL_ID);
}
- getViewService().createNode(semanticAdapter, view, Connection_nameEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
- getViewService().createNode(semanticAdapter, view, Connection_VisualFacetsEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(Connection_nameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(Connection_VisualFacetsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Connection_VisualFacetsViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Connection_VisualFacetsViewFactory.java
index d246018ea..8dc652c16 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Connection_VisualFacetsViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Connection_VisualFacetsViewFactory.java
@@ -23,7 +23,7 @@ public class Connection_VisualFacetsViewFactory extends ListCompartmentViewFacto
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.Connection_VisualFacetsEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.Connection_VisualFacetsEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Ellipse2ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Ellipse2ViewFactory.java
index e9d095bb2..bde45fdd1 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Ellipse2ViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Ellipse2ViewFactory.java
@@ -23,7 +23,7 @@ public class Ellipse2ViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.Ellipse2EditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/EllipseViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/EllipseViewFactory.java
index 6d0d387e0..21b4a501d 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/EllipseViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/EllipseViewFactory.java
@@ -23,7 +23,7 @@ public class EllipseViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.EllipseEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGalleryViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGalleryViewFactory.java
index f29e86b29..16a4b1c68 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGalleryViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGalleryViewFactory.java
@@ -27,7 +27,7 @@ public class FigureGalleryViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.FigureGalleryEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
@@ -36,7 +36,7 @@ public class FigureGalleryViewFactory extends AbstractShapeViewFactory {
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", CanvasEditPart.MODEL_ID);
}
- getViewService().createNode(semanticAdapter, view, FigureGallery_nameEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
- getViewService().createNode(semanticAdapter, view, FigureGallery_FiguresEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(FigureGallery_nameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(FigureGallery_FiguresEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGallery_FiguresViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGallery_FiguresViewFactory.java
index bea043750..c6c14e33e 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGallery_FiguresViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureGallery_FiguresViewFactory.java
@@ -23,7 +23,7 @@ public class FigureGallery_FiguresViewFactory extends ListCompartmentViewFactory
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_FiguresEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.FigureGallery_FiguresEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureViewFactory.java
index 5a6742a2a..36212b570 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/FigureViewFactory.java
@@ -23,7 +23,7 @@ public class FigureViewFactory extends ConnectionViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.FigureEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.FigureEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/NodeViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/NodeViewFactory.java
index 282e00d67..7d769ff0f 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/NodeViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/NodeViewFactory.java
@@ -27,7 +27,7 @@ public class NodeViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.NodeEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
@@ -36,7 +36,7 @@ public class NodeViewFactory extends AbstractShapeViewFactory {
shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
shortcutAnnotation.getDetails().put("modelID", CanvasEditPart.MODEL_ID);
}
- getViewService().createNode(semanticAdapter, view, Node_nameEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
- getViewService().createNode(semanticAdapter, view, Node_VisualFacetsEditPart.VISUAL_ID, ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(Node_nameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(semanticAdapter, view, GMFGraphVisualIDRegistry.getType(Node_VisualFacetsEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
}
}
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Node_VisualFacetsViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Node_VisualFacetsViewFactory.java
index 5d790f538..5551bcf18 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Node_VisualFacetsViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Node_VisualFacetsViewFactory.java
@@ -23,7 +23,7 @@ public class Node_VisualFacetsViewFactory extends ListCompartmentViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.Node_VisualFacetsEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.Node_VisualFacetsEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Polyline2ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Polyline2ViewFactory.java
index 3731ae64f..1f180c47f 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Polyline2ViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Polyline2ViewFactory.java
@@ -23,7 +23,7 @@ public class Polyline2ViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.Polyline2EditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/PolylineViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/PolylineViewFactory.java
index 6c2f6a4af..10e96a9bf 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/PolylineViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/PolylineViewFactory.java
@@ -23,7 +23,7 @@ public class PolylineViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.PolylineEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Rectangle2ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Rectangle2ViewFactory.java
index 5694c1eda..6a4cd8a39 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Rectangle2ViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/Rectangle2ViewFactory.java
@@ -23,7 +23,7 @@ public class Rectangle2ViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.Rectangle2EditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RectangleViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RectangleViewFactory.java
index 90461af0c..e8b6ce1d6 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RectangleViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RectangleViewFactory.java
@@ -23,7 +23,7 @@ public class RectangleViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.RectangleEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangle2ViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangle2ViewFactory.java
index 2c57ab83b..ef3d31bc5 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangle2ViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangle2ViewFactory.java
@@ -23,7 +23,7 @@ public class RoundedRectangle2ViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangle2EditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangle2EditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangleViewFactory.java b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangleViewFactory.java
index 6503426ea..2f29ccef9 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangleViewFactory.java
+++ b/plugins/org.eclipse.gmf.graphdef.editor/src/org/eclipse/gmf/graphdef/editor/view/factories/RoundedRectangleViewFactory.java
@@ -23,7 +23,7 @@ public class RoundedRectangleViewFactory extends AbstractShapeViewFactory {
*/
protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
if (semanticHint == null) {
- semanticHint = org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart.VISUAL_ID;
+ semanticHint = GMFGraphVisualIDRegistry.getType(org.eclipse.gmf.graphdef.editor.edit.parts.RoundedRectangleEditPart.VISUAL_ID);
view.setType(semanticHint);
}
super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
diff --git a/plugins/org.eclipse.gmf.graphdef.editor/templates/parts/NodeEditPart.javajet b/plugins/org.eclipse.gmf.graphdef.editor/templates/parts/NodeEditPart.javajet
index 3308b7396..f211c1a09 100644
--- a/plugins/org.eclipse.gmf.graphdef.editor/templates/parts/NodeEditPart.javajet
+++ b/plugins/org.eclipse.gmf.graphdef.editor/templates/parts/NodeEditPart.javajet
@@ -346,7 +346,7 @@ if (!genNode.getChildNodes().isEmpty() || hasChildrenInListCompartments) {
%>
if (type == <%=importManager.getImportedName(genDiagram.getElementTypesQualifiedClassName())%>.<%=child.getUniqueIdentifier()%>) {
<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> compartmentEditPart =
- getChildBySemanticHint(<%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID);
+ getChildBySemanticHint(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(compartment.getEditPartQualifiedClassName())%>.VISUAL_ID));
return compartmentEditPart == null ? null : compartmentEditPart.getCommand(request);
}
<%
@@ -666,7 +666,7 @@ if (!genNode.getLabels().isEmpty()) {
* @generated
*/
public <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> getPrimaryChildEditPart() {
- return getChildBySemanticHint(<%=importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName())%>.VISUAL_ID);
+ return getChildBySemanticHint(<%=importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())%>.getType(<%=importManager.getImportedName(primaryLabel.getEditPartQualifiedClassName())%>.VISUAL_ID));
}
<%
}

Back to the top