Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 42846 Details for
Bug 144180
Lite Generator: Occasional CCE in generated diagram when trying to direct-edit an element
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fixes the subj
144180.patch (text/plain), 119.39 KB, created by
Boris Blajer
on 2006-05-29 04:10:28 EDT
(
hide
)
Description:
Fixes the subj
Filename:
MIME Type:
Creator:
Boris Blajer
Created:
2006-05-29 04:10:28 EDT
Size:
119.39 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.gmf.codegen.lite >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java,v >retrieving revision 1.4 >diff -u -r1.4 LinkEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java 25 May 2006 14:26:26 -0000 1.4 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/LinkEditPartGenerator.java 29 May 2006 08:11:55 -0000 >@@ -104,53 +104,54 @@ > protected final String TEXT_84 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn (EditPart) getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; > protected final String TEXT_85 = " req) {" + NL + "\t\tif ("; > protected final String TEXT_86 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; >- protected final String TEXT_87 = " labelToEdit = getLabelEditPart(("; >- protected final String TEXT_88 = ")req);" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_89 = " getLabelEditPart("; >- protected final String TEXT_90 = " req) {" + NL + "\t\t"; >- protected final String TEXT_91 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >- protected final String TEXT_92 = " view = ("; >- protected final String TEXT_93 = ") result.getModel();" + NL + "\t\t\tif (getDiagramEdge().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >- protected final String TEXT_94 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >- protected final String TEXT_95 = NL + "\t\t\t\tcase "; >- protected final String TEXT_96 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >- protected final String TEXT_97 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >- protected final String TEXT_98 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn ((Edge)getModel()).getChildren();" + NL + "\t}" + NL; >- protected final String TEXT_99 = NL; >- protected final String TEXT_100 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_101 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_102 = " feature, "; >- protected final String TEXT_103 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >- protected final String TEXT_104 = NL; >- protected final String TEXT_105 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >- protected final String TEXT_106 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_107 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >- protected final String TEXT_108 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_109 = NL; >- protected final String TEXT_110 = "\tpublic void addRefresher("; >- protected final String TEXT_111 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tpublic void removeRefresher("; >- protected final String TEXT_112 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >- protected final String TEXT_113 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >- protected final String TEXT_114 = NL; >- protected final String TEXT_115 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_116 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_117 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >- protected final String TEXT_118 = NL; >- protected final String TEXT_119 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_120 = ".eINSTANCE.getView_Visible(), visibilityRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "//XXX:\t\trefreshBackgroundColor();" + NL + "//XXX:\t\trefreshForegroundColor();" + NL + "//XXX:\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = ((View)getModel()).isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + 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 "; >- protected final String TEXT_121 = " createFigure() {"; >- protected final String TEXT_122 = NL + "\t\treturn new "; >- protected final String TEXT_123 = "();"; >- protected final String TEXT_124 = NL + "\t\treturn "; >- protected final String TEXT_125 = ";"; >- protected final String TEXT_126 = NL + " \t\treturn new "; >- protected final String TEXT_127 = "();"; >- protected final String TEXT_128 = NL + "\t}" + NL; >- protected final String TEXT_129 = NL; >+ protected final String TEXT_87 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; >+ protected final String TEXT_88 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; >+ protected final String TEXT_89 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_90 = " getLabelEditPart("; >+ protected final String TEXT_91 = " req) {" + NL + "\t\t"; >+ protected final String TEXT_92 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_93 = " view = ("; >+ protected final String TEXT_94 = ") result.getModel();" + NL + "\t\t\tif (getDiagramEdge().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >+ protected final String TEXT_95 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >+ protected final String TEXT_96 = NL + "\t\t\t\tcase "; >+ protected final String TEXT_97 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >+ protected final String TEXT_98 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >+ protected final String TEXT_99 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn ((Edge)getModel()).getChildren();" + NL + "\t}" + NL; >+ protected final String TEXT_100 = NL; >+ protected final String TEXT_101 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_102 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_103 = " feature, "; >+ protected final String TEXT_104 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramEdge().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >+ protected final String TEXT_105 = NL; >+ protected final String TEXT_106 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >+ protected final String TEXT_107 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >+ protected final String TEXT_108 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >+ protected final String TEXT_109 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >+ protected final String TEXT_110 = NL; >+ protected final String TEXT_111 = "\tpublic void addRefresher("; >+ protected final String TEXT_112 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tpublic void removeRefresher("; >+ protected final String TEXT_113 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >+ protected final String TEXT_114 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new HashMap();"; >+ protected final String TEXT_115 = NL; >+ protected final String TEXT_116 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_117 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_118 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >+ protected final String TEXT_119 = NL; >+ protected final String TEXT_120 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_121 = ".eINSTANCE.getView_Visible(), visibilityRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "//XXX:\t\trefreshBackgroundColor();" + NL + "//XXX:\t\trefreshForegroundColor();" + NL + "//XXX:\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = ((View)getModel()).isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + 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 "; >+ protected final String TEXT_122 = " createFigure() {"; >+ protected final String TEXT_123 = NL + "\t\treturn new "; >+ protected final String TEXT_124 = "();"; >+ protected final String TEXT_125 = NL + "\t\treturn "; >+ protected final String TEXT_126 = ";"; >+ protected final String TEXT_127 = NL + " \t\treturn new "; >+ protected final String TEXT_128 = "();"; >+ protected final String TEXT_129 = NL + "\t}" + NL; > protected final String TEXT_130 = NL; >- protected final String TEXT_131 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_132 = NL + "}"; >- protected final String TEXT_133 = NL; >+ protected final String TEXT_131 = NL; >+ protected final String TEXT_132 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_133 = NL + "}"; >+ protected final String TEXT_134 = NL; > > public String generate(Object argument) > { >@@ -417,18 +418,20 @@ > stringBuffer.append(TEXT_87); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_88); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_89); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >- stringBuffer.append(TEXT_90); >+ stringBuffer.append(TEXT_89); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_90); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_91); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_92); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_93); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_94); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(TEXT_95); > > for (Iterator it = genLink.getLabels().iterator(); it.hasNext(); ) { > GenLinkLabel genLabel = (GenLinkLabel) it.next(); >@@ -436,53 +439,53 @@ > continue; > } > >- stringBuffer.append(TEXT_95); >- stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_96); >+ stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); >+ stringBuffer.append(TEXT_97); > > } > >- stringBuffer.append(TEXT_97); >+ stringBuffer.append(TEXT_98); > > } //if (primaryLabel != null, i.e., there are editable labels) > >- stringBuffer.append(TEXT_98); > stringBuffer.append(TEXT_99); > stringBuffer.append(TEXT_100); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_101); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_102); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_103); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_104); > stringBuffer.append(TEXT_105); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); > stringBuffer.append(TEXT_106); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); > stringBuffer.append(TEXT_107); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_108); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_109); > stringBuffer.append(TEXT_110); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_111); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_112); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_113); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_114); > stringBuffer.append(TEXT_115); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_116); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_117); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_118); > stringBuffer.append(TEXT_119); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_120); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_121); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(TEXT_122); > > Viewmap viewmap = genLink.getViewmap(); > if (viewmap instanceof FigureViewmap) { >@@ -492,41 +495,41 @@ > figureQualifiedClassName = "org.eclipse.gmf.runtime.draw2d.PolylineConnection"; > } > >- stringBuffer.append(TEXT_122); >- stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); > stringBuffer.append(TEXT_123); >+ stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); >+ stringBuffer.append(TEXT_124); > } // instanceof FigureViewmap > else if (viewmap instanceof SnippetViewmap) { >- stringBuffer.append(TEXT_124); >- stringBuffer.append(((SnippetViewmap) viewmap).getBody()); > stringBuffer.append(TEXT_125); >+ stringBuffer.append(((SnippetViewmap) viewmap).getBody()); >+ stringBuffer.append(TEXT_126); > } // instanceof SnippetViewmap > else if (viewmap instanceof InnerClassViewmap) { >- stringBuffer.append(TEXT_126); >- stringBuffer.append(((InnerClassViewmap) viewmap).getClassName()); > stringBuffer.append(TEXT_127); >- } >+ stringBuffer.append(((InnerClassViewmap) viewmap).getClassName()); > stringBuffer.append(TEXT_128); >+ } >+ stringBuffer.append(TEXT_129); > > if (genLink.getViewmap() instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) genLink.getViewmap()).getClassBody(); > >- stringBuffer.append(TEXT_129); >- stringBuffer.append(classBody); > stringBuffer.append(TEXT_130); >+ stringBuffer.append(classBody); >+ stringBuffer.append(TEXT_131); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_131); >+ stringBuffer.append(TEXT_132); > > } > > > } > >- stringBuffer.append(TEXT_132); >- importManager.emitSortedImports(); > stringBuffer.append(TEXT_133); >+ importManager.emitSortedImports(); >+ stringBuffer.append(TEXT_134); > return stringBuffer.toString(); > } > } >Index: src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java,v >retrieving revision 1.6 >diff -u -r1.6 NodeEditPartGenerator.java >--- src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java 25 May 2006 14:26:26 -0000 1.6 >+++ src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java 29 May 2006 08:11:55 -0000 >@@ -204,200 +204,201 @@ > protected final String TEXT_183 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; > protected final String TEXT_184 = " req) {" + NL + "\t\tif ("; > protected final String TEXT_185 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; >- protected final String TEXT_186 = " labelToEdit = getLabelEditPart(("; >- protected final String TEXT_187 = ")req);" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_188 = " getLabelEditPart("; >- protected final String TEXT_189 = " req) {" + NL + "\t\t"; >- protected final String TEXT_190 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >- protected final String TEXT_191 = " view = ("; >- protected final String TEXT_192 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >- protected final String TEXT_193 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >- protected final String TEXT_194 = NL + "\t\t\t\tcase "; >- protected final String TEXT_195 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >- protected final String TEXT_196 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >- protected final String TEXT_197 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; >- protected final String TEXT_198 = " childEditPart, int index) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; >- protected final String TEXT_199 = " labelFigure = (("; >- protected final String TEXT_200 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t} else {"; >- protected final String TEXT_201 = NL + "\t\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t\t}"; >- protected final String TEXT_202 = NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);"; >- protected final String TEXT_203 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual("; >- protected final String TEXT_204 = " childEditPart) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; >- protected final String TEXT_205 = " labelFigure = (("; >- protected final String TEXT_206 = ") 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_207 = " childEditPart) {"; >- protected final String TEXT_208 = NL + "\t\tif (childEditPart instanceof "; >- protected final String TEXT_209 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}"; >- protected final String TEXT_210 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_211 = " getExternalLabelsContainer() {" + NL + "\t\t"; >- protected final String TEXT_212 = " root = ("; >- protected final String TEXT_213 = ") getRoot();" + NL + "\t\treturn root.getLayer("; >- protected final String TEXT_214 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL; >- protected final String TEXT_215 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; >- protected final String TEXT_216 = " childEditPart, int index) {" + NL + "\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t}" + NL + "\t}"; >- protected final String TEXT_217 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshBounds();" + NL + "\t\trefreshBackgroundColor();" + NL + "\t\trefreshForegroundColor();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\t"; >- protected final String TEXT_218 = " node = getDiagramNode();" + NL + "\t\tassert node.getLayoutConstraint() instanceof "; >- protected final String TEXT_219 = ";" + NL + "\t\t"; >- protected final String TEXT_220 = " bounds = ("; >- protected final String TEXT_221 = ") node.getLayoutConstraint();" + NL + "\t\t(("; >- protected final String TEXT_222 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew "; >- protected final String TEXT_223 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_224 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_225 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >- protected final String TEXT_226 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_227 = " getSourceConnectionAnchor("; >- protected final String TEXT_228 = " connection) {" + NL + "\t\treturn new "; >- protected final String TEXT_229 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_230 = " getSourceConnectionAnchor("; >- protected final String TEXT_231 = " request) {" + NL + "\t\treturn new "; >- protected final String TEXT_232 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_233 = " getTargetConnectionAnchor("; >- protected final String TEXT_234 = " connection) {" + NL + "\t\treturn new "; >- protected final String TEXT_235 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >- protected final String TEXT_236 = " getTargetConnectionAnchor("; >- protected final String TEXT_237 = " request) {" + NL + "\t\treturn new "; >- protected final String TEXT_238 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; >- protected final String TEXT_239 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >- protected final String TEXT_240 = NL; >- protected final String TEXT_241 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >- protected final String TEXT_242 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >- protected final String TEXT_243 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >- protected final String TEXT_244 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >- protected final String TEXT_245 = NL; >- protected final String TEXT_246 = "\tpublic void addRefresher("; >- protected final String TEXT_247 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tpublic void removeRefresher("; >- protected final String TEXT_248 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >- protected final String TEXT_249 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL; >- protected final String TEXT_250 = NL; >- protected final String TEXT_251 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t"; >- protected final String TEXT_252 = " style =" + NL + "\t\t\t("; >- protected final String TEXT_253 = ") "; >- protected final String TEXT_254 = ".getStyle(" + NL + "\t\t\t\t"; >- protected final String TEXT_255 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >- protected final String TEXT_256 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >- protected final String TEXT_257 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_258 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >- protected final String TEXT_259 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >- protected final String TEXT_260 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >- protected final String TEXT_261 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >- protected final String TEXT_262 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_263 = " createdFont;" + NL; >- protected final String TEXT_264 = NL; >- protected final String TEXT_265 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t"; >- protected final String TEXT_266 = " style = ("; >- protected final String TEXT_267 = ") "; >- protected final String TEXT_268 = ".getStyle("; >- protected final String TEXT_269 = ".eINSTANCE.getLineStyle());" + NL + "\t\t"; >- protected final String TEXT_270 = " toDispose = createdForegroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint foregroundColor = style.getLineColor();" + NL + "\t\t\tint red = foregroundColor & 0x000000FF;" + NL + "\t\t\tint green = (foregroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (foregroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_271 = " currentColor = getFigure().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedForegroundColor = new "; >- protected final String TEXT_272 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdForegroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedForegroundColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_273 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t"; >- protected final String TEXT_274 = " style = ("; >- protected final String TEXT_275 = ") "; >- protected final String TEXT_276 = ".getStyle("; >- protected final String TEXT_277 = ".eINSTANCE.getFillStyle());" + NL + "\t\t"; >- protected final String TEXT_278 = " toDispose = createdBackgroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint backgroundColor = style.getFillColor();" + NL + "\t\t\tint red = backgroundColor & 0x000000FF;" + NL + "\t\t\tint green = (backgroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (backgroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >- protected final String TEXT_279 = " currentColor = getFigure().getBackgroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedBackgroundColor = new "; >- protected final String TEXT_280 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setBackgroundColor(createdBackgroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setBackgroundColor(getViewer().getControl().getBackground());" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_281 = " createdBackgroundColor;" + NL; >- protected final String TEXT_282 = NL; >- protected final String TEXT_283 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >- protected final String TEXT_284 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >- protected final String TEXT_285 = " feature, "; >- protected final String TEXT_286 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new "; >- protected final String TEXT_287 = "();"; >- protected final String TEXT_288 = NL; >- protected final String TEXT_289 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_290 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_291 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >- protected final String TEXT_292 = NL; >- protected final String TEXT_293 = "\t\tRefresher boundsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBounds();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_294 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_295 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_296 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_297 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_298 = ".eINSTANCE.getLocation_Y(), boundsRefresher);"; >- protected final String TEXT_299 = NL; >- protected final String TEXT_300 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_301 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; >- protected final String TEXT_302 = NL; >- protected final String TEXT_303 = "\t\tRefresher sourceEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshSourceConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_304 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);"; >- protected final String TEXT_305 = NL; >- protected final String TEXT_306 = "\t\tRefresher targetEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshTargetConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_307 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);"; >- protected final String TEXT_308 = NL; >- protected final String TEXT_309 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_310 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_311 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_312 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_313 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; >- protected final String TEXT_314 = NL; >- protected final String TEXT_315 = "\t\tRefresher backgroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBackgroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_316 = ".eINSTANCE.getFillStyle_FillColor(), backgroundColorRefresher);" + NL + "\t\tRefresher foregroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshForegroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >- protected final String TEXT_317 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL; >- protected final String TEXT_318 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; >- protected final String TEXT_319 = "Command extends "; >- protected final String TEXT_320 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >- protected final String TEXT_321 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >- protected final String TEXT_322 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >- protected final String TEXT_323 = " createdEdge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >- protected final String TEXT_324 = "Command("; >- protected final String TEXT_325 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof "; >- protected final String TEXT_326 = ") {" + NL + "\t\t\t\tsource = ("; >- protected final String TEXT_327 = ")requestEx.getSourceEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\tsource = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (requestEx.getTargetEditPart().getModel() instanceof "; >- protected final String TEXT_328 = ") {" + NL + "\t\t\t\ttarget = ("; >- protected final String TEXT_329 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\ttarget = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (source == null || target == null) {" + NL + "\t\t\t\tcreatedEdge = null;" + NL + "\t\t\t\tdomainModelAddCommand = "; >- protected final String TEXT_330 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = "; >- protected final String TEXT_331 = ".eINSTANCE.createEdge();"; >- protected final String TEXT_332 = NL + "\t\t\t"; >- protected final String TEXT_333 = " createdDomainElement = "; >- protected final String TEXT_334 = ".eINSTANCE.create"; >- protected final String TEXT_335 = "();" + NL + "\t\t\tcreatedEdge.setElement(createdDomainElement);" + NL + "\t\t\t"; >- protected final String TEXT_336 = NL + "\t\t\t"; >- protected final String TEXT_337 = "."; >- protected final String TEXT_338 = ".initializeElement(createdDomainElement);"; >- protected final String TEXT_339 = NL + "\t\t\tcreatedEdge.setElement(target.getElement());\t\t//XXX: is this correct?"; >- protected final String TEXT_340 = NL + "\t\t\t"; >- protected final String TEXT_341 = ".decorateView(createdEdge);" + NL + "\t\t\t"; >- protected final String TEXT_342 = " domainModelEditDomain = "; >- protected final String TEXT_343 = ".getEditingDomain(source.getDiagram().getElement());"; >- protected final String TEXT_344 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();"; >- protected final String TEXT_345 = NL + "\t\t\t"; >- protected final String TEXT_346 = " container = getRelationshipContainer(source.getElement(), "; >- protected final String TEXT_347 = ".eINSTANCE.get"; >- protected final String TEXT_348 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\tdomainModelAddCommand = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_349 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, "; >- protected final String TEXT_350 = ".eINSTANCE.get"; >- protected final String TEXT_351 = "(), createdDomainElement));"; >- protected final String TEXT_352 = NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_353 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, "; >- protected final String TEXT_354 = ".eINSTANCE.get"; >- protected final String TEXT_355 = "(), createdDomainElement));"; >- protected final String TEXT_356 = NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_357 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >- protected final String TEXT_358 = ".eINSTANCE.get"; >- protected final String TEXT_359 = "(), source.getElement()));"; >- protected final String TEXT_360 = NL + "\t\t\taddLinkEndsCommand.append("; >- protected final String TEXT_361 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >- protected final String TEXT_362 = ".eINSTANCE.get"; >- protected final String TEXT_363 = "(), target.getElement()));"; >- protected final String TEXT_364 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;"; >- protected final String TEXT_365 = NL + "\t\t\tdomainModelAddCommand = "; >- protected final String TEXT_366 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t"; >- protected final String TEXT_367 = ".eINSTANCE.get"; >- protected final String TEXT_368 = "(), target.getElement());"; >- protected final String TEXT_369 = NL + "\t\t}" + NL; >- protected final String TEXT_370 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the new relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >- protected final String TEXT_371 = " getRelationshipContainer("; >- protected final String TEXT_372 = " element, "; >- protected final String TEXT_373 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >- protected final String TEXT_374 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canExecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tsource.getDiagram().insertEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(source);" + NL + "\t\t\tcreatedEdge.setTarget(target);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t\tsource.getDiagram().removeEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(null);" + NL + "\t\t\tcreatedEdge.setTarget(null);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; >- protected final String TEXT_375 = NL; >+ protected final String TEXT_186 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; >+ protected final String TEXT_187 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; >+ protected final String TEXT_188 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_189 = " getLabelEditPart("; >+ protected final String TEXT_190 = " req) {" + NL + "\t\t"; >+ protected final String TEXT_191 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; >+ protected final String TEXT_192 = " view = ("; >+ protected final String TEXT_193 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; >+ protected final String TEXT_194 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; >+ protected final String TEXT_195 = NL + "\t\t\t\tcase "; >+ protected final String TEXT_196 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; >+ protected final String TEXT_197 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; >+ protected final String TEXT_198 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; >+ protected final String TEXT_199 = " childEditPart, int index) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; >+ protected final String TEXT_200 = " labelFigure = (("; >+ protected final String TEXT_201 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t} else {"; >+ protected final String TEXT_202 = NL + "\t\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t\t}"; >+ protected final String TEXT_203 = NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);"; >+ protected final String TEXT_204 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual("; >+ protected final String TEXT_205 = " childEditPart) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; >+ protected final String TEXT_206 = " labelFigure = (("; >+ protected final String TEXT_207 = ") 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_208 = " childEditPart) {"; >+ protected final String TEXT_209 = NL + "\t\tif (childEditPart instanceof "; >+ protected final String TEXT_210 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}"; >+ protected final String TEXT_211 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_212 = " getExternalLabelsContainer() {" + NL + "\t\t"; >+ protected final String TEXT_213 = " root = ("; >+ protected final String TEXT_214 = ") getRoot();" + NL + "\t\treturn root.getLayer("; >+ protected final String TEXT_215 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL; >+ protected final String TEXT_216 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; >+ protected final String TEXT_217 = " childEditPart, int index) {" + NL + "\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t}" + NL + "\t}"; >+ protected final String TEXT_218 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshBounds();" + NL + "\t\trefreshBackgroundColor();" + NL + "\t\trefreshForegroundColor();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\t"; >+ protected final String TEXT_219 = " node = getDiagramNode();" + NL + "\t\tassert node.getLayoutConstraint() instanceof "; >+ protected final String TEXT_220 = ";" + NL + "\t\t"; >+ protected final String TEXT_221 = " bounds = ("; >+ protected final String TEXT_222 = ") node.getLayoutConstraint();" + NL + "\t\t(("; >+ protected final String TEXT_223 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew "; >+ protected final String TEXT_224 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_225 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_226 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; >+ protected final String TEXT_227 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_228 = " getSourceConnectionAnchor("; >+ protected final String TEXT_229 = " connection) {" + NL + "\t\treturn new "; >+ protected final String TEXT_230 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_231 = " getSourceConnectionAnchor("; >+ protected final String TEXT_232 = " request) {" + NL + "\t\treturn new "; >+ protected final String TEXT_233 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_234 = " getTargetConnectionAnchor("; >+ protected final String TEXT_235 = " connection) {" + NL + "\t\treturn new "; >+ protected final String TEXT_236 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; >+ protected final String TEXT_237 = " getTargetConnectionAnchor("; >+ protected final String TEXT_238 = " request) {" + NL + "\t\treturn new "; >+ protected final String TEXT_239 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; >+ protected final String TEXT_240 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; >+ protected final String TEXT_241 = NL; >+ protected final String TEXT_242 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; >+ protected final String TEXT_243 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; >+ protected final String TEXT_244 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; >+ protected final String TEXT_245 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; >+ protected final String TEXT_246 = NL; >+ protected final String TEXT_247 = "\tpublic void addRefresher("; >+ protected final String TEXT_248 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tpublic void removeRefresher("; >+ protected final String TEXT_249 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; >+ protected final String TEXT_250 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL; >+ protected final String TEXT_251 = NL; >+ protected final String TEXT_252 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t"; >+ protected final String TEXT_253 = " style =" + NL + "\t\t\t("; >+ protected final String TEXT_254 = ") "; >+ protected final String TEXT_255 = ".getStyle(" + NL + "\t\t\t\t"; >+ protected final String TEXT_256 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; >+ protected final String TEXT_257 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; >+ protected final String TEXT_258 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_259 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; >+ protected final String TEXT_260 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; >+ protected final String TEXT_261 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; >+ protected final String TEXT_262 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; >+ protected final String TEXT_263 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_264 = " createdFont;" + NL; >+ protected final String TEXT_265 = NL; >+ protected final String TEXT_266 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t"; >+ protected final String TEXT_267 = " style = ("; >+ protected final String TEXT_268 = ") "; >+ protected final String TEXT_269 = ".getStyle("; >+ protected final String TEXT_270 = ".eINSTANCE.getLineStyle());" + NL + "\t\t"; >+ protected final String TEXT_271 = " toDispose = createdForegroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint foregroundColor = style.getLineColor();" + NL + "\t\t\tint red = foregroundColor & 0x000000FF;" + NL + "\t\t\tint green = (foregroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (foregroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_272 = " currentColor = getFigure().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedForegroundColor = new "; >+ protected final String TEXT_273 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdForegroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedForegroundColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_274 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t"; >+ protected final String TEXT_275 = " style = ("; >+ protected final String TEXT_276 = ") "; >+ protected final String TEXT_277 = ".getStyle("; >+ protected final String TEXT_278 = ".eINSTANCE.getFillStyle());" + NL + "\t\t"; >+ protected final String TEXT_279 = " toDispose = createdBackgroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint backgroundColor = style.getFillColor();" + NL + "\t\t\tint red = backgroundColor & 0x000000FF;" + NL + "\t\t\tint green = (backgroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (backgroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; >+ protected final String TEXT_280 = " currentColor = getFigure().getBackgroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedBackgroundColor = new "; >+ protected final String TEXT_281 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setBackgroundColor(createdBackgroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setBackgroundColor(getViewer().getControl().getBackground());" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_282 = " createdBackgroundColor;" + NL; >+ protected final String TEXT_283 = NL; >+ protected final String TEXT_284 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; >+ protected final String TEXT_285 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; >+ protected final String TEXT_286 = " feature, "; >+ protected final String TEXT_287 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new "; >+ protected final String TEXT_288 = "();"; >+ protected final String TEXT_289 = NL; >+ protected final String TEXT_290 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_291 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_292 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; >+ protected final String TEXT_293 = NL; >+ protected final String TEXT_294 = "\t\tRefresher boundsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBounds();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_295 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_296 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_297 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_298 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_299 = ".eINSTANCE.getLocation_Y(), boundsRefresher);"; >+ protected final String TEXT_300 = NL; >+ protected final String TEXT_301 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_302 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; >+ protected final String TEXT_303 = NL; >+ protected final String TEXT_304 = "\t\tRefresher sourceEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshSourceConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_305 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);"; >+ protected final String TEXT_306 = NL; >+ protected final String TEXT_307 = "\t\tRefresher targetEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshTargetConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_308 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);"; >+ protected final String TEXT_309 = NL; >+ protected final String TEXT_310 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_311 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_312 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_313 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_314 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; >+ protected final String TEXT_315 = NL; >+ protected final String TEXT_316 = "\t\tRefresher backgroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBackgroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_317 = ".eINSTANCE.getFillStyle_FillColor(), backgroundColorRefresher);" + NL + "\t\tRefresher foregroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshForegroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; >+ protected final String TEXT_318 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL; >+ protected final String TEXT_319 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; >+ protected final String TEXT_320 = "Command extends "; >+ protected final String TEXT_321 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >+ protected final String TEXT_322 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >+ protected final String TEXT_323 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; >+ protected final String TEXT_324 = " createdEdge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; >+ protected final String TEXT_325 = "Command("; >+ protected final String TEXT_326 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof "; >+ protected final String TEXT_327 = ") {" + NL + "\t\t\t\tsource = ("; >+ protected final String TEXT_328 = ")requestEx.getSourceEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\tsource = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (requestEx.getTargetEditPart().getModel() instanceof "; >+ protected final String TEXT_329 = ") {" + NL + "\t\t\t\ttarget = ("; >+ protected final String TEXT_330 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\ttarget = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (source == null || target == null) {" + NL + "\t\t\t\tcreatedEdge = null;" + NL + "\t\t\t\tdomainModelAddCommand = "; >+ protected final String TEXT_331 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = "; >+ protected final String TEXT_332 = ".eINSTANCE.createEdge();"; >+ protected final String TEXT_333 = NL + "\t\t\t"; >+ protected final String TEXT_334 = " createdDomainElement = "; >+ protected final String TEXT_335 = ".eINSTANCE.create"; >+ protected final String TEXT_336 = "();" + NL + "\t\t\tcreatedEdge.setElement(createdDomainElement);" + NL + "\t\t\t"; >+ protected final String TEXT_337 = NL + "\t\t\t"; >+ protected final String TEXT_338 = "."; >+ protected final String TEXT_339 = ".initializeElement(createdDomainElement);"; >+ protected final String TEXT_340 = NL + "\t\t\tcreatedEdge.setElement(target.getElement());\t\t//XXX: is this correct?"; >+ protected final String TEXT_341 = NL + "\t\t\t"; >+ protected final String TEXT_342 = ".decorateView(createdEdge);" + NL + "\t\t\t"; >+ protected final String TEXT_343 = " domainModelEditDomain = "; >+ protected final String TEXT_344 = ".getEditingDomain(source.getDiagram().getElement());"; >+ protected final String TEXT_345 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();"; >+ protected final String TEXT_346 = NL + "\t\t\t"; >+ protected final String TEXT_347 = " container = getRelationshipContainer(source.getElement(), "; >+ protected final String TEXT_348 = ".eINSTANCE.get"; >+ protected final String TEXT_349 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\tdomainModelAddCommand = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_350 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, "; >+ protected final String TEXT_351 = ".eINSTANCE.get"; >+ protected final String TEXT_352 = "(), createdDomainElement));"; >+ protected final String TEXT_353 = NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_354 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, "; >+ protected final String TEXT_355 = ".eINSTANCE.get"; >+ protected final String TEXT_356 = "(), createdDomainElement));"; >+ protected final String TEXT_357 = NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_358 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >+ protected final String TEXT_359 = ".eINSTANCE.get"; >+ protected final String TEXT_360 = "(), source.getElement()));"; >+ protected final String TEXT_361 = NL + "\t\t\taddLinkEndsCommand.append("; >+ protected final String TEXT_362 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; >+ protected final String TEXT_363 = ".eINSTANCE.get"; >+ protected final String TEXT_364 = "(), target.getElement()));"; >+ protected final String TEXT_365 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;"; >+ protected final String TEXT_366 = NL + "\t\t\tdomainModelAddCommand = "; >+ protected final String TEXT_367 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t"; >+ protected final String TEXT_368 = ".eINSTANCE.get"; >+ protected final String TEXT_369 = "(), target.getElement());"; >+ protected final String TEXT_370 = NL + "\t\t}" + NL; >+ protected final String TEXT_371 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the new relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; >+ protected final String TEXT_372 = " getRelationshipContainer("; >+ protected final String TEXT_373 = " element, "; >+ protected final String TEXT_374 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; >+ protected final String TEXT_375 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canExecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tsource.getDiagram().insertEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(source);" + NL + "\t\t\tcreatedEdge.setTarget(target);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t\tsource.getDiagram().removeEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(null);" + NL + "\t\t\tcreatedEdge.setTarget(null);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; > protected final String TEXT_376 = NL; >- protected final String TEXT_377 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >- protected final String TEXT_378 = NL + "}"; >- protected final String TEXT_379 = NL; >+ protected final String TEXT_377 = NL; >+ protected final String TEXT_378 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; >+ protected final String TEXT_379 = NL + "}"; >+ protected final String TEXT_380 = NL; > > public String generate(Object argument) > { >@@ -916,18 +917,20 @@ > stringBuffer.append(TEXT_186); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_187); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >- stringBuffer.append(TEXT_188); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); >- stringBuffer.append(TEXT_189); >+ stringBuffer.append(TEXT_188); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_189); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); > stringBuffer.append(TEXT_190); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_191); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_192); >- stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_193); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); >+ stringBuffer.append(TEXT_194); > > for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { > GenNodeLabel genLabel = (GenNodeLabel) it.next(); >@@ -935,13 +938,13 @@ > continue; > } > >- stringBuffer.append(TEXT_194); >- stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_195); >+ stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); >+ stringBuffer.append(TEXT_196); > > } > >- stringBuffer.append(TEXT_196); >+ stringBuffer.append(TEXT_197); > > } > >@@ -956,159 +959,157 @@ > } > if (hasExternalLabels) { > >- stringBuffer.append(TEXT_197); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_198); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_199); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_200); >- if (hasFixedChildren) { >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); > stringBuffer.append(TEXT_201); >- } else { >+ if (hasFixedChildren) { > stringBuffer.append(TEXT_202); >- } >+ } else { > stringBuffer.append(TEXT_203); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ } > stringBuffer.append(TEXT_204); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_205); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_206); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); > stringBuffer.append(TEXT_207); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_208); > > for (Iterator labels = genNode.getLabels().iterator(); labels.hasNext();) { > GenNodeLabel label = (GenNodeLabel) labels.next(); > if (label instanceof GenExternalNodeLabel) { > >- stringBuffer.append(TEXT_208); >- stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); > stringBuffer.append(TEXT_209); >+ stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); >+ stringBuffer.append(TEXT_210); > > } > } > >- stringBuffer.append(TEXT_210); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_211); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); > stringBuffer.append(TEXT_212); > stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); > stringBuffer.append(TEXT_213); >- stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); > stringBuffer.append(TEXT_214); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); >+ stringBuffer.append(TEXT_215); > > } else { > if (hasFixedChildren) { >- stringBuffer.append(TEXT_215); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); > stringBuffer.append(TEXT_216); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); >+ stringBuffer.append(TEXT_217); > > } > } > >- stringBuffer.append(TEXT_217); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_218); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); > stringBuffer.append(TEXT_219); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); > stringBuffer.append(TEXT_220); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); > stringBuffer.append(TEXT_221); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); > stringBuffer.append(TEXT_222); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); > stringBuffer.append(TEXT_223); >- stringBuffer.append(importManager.getImportedName("java.util.List")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); > stringBuffer.append(TEXT_224); > stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_225); > stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_226); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(importManager.getImportedName("java.util.List")); > stringBuffer.append(TEXT_227); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); > stringBuffer.append(TEXT_228); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); > stringBuffer.append(TEXT_229); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); > stringBuffer.append(TEXT_230); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); > stringBuffer.append(TEXT_231); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_232); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); > stringBuffer.append(TEXT_233); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); > stringBuffer.append(TEXT_234); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); > stringBuffer.append(TEXT_235); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); > stringBuffer.append(TEXT_236); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); > stringBuffer.append(TEXT_237); >- stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); > stringBuffer.append(TEXT_238); >- /*@ include file="adapters/propertySource.javajetinc"*/ >+ stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); > stringBuffer.append(TEXT_239); >+ /*@ include file="adapters/propertySource.javajetinc"*/ > stringBuffer.append(TEXT_240); > stringBuffer.append(TEXT_241); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); > stringBuffer.append(TEXT_242); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); > stringBuffer.append(TEXT_243); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_244); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_245); > stringBuffer.append(TEXT_246); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_247); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_248); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_249); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(TEXT_250); > > final String primaryView = "getDiagramNode()"; > >- stringBuffer.append(TEXT_250); > stringBuffer.append(TEXT_251); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_252); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_253); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); > stringBuffer.append(TEXT_254); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_255); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_256); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_257); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_258); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_259); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); > stringBuffer.append(TEXT_260); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); >- stringBuffer.append(TEXT_261); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); >+ stringBuffer.append(TEXT_261); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); > stringBuffer.append(TEXT_262); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_263); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); > stringBuffer.append(TEXT_264); > stringBuffer.append(TEXT_265); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); > stringBuffer.append(TEXT_266); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); > stringBuffer.append(TEXT_267); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); > stringBuffer.append(TEXT_268); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_269); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_270); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_271); >@@ -1116,15 +1117,15 @@ > stringBuffer.append(TEXT_272); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_273); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_274); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); > stringBuffer.append(TEXT_275); >- stringBuffer.append(primaryView); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); > stringBuffer.append(TEXT_276); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(primaryView); > stringBuffer.append(TEXT_277); >- stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_278); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_279); >@@ -1132,25 +1133,25 @@ > stringBuffer.append(TEXT_280); > stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_281); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); > stringBuffer.append(TEXT_282); > stringBuffer.append(TEXT_283); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_284); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); >+ stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_285); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); > stringBuffer.append(TEXT_286); >- stringBuffer.append(importManager.getImportedName("java.util.HashMap")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); > stringBuffer.append(TEXT_287); >+ stringBuffer.append(importManager.getImportedName("java.util.HashMap")); > stringBuffer.append(TEXT_288); > stringBuffer.append(TEXT_289); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_290); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_291); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_292); > stringBuffer.append(TEXT_293); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_294); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_295); >@@ -1160,21 +1161,21 @@ > stringBuffer.append(TEXT_297); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_298); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_299); > stringBuffer.append(TEXT_300); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_301); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_302); > stringBuffer.append(TEXT_303); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_304); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_305); > stringBuffer.append(TEXT_306); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_307); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_308); > stringBuffer.append(TEXT_309); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_310); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_311); >@@ -1182,12 +1183,14 @@ > stringBuffer.append(TEXT_312); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_313); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_314); > stringBuffer.append(TEXT_315); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_316); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); > stringBuffer.append(TEXT_317); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); >+ stringBuffer.append(TEXT_318); > /*XXX: probably, this should go to a separate jet-template along with GraphicalNodeEditPolicy*/ > > for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) { >@@ -1213,24 +1216,22 @@ > } > > if (palette != null) { >- stringBuffer.append(TEXT_318); >+ stringBuffer.append(TEXT_319); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_319); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); > stringBuffer.append(TEXT_320); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); > stringBuffer.append(TEXT_321); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_322); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_323); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); >+ stringBuffer.append(TEXT_324); > stringBuffer.append(createCommandNameInfix); > stringBuffer.append(genLink.getVisualID()); >- stringBuffer.append(TEXT_324); >- stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); > stringBuffer.append(TEXT_325); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); >+ stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); > stringBuffer.append(TEXT_326); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_327); >@@ -1238,46 +1239,48 @@ > stringBuffer.append(TEXT_328); > stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_329); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); > stringBuffer.append(TEXT_330); >- stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); > stringBuffer.append(TEXT_331); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); >+ stringBuffer.append(TEXT_332); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenClass linkClass = modelFacet.getMetaClass(); > >- stringBuffer.append(TEXT_332); >- stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName()))); > stringBuffer.append(TEXT_333); >- stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName())); >+ stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName()))); > stringBuffer.append(TEXT_334); >- stringBuffer.append(linkClass.getClassifierAccessorName()); >+ stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName())); > stringBuffer.append(TEXT_335); >- /*XXX: Class name DomainElementInitializer should be user-customizable*/ >+ stringBuffer.append(linkClass.getClassifierAccessorName()); > stringBuffer.append(TEXT_336); >- stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); >+ /*XXX: Class name DomainElementInitializer should be user-customizable*/ > stringBuffer.append(TEXT_337); >- stringBuffer.append(genLink.getUniqueIdentifier()); >+ stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); > stringBuffer.append(TEXT_338); >+ stringBuffer.append(genLink.getUniqueIdentifier()); >+ stringBuffer.append(TEXT_339); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > >- stringBuffer.append(TEXT_339); >+ stringBuffer.append(TEXT_340); > > } > >- stringBuffer.append(TEXT_340); >- stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName())); > stringBuffer.append(TEXT_341); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); >+ stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName())); > stringBuffer.append(TEXT_342); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); > stringBuffer.append(TEXT_343); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); >+ stringBuffer.append(TEXT_344); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_344); >+ stringBuffer.append(TEXT_345); > > TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); > GenFeature sourceFeature = modelFacet.getSourceMetaFeature(); >@@ -1304,85 +1307,85 @@ > } > } > >- stringBuffer.append(TEXT_345); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); > stringBuffer.append(TEXT_346); >- stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); > stringBuffer.append(TEXT_347); >- stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); >+ stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_348); >- stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); >+ stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); > stringBuffer.append(TEXT_349); >- stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_350); >- stringBuffer.append(containmentFeature.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_351); >+ stringBuffer.append(containmentFeature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_352); > > } > if (addChild) { > >- stringBuffer.append(TEXT_352); >- stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_353); >- stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_354); >- stringBuffer.append(childFeature.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_355); >+ stringBuffer.append(childFeature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_356); > > } > if (addSource) { > >- stringBuffer.append(TEXT_356); >- stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_357); >- stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_358); >- stringBuffer.append(sourceFeature.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_359); >+ stringBuffer.append(sourceFeature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_360); > > } > if (addTarget) { > >- stringBuffer.append(TEXT_360); >- stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_361); >- stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_362); >- stringBuffer.append(targetFeature.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_363); >+ stringBuffer.append(targetFeature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_364); > > } > >- stringBuffer.append(TEXT_364); >+ stringBuffer.append(TEXT_365); > > } else if (genLink.getModelFacet() instanceof FeatureModelFacet) { > GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); > >- stringBuffer.append(TEXT_365); >- stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_366); >- stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); >+ stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); > stringBuffer.append(TEXT_367); >- stringBuffer.append(metaFeature.getFeatureAccessorName()); >+ stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); > stringBuffer.append(TEXT_368); >+ stringBuffer.append(metaFeature.getFeatureAccessorName()); >+ stringBuffer.append(TEXT_369); > > } > >- stringBuffer.append(TEXT_369); >+ stringBuffer.append(TEXT_370); > > if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { > >- stringBuffer.append(TEXT_370); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); > stringBuffer.append(TEXT_371); > stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); > stringBuffer.append(TEXT_372); >- stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); > stringBuffer.append(TEXT_373); >+ stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); >+ stringBuffer.append(TEXT_374); > > } > >- stringBuffer.append(TEXT_374); >+ stringBuffer.append(TEXT_375); > > } > >@@ -1391,22 +1394,22 @@ > if (genNode.getViewmap() instanceof InnerClassViewmap) { > String classBody = ((InnerClassViewmap) genNode.getViewmap()).getClassBody(); > >- stringBuffer.append(TEXT_375); >- stringBuffer.append(classBody); > stringBuffer.append(TEXT_376); >+ stringBuffer.append(classBody); >+ stringBuffer.append(TEXT_377); > > if (classBody.indexOf("DPtoLP") != -1) { > >- stringBuffer.append(TEXT_377); >+ stringBuffer.append(TEXT_378); > > } > > > } > >- stringBuffer.append(TEXT_378); >- importManager.emitSortedImports(); > stringBuffer.append(TEXT_379); >+ importManager.emitSortedImports(); >+ stringBuffer.append(TEXT_380); > return stringBuffer.toString(); > } > } >Index: templates/parts/NodeEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/NodeEditPart.javajet,v >retrieving revision 1.6 >diff -u -r1.6 NodeEditPart.javajet >--- templates/parts/NodeEditPart.javajet 25 May 2006 14:26:26 -0000 1.6 >+++ templates/parts/NodeEditPart.javajet 29 May 2006 08:11:56 -0000 >@@ -380,7 +380,12 @@ > */ > public void performRequest(<%=importManager.getImportedName("org.eclipse.gef.Request")%> req) { > if (<%=importManager.getImportedName("org.eclipse.gef.RequestConstants")%>.REQ_DIRECT_EDIT == req.getType()) { >- <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> labelToEdit = getLabelEditPart((<%=importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")%>)req); >+ <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> labelToEdit; >+ if (req instanceof <%=importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")%>) { >+ labelToEdit = getLabelEditPart((<%=importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")%>)req); >+ } else { >+ labelToEdit = getPrimaryLabelEditPart(); >+ } > if (labelToEdit != null) { > labelToEdit.performRequest(req); > } >Index: templates/parts/LinkEditPart.javajet >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.codegen.lite/templates/parts/LinkEditPart.javajet,v >retrieving revision 1.3 >diff -u -r1.3 LinkEditPart.javajet >--- templates/parts/LinkEditPart.javajet 25 May 2006 14:26:26 -0000 1.3 >+++ templates/parts/LinkEditPart.javajet 29 May 2006 08:11:56 -0000 >@@ -76,7 +76,12 @@ > */ > public void performRequest(<%=importManager.getImportedName("org.eclipse.gef.Request")%> req) { > if (<%=importManager.getImportedName("org.eclipse.gef.RequestConstants")%>.REQ_DIRECT_EDIT == req.getType()) { >- <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> labelToEdit = getLabelEditPart((<%=importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")%>)req); >+ <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> labelToEdit; >+ if (req instanceof <%=importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")%>) { >+ labelToEdit = getLabelEditPart((<%=importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")%>)req); >+ } else { >+ labelToEdit = getPrimaryLabelEditPart(); >+ } > if (labelToEdit != null) { > labelToEdit.performRequest(req); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 144180
: 42846