View | Details | Raw Unified | Return to bug 155955
Collapse All | Expand All

(-)templates/parts/NodeEditPart.javajet (-3 / +179 lines)
Lines 96-101 Link Here
96
		}
96
		}
97
	}
97
	}
98
98
99
	public boolean hasBothChildrenAndCompartments() {
100
		return !genNode.getCompartments().isEmpty() && !genNode.getChildNodes().isEmpty();
101
	}
102
99
	public boolean containsLinks() {
103
	public boolean containsLinks() {
100
		return containsFeatureModelFacetLinks() || containsTypeModelFacetLinks();
104
		return containsFeatureModelFacetLinks() || containsTypeModelFacetLinks();
101
	}
105
	}
Lines 192-197 Link Here
192
	 */
196
	 */
193
	protected <%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> primaryShape;
197
	protected <%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> primaryShape;
194
198
199
<%
200
	if (myHelper.hasBothChildrenAndCompartments()) {
201
%>
202
	/**
203
	 * @generated
204
	 */
205
	protected <%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> childNodesPane;
206
<%
207
	}
208
%>
209
195
	/**
210
	/**
196
	 * @generated
211
	 * @generated
197
	 */
212
	 */
Lines 207-216 Link Here
207
	 */
222
	 */
208
	protected void createEditPolicies() {
223
	protected void createEditPolicies() {
209
<%@ include file="componentEditPolicy.javajetinc"%>
224
<%@ include file="componentEditPolicy.javajetinc"%>
210
		installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.LAYOUT_ROLE, new <%=importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy")%>() {
225
<%
226
String layoutEditPolicyBaseClass;
227
if (!genNode.getChildNodes().isEmpty() && isXYLayout) {
228
	layoutEditPolicyBaseClass = "org.eclipse.gef.editpolicies.XYLayoutEditPolicy";
229
} else {
230
	layoutEditPolicyBaseClass = "org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy";
231
}
232
%>
233
		installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.LAYOUT_ROLE, new <%=importManager.getImportedName(layoutEditPolicyBaseClass)%>() {
211
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getCreateCommand(<%=importManager.getImportedName("org.eclipse.gef.requests.CreateRequest")%> request) {
234
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> getCreateCommand(<%=importManager.getImportedName("org.eclipse.gef.requests.CreateRequest")%> request) {
235
<%
236
if (palette != null && !genNode.getChildNodes().isEmpty()) {
237
%>
238
				if (request instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>) {
239
					<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%> requestEx = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx")%>) request;
240
					int[] visualIds = requestEx.getVisualIds();
241
					<%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%> result = new <%=importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand")%>();
242
					for(int i = 0; i < visualIds.length; i++) {
243
						int nextVisualId = visualIds[i];
244
						switch (nextVisualId) {
245
<%
246
	for(Iterator it = genNode.getChildNodes().iterator(); it.hasNext(); ) {
247
		GenChildNode next = (GenChildNode)it.next();
248
%>
249
						case <%=importManager.getImportedName(next.getEditPartQualifiedClassName())%>.VISUAL_ID:
250
							result.append(new Create<%=next.getDomainMetaClass().getName()%><%=next.getVisualID()%>Command((View) getModel(), requestEx<%if (isXYLayout) {%>, 
251
								(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%>)getConstraintFor(request)<%}%>));
252
							break;
253
<%
254
	}
255
%>
256
						}
257
					}
258
					return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(((View) getModel()).getDiagram().getElement()), result);
259
				}
260
<%
261
}
262
%>
212
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
263
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
213
			}
264
			}
265
<%
266
if (!genNode.getChildNodes().isEmpty() && isXYLayout) {
267
%>
268
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> createChangeConstraintCommand(final <%=importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest")%> request, final <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
269
				if (!isDirectChild(child)) {
270
					return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
271
				}
272
<%@include file="changeConstraintCommand.jetinc"%>
273
			}
274
			protected Command createChangeConstraintCommand(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
275
				assert false;
276
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
277
			}
278
<%
279
} else {
280
%>
214
			protected Object getConstraintFor(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> rect) {
281
			protected Object getConstraintFor(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> rect) {
215
				return null;
282
				return null;
216
			}
283
			}
Lines 220-226 Link Here
220
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> createChangeConstraintCommand(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
287
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> createChangeConstraintCommand(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
221
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
288
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
222
			}
289
			}
290
<%
291
}
292
%>
223
			protected <%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%> createChildEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child) {
293
			protected <%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%> createChildEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child) {
294
<%
295
if (!genNode.getChildNodes().isEmpty()) {
296
%>
297
				if (isDirectChild(child)) {
298
					return super.createChildEditPolicy(child);
299
				}
300
<%
301
}
302
%>
224
				return new <%=importManager.getImportedName("org.eclipse.gef.editpolicies.ResizableEditPolicy")%>() {
303
				return new <%=importManager.getImportedName("org.eclipse.gef.editpolicies.ResizableEditPolicy")%>() {
225
					public <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> getTargetEditPart(<%=importManager.getImportedName("org.eclipse.gef.Request")%> request) {
304
					public <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> getTargetEditPart(<%=importManager.getImportedName("org.eclipse.gef.Request")%> request) {
226
						if (<%=importManager.getImportedName("org.eclipse.gef.RequestConstants")%>.REQ_SELECTION.equals(request.getType())) {
305
						if (<%=importManager.getImportedName("org.eclipse.gef.RequestConstants")%>.REQ_SELECTION.equals(request.getType())) {
Lines 458-463 Link Here
458
			}
537
			}
459
		});
538
		});
460
<%
539
<%
540
if (!genNode.getChildNodes().isEmpty()) {
541
%>
542
		installNotationModelRefresher();
543
<%
544
}
545
%>
546
<%
461
if (myHelper.containsLinks()) {
547
if (myHelper.containsLinks()) {
462
%>
548
%>
463
		installLinkNotationModelRefresher();
549
		installLinkNotationModelRefresher();
Lines 475-481 Link Here
475
		<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> shape = createNodeShape();
561
		<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> shape = createNodeShape();
476
		invisibleRectangle.add(shape);
562
		invisibleRectangle.add(shape);
477
		contentPane = setupContentPane(shape);
563
		contentPane = setupContentPane(shape);
478
		
564
<%
565
	if (myHelper.hasBothChildrenAndCompartments()) {
566
%>
567
		childNodesPane = createChildNodesPane();
568
		shape.add(childNodesPane);
569
<%
570
	}
571
%>
572
479
		<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> decorationShape = createDecorationPane();
573
		<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> decorationShape = createDecorationPane();
480
		if (decorationShape != null) {
574
		if (decorationShape != null) {
481
			invisibleRectangle.add(decorationShape);
575
			invisibleRectangle.add(decorationShape);
Lines 484-489 Link Here
484
		return invisibleRectangle;
578
		return invisibleRectangle;
485
	}
579
	}
486
580
581
<%
582
	if (!genNode.getCompartments().isEmpty() && !genNode.getChildNodes().isEmpty()) {
583
%>
584
	/**
585
	 * @generated
586
	 */
587
	protected <%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> createChildNodesPane() {
588
		<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> result = new <%=importManager.getImportedName("org.eclipse.draw2d.RectangleFigure")%>();
589
		setupContentPane(result);
590
		return result;
591
	}
592
<%
593
	}
594
%>
487
	/**
595
	/**
488
	 * @generated
596
	 * @generated
489
	 */
597
	 */
Lines 757-763 Link Here
757
865
758
<%
866
<%
759
}
867
}
760
if (myHelper.hasExternalLabels() || myHelper.hasFixedChildren()) {
868
if (!genNode.getChildNodes().isEmpty()) {
869
%>
870
	/**
871
	 * @generated
872
	 */
873
	protected boolean isDirectChild(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> childEditPart) {
874
<%
875
	for(Iterator directChildren = genNode.getChildNodes().iterator(); directChildren.hasNext(); ) {
876
		GenChildNode next = (GenChildNode) directChildren.next();
877
%>
878
		if (childEditPart instanceof <%=importManager.getImportedName(next.getEditPartQualifiedClassName())%>) {
879
			return true;
880
		}
881
<%
882
	}
883
%>
884
		return false;
885
	}
886
<%
887
}
888
if (myHelper.hasExternalLabels() || myHelper.hasFixedChildren() || myHelper.hasBothChildrenAndCompartments()) {
761
%>
889
%>
762
890
763
	/**
891
	/**
Lines 781-786 Link Here
781
		}
909
		}
782
<%
910
<%
783
	}
911
	}
912
	if (myHelper.hasBothChildrenAndCompartments()) {
913
%>
914
		if (isDirectChild(childEditPart)) {
915
			<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> childFigure = ((<%=importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")%>) childEditPart).getFigure();
916
			childNodesPane.add(childFigure);
917
			return;
918
		}
919
<%
920
	}
784
%>
921
%>
785
		super.addChildVisual(childEditPart, -1);
922
		super.addChildVisual(childEditPart, -1);
786
	}
923
	}
Lines 806-811 Link Here
806
		}
943
		}
807
<%
944
<%
808
	}
945
	}
946
	if (myHelper.hasBothChildrenAndCompartments()) {
947
%>
948
		if (isDirectChild(childEditPart)) {
949
			<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> childFigure = ((<%=importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")%>) childEditPart).getFigure();
950
			childNodesPane.remove(childFigure);
951
			return;
952
		}
953
<%
954
	}
809
%>
955
%>
810
		super.removeChildVisual(childEditPart);
956
		super.removeChildVisual(childEditPart);
811
	}
957
	}
Lines 939-944 Link Here
939
		super.activate();
1085
		super.activate();
940
		getDiagramNode().getElement().eAdapters().add(domainModelRefresher);
1086
		getDiagramNode().getElement().eAdapters().add(domainModelRefresher);
941
<%
1087
<%
1088
if (!genNode.getChildNodes().isEmpty()) {
1089
%>
1090
		installNotationModelRefresher();
1091
<%
1092
}
1093
%>
1094
<%
942
if (myHelper.containsLinks()) {
1095
if (myHelper.containsLinks()) {
943
%>
1096
%>
944
		installLinkNotationModelRefresher();
1097
		installLinkNotationModelRefresher();
Lines 958-963 Link Here
958
<%
1111
<%
959
}
1112
}
960
%>
1113
%>
1114
<%
1115
if (!genNode.getChildNodes().isEmpty()) {
1116
%>
1117
		uninstallNotationModelRefresher();
1118
<%
1119
}
1120
%>
961
		getDiagramNode().getElement().eAdapters().remove(domainModelRefresher);
1121
		getDiagramNode().getElement().eAdapters().remove(domainModelRefresher);
962
		super.deactivate();
1122
		super.deactivate();
963
	}
1123
	}
Lines 966-971 Link Here
966
	final String _getViewCode = "getDiagramNode()";
1126
	final String _getViewCode = "getDiagramNode()";
967
	final String _getDiagramCode = "getDiagramNode().getDiagram()";
1127
	final String _getDiagramCode = "getDiagramNode().getDiagram()";
968
	final boolean _includeUncontainedLinks = false;
1128
	final boolean _includeUncontainedLinks = false;
1129
	if (!genNode.getChildNodes().isEmpty()) {
1130
		final boolean isListLayout = !isXYLayout;
1131
		final List childNodes = genNode.getChildNodes();
1132
%>
1133
<%@ include file="notationModelRefresher.jetinc"%>
1134
<%
1135
	}
969
%>
1136
%>
970
<%@ include file="linkNotationModelRefresher.jetinc"%>
1137
<%@ include file="linkNotationModelRefresher.jetinc"%>
971
<%
1138
<%
Lines 1000-1005 Link Here
1000
	}
1167
	}
1001
1168
1002
<%
1169
<%
1170
for(Iterator it = genNode.getChildNodes().iterator(); it.hasNext(); ) {
1171
	GenChildNode next = (GenChildNode)it.next();
1172
	boolean isStatic = true;
1173
	boolean isListLayout = !isXYLayout;
1174
	String resolvedSemanticElement = "parent.getElement()";
1175
%>
1176
<%@ include file="createNodeCommand.javajetinc"%>
1177
<%
1178
}
1003
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1179
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1004
	GenLink genLink = (GenLink)it.next();
1180
	GenLink genLink = (GenLink)it.next();
1005
	if (!genLink.isViewDirectionAlignedWithModel() || genLink.getModelFacet() == null) {
1181
	if (!genLink.isViewDirectionAlignedWithModel() || genLink.getModelFacet() == null) {
(-)templates/parts/DiagramEditPart.javajet (-40 / +4 lines)
Lines 169-216 Link Here
169
<%}/*when there's palette*/%>
169
<%}/*when there's palette*/%>
170
				return null;
170
				return null;
171
			}
171
			}
172
			protected Command createChangeConstraintCommand(final ChangeBoundsRequest request, EditPart child, Object constraint) {
172
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> createChangeConstraintCommand(final <%=importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest")%> request, final <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
173
				final Node node = (Node) child.getModel();
173
<%@include file="changeConstraintCommand.jetinc"%>
174
				<%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> emfCommand = new <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%>("Change node position/size") {
175
					private Point moveDelta;
176
					private Dimension resizeDelta;
177
178
					public boolean canUndo() {
179
						return canExecute();
180
					}
181
					protected boolean prepare() {
182
						if (node.getLayoutConstraint() instanceof Bounds == false) {
183
							return false;
184
						}
185
						Bounds bounds = (Bounds) node.getLayoutConstraint();
186
						<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> original = new <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%>(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
187
						<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> transformed = request.getTransformedRectangle(original);
188
						resizeDelta = transformed.getSize().expand(original.getSize().negate());
189
						moveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());
190
						return true;
191
					}
192
					public void undo() {
193
						execute(moveDelta.getNegated(), resizeDelta.getNegated());
194
					}
195
					public void execute() {
196
						execute(moveDelta, resizeDelta);
197
					}
198
					public void redo() {
199
						execute();
200
					}
201
					private void execute(Point move, Dimension resize) {
202
						Bounds bounds = (Bounds) node.getLayoutConstraint();
203
						bounds.setX(bounds.getX() + move.x);
204
						bounds.setY(bounds.getY() + move.y);
205
						bounds.setWidth(bounds.getWidth() + resize.width);
206
						bounds.setHeight(bounds.getHeight() + resize.height);
207
					}
208
				};
209
				return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(getDiagram().getElement()), emfCommand);
210
			}
174
			}
211
			protected Command createChangeConstraintCommand(EditPart child, Object constraint) {
175
			protected Command createChangeConstraintCommand(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
212
				assert false;
176
				assert false;
213
				return UnexecutableCommand.INSTANCE;
177
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
214
			}
178
			}
215
		});
179
		});
216
		installNotationModelRefresher();
180
		installNotationModelRefresher();
(-)templates/parts/CompartmentEditPart.javajet (-43 / +3 lines)
Lines 58-107 Link Here
58
	protected void createEditPolicies() {
58
	protected void createEditPolicies() {
59
<%if (!genCompartment.isListLayout()) {%>
59
<%if (!genCompartment.isListLayout()) {%>
60
		installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.LAYOUT_ROLE, new <%=importManager.getImportedName("org.eclipse.gef.editpolicies.XYLayoutEditPolicy")%>() {
60
		installEditPolicy(<%=importManager.getImportedName("org.eclipse.gef.EditPolicy")%>.LAYOUT_ROLE, new <%=importManager.getImportedName("org.eclipse.gef.editpolicies.XYLayoutEditPolicy")%>() {
61
			protected Command createChangeConstraintCommand(final <%=importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest")%> request, final EditPart child, Object constraint) {
61
			protected <%=importManager.getImportedName("org.eclipse.gef.commands.Command")%> createChangeConstraintCommand(final <%=importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest")%> request, final <%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
62
				final Node node = (Node) child.getModel();
62
<%@include file="changeConstraintCommand.jetinc"%>
63
				<%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> emfCommand = new <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%>("Change node position/size") {
64
					private <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> moveDelta;
65
					private <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%> resizeDelta;
66
67
					public boolean canUndo() {
68
						return canExecute();
69
					}
70
					protected boolean prepare() {
71
						if (node.getLayoutConstraint() instanceof Bounds == false) {
72
							return false;
73
						}
74
						Bounds bounds = (Bounds) node.getLayoutConstraint();
75
						<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> original = new <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%>(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
76
						<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> referenceFigure = ((<%=importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")%>)child).getFigure();
77
						referenceFigure.translateToAbsolute(original);
78
						<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> transformed = request.getTransformedRectangle(original);
79
						referenceFigure.translateToRelative(transformed);
80
						referenceFigure.translateToRelative(original);
81
						resizeDelta = transformed.getSize().expand(original.getSize().negate());
82
						moveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());
83
						return true;
84
					}
85
					public void undo() {
86
						execute(moveDelta.getNegated(), resizeDelta.getNegated());
87
					}
88
					public void execute() {
89
						execute(moveDelta, resizeDelta);
90
					}
91
					public void redo() {
92
						execute();
93
					}
94
					private void execute(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> move, <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%> resize) {
95
						Bounds bounds = (Bounds) node.getLayoutConstraint();
96
						bounds.setX(bounds.getX() + move.x);
97
						bounds.setY(bounds.getY() + move.y);
98
						bounds.setWidth(bounds.getWidth() + resize.width);
99
						bounds.setHeight(bounds.getHeight() + resize.height);
100
					}
101
				};
102
				return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(node.getDiagram().getElement()), emfCommand);
103
			}
63
			}
104
			protected Command createChangeConstraintCommand(EditPart child, Object constraint) {
64
			protected Command createChangeConstraintCommand(<%=importManager.getImportedName("org.eclipse.gef.EditPart")%> child, Object constraint) {
105
				assert false;
65
				assert false;
106
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
66
				return <%=importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand")%>.INSTANCE;
107
			}
67
			}
(-)src-templates/org/eclipse/gmf/codegen/templates/lite/editor/VisualIDRegistryGenerator.java (-2 / +7 lines)
Lines 197-206 Link Here
197
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
197
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
198
    stringBuffer.append(TEXT_21);
198
    stringBuffer.append(TEXT_21);
199
    
199
    
200
Collection nodeContainers = new ArrayList(genDiagram.getCompartments());
200
List nodeContainers = genDiagram.getAllContainers();
201
nodeContainers.add(genDiagram);
202
for(Iterator it = nodeContainers.iterator(); it.hasNext(); ) {
201
for(Iterator it = nodeContainers.iterator(); it.hasNext(); ) {
203
	GenContainerBase nextContainer = (GenContainerBase) it.next();
202
	GenContainerBase nextContainer = (GenContainerBase) it.next();
203
	if (nextContainer.getContainedNodes().isEmpty()) {
204
		continue;
205
	}
204
206
205
    stringBuffer.append(TEXT_22);
207
    stringBuffer.append(TEXT_22);
206
    stringBuffer.append(importManager.getImportedName(nextContainer.getEditPartQualifiedClassName()));
208
    stringBuffer.append(importManager.getImportedName(nextContainer.getEditPartQualifiedClassName()));
Lines 291-296 Link Here
291
}
293
}
292
for (Iterator containers = nodeContainers.iterator(); containers.hasNext();) {
294
for (Iterator containers = nodeContainers.iterator(); containers.hasNext();) {
293
	GenContainerBase nextContainer = (GenContainerBase) containers.next();
295
	GenContainerBase nextContainer = (GenContainerBase) containers.next();
296
	if (nextContainer.getContainedNodes().isEmpty()) {
297
		continue;
298
	}
294
299
295
    stringBuffer.append(TEXT_50);
300
    stringBuffer.append(TEXT_50);
296
    stringBuffer.append(nextContainer.getUniqueIdentifier());
301
    stringBuffer.append(nextContainer.getUniqueIdentifier());
(-)src-templates/org/eclipse/gmf/codegen/templates/lite/parts/CompartmentEditPartGenerator.java (-479 / +513 lines)
Lines 51-299 Link Here
51
  protected final String TEXT_32 = ") getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {";
51
  protected final String TEXT_32 = ") getModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {";
52
  protected final String TEXT_33 = NL + "\t\tinstallEditPolicy(";
52
  protected final String TEXT_33 = NL + "\t\tinstallEditPolicy(";
53
  protected final String TEXT_34 = ".LAYOUT_ROLE, new ";
53
  protected final String TEXT_34 = ".LAYOUT_ROLE, new ";
54
  protected final String TEXT_35 = "() {" + NL + "\t\t\tprotected Command createChangeConstraintCommand(final ";
54
  protected final String TEXT_35 = "() {" + NL + "\t\t\tprotected ";
55
  protected final String TEXT_36 = " request, final EditPart child, Object constraint) {" + NL + "\t\t\t\tfinal Node node = (Node) child.getModel();" + NL + "\t\t\t\t";
55
  protected final String TEXT_36 = " createChangeConstraintCommand(final ";
56
  protected final String TEXT_37 = " emfCommand = new ";
56
  protected final String TEXT_37 = " request, final ";
57
  protected final String TEXT_38 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate ";
57
  protected final String TEXT_38 = " child, Object constraint) {";
58
  protected final String TEXT_39 = " moveDelta;" + NL + "\t\t\t\t\tprivate ";
58
  protected final String TEXT_39 = NL;
59
  protected final String TEXT_40 = " resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof Bounds == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t";
59
  protected final String TEXT_40 = "\t\t\t\tfinal ";
60
  protected final String TEXT_41 = " original = new ";
60
  protected final String TEXT_41 = " node = (";
61
  protected final String TEXT_42 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t";
61
  protected final String TEXT_42 = ") child.getModel();" + NL + "\t\t\t\t";
62
  protected final String TEXT_43 = " referenceFigure = ((";
62
  protected final String TEXT_43 = " emfCommand = new ";
63
  protected final String TEXT_44 = ")child).getFigure();" + NL + "\t\t\t\t\t\treferenceFigure.translateToAbsolute(original);" + NL + "\t\t\t\t\t\t";
63
  protected final String TEXT_44 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate ";
64
  protected final String TEXT_45 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(transformed);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(";
64
  protected final String TEXT_45 = " moveDelta;" + NL + "\t\t\t\t\tprivate ";
65
  protected final String TEXT_46 = " move, ";
65
  protected final String TEXT_46 = " resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof ";
66
  protected final String TEXT_47 = " resize) {" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new ";
66
  protected final String TEXT_47 = " == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t";
67
  protected final String TEXT_48 = "(";
67
  protected final String TEXT_48 = " bounds = (";
68
  protected final String TEXT_49 = ".getEditingDomain(node.getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn ";
68
  protected final String TEXT_49 = ") node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t";
69
  protected final String TEXT_50 = ".INSTANCE;" + NL + "\t\t\t}";
69
  protected final String TEXT_50 = " original = new ";
70
  protected final String TEXT_51 = NL + "\t\tinstallEditPolicy(";
70
  protected final String TEXT_51 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t";
71
  protected final String TEXT_52 = ".LAYOUT_ROLE, new ";
71
  protected final String TEXT_52 = " referenceFigure = ((";
72
  protected final String TEXT_53 = "() {" + NL + "\t\t\tprotected Object getConstraintFor(";
72
  protected final String TEXT_53 = ")child).getFigure();" + NL + "\t\t\t\t\t\treferenceFigure.translateToAbsolute(original);" + NL + "\t\t\t\t\t\t";
73
  protected final String TEXT_54 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor(";
73
  protected final String TEXT_54 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(transformed);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(";
74
  protected final String TEXT_55 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\treturn ";
74
  protected final String TEXT_55 = " move, ";
75
  protected final String TEXT_56 = ".INSTANCE;" + NL + "\t\t\t}";
75
  protected final String TEXT_56 = " resize) {" + NL + "\t\t\t\t\t\t";
76
  protected final String TEXT_57 = NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {";
76
  protected final String TEXT_57 = " bounds = (";
77
  protected final String TEXT_58 = NL + "\t\t\t\tif (request instanceof ";
77
  protected final String TEXT_58 = ") node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new ";
78
  protected final String TEXT_59 = ") {" + NL + "\t\t\t\t\t";
78
  protected final String TEXT_59 = "(";
79
  protected final String TEXT_60 = " requestEx = (";
79
  protected final String TEXT_60 = ".getEditingDomain(node.getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(";
80
  protected final String TEXT_61 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
80
  protected final String TEXT_61 = " child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn ";
81
  protected final String TEXT_62 = " result = new ";
81
  protected final String TEXT_62 = ".INSTANCE;" + NL + "\t\t\t}";
82
  protected final String TEXT_63 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
82
  protected final String TEXT_63 = NL + "\t\tinstallEditPolicy(";
83
  protected final String TEXT_64 = NL + "\t\t\t\t\t\tcase ";
83
  protected final String TEXT_64 = ".LAYOUT_ROLE, new ";
84
  protected final String TEXT_65 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
84
  protected final String TEXT_65 = "() {" + NL + "\t\t\tprotected Object getConstraintFor(";
85
  protected final String TEXT_66 = "Command((View) getModel(), requestEx";
85
  protected final String TEXT_66 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor(";
86
  protected final String TEXT_67 = ", " + NL + "\t\t\t\t\t\t\t\t(";
86
  protected final String TEXT_67 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\treturn ";
87
  protected final String TEXT_68 = ")getConstraintFor(request)";
87
  protected final String TEXT_68 = ".INSTANCE;" + NL + "\t\t\t}";
88
  protected final String TEXT_69 = "));" + NL + "\t\t\t\t\t\t\tbreak;";
88
  protected final String TEXT_69 = NL + "\t\t\tprotected Command getCreateCommand(CreateRequest request) {";
89
  protected final String TEXT_70 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
89
  protected final String TEXT_70 = NL + "\t\t\t\tif (request instanceof ";
90
  protected final String TEXT_71 = "(";
90
  protected final String TEXT_71 = ") {" + NL + "\t\t\t\t\t";
91
  protected final String TEXT_72 = ".getEditingDomain(((View) getModel()).getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
91
  protected final String TEXT_72 = " requestEx = (";
92
  protected final String TEXT_73 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getTitleName() {" + NL + "\t\treturn \"";
92
  protected final String TEXT_73 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
93
  protected final String TEXT_74 = "\";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
93
  protected final String TEXT_74 = " result = new ";
94
  protected final String TEXT_75 = " createFigure() {" + NL + "\t\t";
94
  protected final String TEXT_75 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
95
  protected final String TEXT_76 = " result = new ";
95
  protected final String TEXT_76 = NL + "\t\t\t\t\t\tcase ";
96
  protected final String TEXT_77 = "();" + NL + "\t\tresult.setLabel(getTitleName());" + NL + "\t\tresult.setOpaque(false);" + NL + "\t\tresult.setLayoutManager(new ";
96
  protected final String TEXT_77 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
97
  protected final String TEXT_78 = "());" + NL + "\t\t";
97
  protected final String TEXT_78 = "Command((View) getModel(), requestEx";
98
  protected final String TEXT_79 = " scrollPane = new ";
98
  protected final String TEXT_79 = ", " + NL + "\t\t\t\t\t\t\t\t(";
99
  protected final String TEXT_80 = "();" + NL + "\t\tresult.add(scrollPane);";
99
  protected final String TEXT_80 = ")getConstraintFor(request)";
100
  protected final String TEXT_81 = NL + "\t\t";
100
  protected final String TEXT_81 = "));" + NL + "\t\t\t\t\t\t\tbreak;";
101
  protected final String TEXT_82 = " viewport = new ";
101
  protected final String TEXT_82 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
102
  protected final String TEXT_83 = "();" + NL + "\t\tcontentPane = new ";
102
  protected final String TEXT_83 = "(";
103
  protected final String TEXT_84 = "();" + NL + "\t\tcontentPane.setLayoutManager(new ";
103
  protected final String TEXT_84 = ".getEditingDomain(((View) getModel()).getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
104
  protected final String TEXT_85 = "());";
104
  protected final String TEXT_85 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected String getTitleName() {" + NL + "\t\treturn \"";
105
  protected final String TEXT_86 = NL + "\t\t";
105
  protected final String TEXT_86 = "\";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
106
  protected final String TEXT_87 = " viewport = new ";
106
  protected final String TEXT_87 = " createFigure() {" + NL + "\t\t";
107
  protected final String TEXT_88 = "();" + NL + "\t\tcontentPane = new ";
107
  protected final String TEXT_88 = " result = new ";
108
  protected final String TEXT_89 = "();" + NL + "\t\tcontentPane.setLayoutManager(new ";
108
  protected final String TEXT_89 = "();" + NL + "\t\tresult.setLabel(getTitleName());" + NL + "\t\tresult.setOpaque(false);" + NL + "\t\tresult.setLayoutManager(new ";
109
  protected final String TEXT_90 = "());";
109
  protected final String TEXT_90 = "());" + NL + "\t\t";
110
  protected final String TEXT_91 = NL + "\t\tviewport.setContents(contentPane);" + NL + "\t\tscrollPane.setViewport(viewport);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
110
  protected final String TEXT_91 = " scrollPane = new ";
111
  protected final String TEXT_92 = " resolveSemanticElement() {" + NL + "\t\tView view = getDiagramNode();" + NL + "\t\treturn (view.getElement() instanceof ";
111
  protected final String TEXT_92 = "();" + NL + "\t\tresult.add(scrollPane);";
112
  protected final String TEXT_93 = ") ? (";
112
  protected final String TEXT_93 = NL + "\t\t";
113
  protected final String TEXT_94 = ") view.getElement() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL;
113
  protected final String TEXT_94 = " viewport = new ";
114
  protected final String TEXT_95 = NL;
114
  protected final String TEXT_95 = "();" + NL + "\t\tcontentPane = new ";
115
  protected final String TEXT_96 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t";
115
  protected final String TEXT_96 = "();" + NL + "\t\tcontentPane.setLayoutManager(new ";
116
  protected final String TEXT_97 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
116
  protected final String TEXT_97 = "());";
117
  protected final String TEXT_98 = " domainModelEditDomain = ";
117
  protected final String TEXT_98 = NL + "\t\t";
118
  protected final String TEXT_99 = ".getEditingDomain(";
118
  protected final String TEXT_99 = " viewport = new ";
119
  protected final String TEXT_100 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
119
  protected final String TEXT_100 = "();" + NL + "\t\tcontentPane = new ";
120
  protected final String TEXT_101 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
120
  protected final String TEXT_101 = "();" + NL + "\t\tcontentPane.setLayoutManager(new ";
121
  protected final String TEXT_102 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends ";
121
  protected final String TEXT_102 = "());";
122
  protected final String TEXT_103 = " {";
122
  protected final String TEXT_103 = NL + "\t\tviewport.setContents(contentPane);" + NL + "\t\tscrollPane.setViewport(viewport);" + NL + "\t\treturn result;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getContentPane() {" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
123
  protected final String TEXT_104 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in ";
123
  protected final String TEXT_104 = " resolveSemanticElement() {" + NL + "\t\tView view = getDiagramNode();" + NL + "\t\treturn (view.getElement() instanceof ";
124
  protected final String TEXT_105 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
124
  protected final String TEXT_105 = ") ? (";
125
  protected final String TEXT_106 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn ";
125
  protected final String TEXT_106 = ") view.getElement() : null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tinstallNotationModelRefresher();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL;
126
  protected final String TEXT_107 = ".NOT_TOUCH;" + NL + "\t\t}";
126
  protected final String TEXT_107 = NL;
127
  protected final String TEXT_108 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
127
  protected final String TEXT_108 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t";
128
  protected final String TEXT_109 = " createFilter() {";
128
  protected final String TEXT_109 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
129
  protected final String TEXT_110 = NL + "\t\t\t";
129
  protected final String TEXT_110 = " domainModelEditDomain = ";
130
  protected final String TEXT_111 = " filter = ";
130
  protected final String TEXT_111 = ".getEditingDomain(";
131
  protected final String TEXT_112 = ".createFeatureFilter(";
131
  protected final String TEXT_112 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
132
  protected final String TEXT_113 = ".eINSTANCE.get";
132
  protected final String TEXT_113 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
133
  protected final String TEXT_114 = "());";
133
  protected final String TEXT_114 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends ";
134
  protected final String TEXT_115 = NL + "\t\t\tfilter = filter.or(";
134
  protected final String TEXT_115 = " {";
135
  protected final String TEXT_116 = ".createFeatureFilter(";
135
  protected final String TEXT_116 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in ";
136
  protected final String TEXT_117 = ".eINSTANCE.get";
136
  protected final String TEXT_117 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
137
  protected final String TEXT_118 = "()));";
137
  protected final String TEXT_118 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn ";
138
  protected final String TEXT_119 = NL + "\t\t\tfilter = filter.and(";
138
  protected final String TEXT_119 = ".NOT_TOUCH;" + NL + "\t\t}";
139
  protected final String TEXT_120 = ".createNotifierFilter(";
139
  protected final String TEXT_120 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
140
  protected final String TEXT_121 = ".getElement()));";
140
  protected final String TEXT_121 = " createFilter() {";
141
  protected final String TEXT_122 = NL + "\t\t\t";
141
  protected final String TEXT_122 = NL + "\t\t\t";
142
  protected final String TEXT_123 = " filter = ";
142
  protected final String TEXT_123 = " filter = ";
143
  protected final String TEXT_124 = ".createNotifierFilter(";
143
  protected final String TEXT_124 = ".createFeatureFilter(";
144
  protected final String TEXT_125 = ".getElement());";
144
  protected final String TEXT_125 = ".eINSTANCE.get";
145
  protected final String TEXT_126 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);";
145
  protected final String TEXT_126 = "());";
146
  protected final String TEXT_127 = NL + "\t\t\t";
146
  protected final String TEXT_127 = NL + "\t\t\tfilter = filter.or(";
147
  protected final String TEXT_128 = " filter = getConstrainedChildrenFilter();";
147
  protected final String TEXT_128 = ".createFeatureFilter(";
148
  protected final String TEXT_129 = NL + "\t\t\t";
148
  protected final String TEXT_129 = ".eINSTANCE.get";
149
  protected final String TEXT_130 = " filter = ";
149
  protected final String TEXT_130 = "()));";
150
  protected final String TEXT_131 = ".NOT_TOUCH;";
150
  protected final String TEXT_131 = NL + "\t\t\tfilter = filter.and(";
151
  protected final String TEXT_132 = NL + "\t\t\treturn filter;";
151
  protected final String TEXT_132 = ".createNotifierFilter(";
152
  protected final String TEXT_133 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
152
  protected final String TEXT_133 = ".getElement()));";
153
  protected final String TEXT_134 = " getCreateNotationalElementCommand(";
153
  protected final String TEXT_134 = NL + "\t\t\t";
154
  protected final String TEXT_135 = " descriptor) {" + NL + "\t\t\t";
154
  protected final String TEXT_135 = " filter = ";
155
  protected final String TEXT_136 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {";
155
  protected final String TEXT_136 = ".createNotifierFilter(";
156
  protected final String TEXT_137 = NL + "\t\t\tcase ";
156
  protected final String TEXT_137 = ".getElement());";
157
  protected final String TEXT_138 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof ";
157
  protected final String TEXT_138 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);";
158
  protected final String TEXT_139 = ") {" + NL + "\t\t\t\t\treturn new Create";
158
  protected final String TEXT_139 = NL + "\t\t\t";
159
  protected final String TEXT_140 = "NotationCommand(getHost(), domainElement";
159
  protected final String TEXT_140 = " filter = getConstrainedChildrenFilter();";
160
  protected final String TEXT_141 = ", new Rectangle(0, 0, 0, 0)";
160
  protected final String TEXT_141 = NL + "\t\t\t";
161
  protected final String TEXT_142 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;";
161
  protected final String TEXT_142 = " filter = ";
162
  protected final String TEXT_143 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
162
  protected final String TEXT_143 = ".NOT_TOUCH;";
163
  protected final String TEXT_144 = " getSemanticChildNodes() {";
163
  protected final String TEXT_144 = NL + "\t\t\treturn filter;";
164
  protected final String TEXT_145 = NL;
164
  protected final String TEXT_145 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
165
  protected final String TEXT_146 = NL + "\treturn ";
165
  protected final String TEXT_146 = " getCreateNotationalElementCommand(";
166
  protected final String TEXT_147 = ".EMPTY_LIST;";
166
  protected final String TEXT_147 = " descriptor) {" + NL + "\t\t\t";
167
  protected final String TEXT_148 = NL + "\t";
167
  protected final String TEXT_148 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {";
168
  protected final String TEXT_149 = " result = new ";
168
  protected final String TEXT_149 = NL + "\t\t\tcase ";
169
  protected final String TEXT_150 = "();";
169
  protected final String TEXT_150 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof ";
170
  protected final String TEXT_151 = NL + "\t";
170
  protected final String TEXT_151 = ") {" + NL + "\t\t\t\t\treturn new Create";
171
  protected final String TEXT_152 = " viewObject = ";
171
  protected final String TEXT_152 = "NotationCommand(getHost(), domainElement";
172
  protected final String TEXT_153 = ";" + NL + "\t";
172
  protected final String TEXT_153 = ", new Rectangle(0, 0, 0, 0)";
173
  protected final String TEXT_154 = " modelObject = viewObject.getElement();" + NL + "\t";
173
  protected final String TEXT_154 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;";
174
  protected final String TEXT_155 = " nextValue;" + NL + "\tint nodeVID;";
174
  protected final String TEXT_155 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
175
  protected final String TEXT_156 = NL + "\tfor(";
175
  protected final String TEXT_156 = " getSemanticChildNodes() {";
176
  protected final String TEXT_157 = " it = ";
176
  protected final String TEXT_157 = NL;
177
  protected final String TEXT_158 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
177
  protected final String TEXT_158 = NL + "\treturn ";
178
  protected final String TEXT_159 = ") it.next();";
178
  protected final String TEXT_159 = ".EMPTY_LIST;";
179
  protected final String TEXT_160 = NL + "\tnextValue = (";
179
  protected final String TEXT_160 = NL + "\t";
180
  protected final String TEXT_161 = ")";
180
  protected final String TEXT_161 = " result = new ";
181
  protected final String TEXT_162 = ";";
181
  protected final String TEXT_162 = "();";
182
  protected final String TEXT_163 = NL + "\tnodeVID = ";
182
  protected final String TEXT_163 = NL + "\t";
183
  protected final String TEXT_164 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
183
  protected final String TEXT_164 = " viewObject = ";
184
  protected final String TEXT_165 = NL + "\tswitch (nodeVID) {";
184
  protected final String TEXT_165 = ";" + NL + "\t";
185
  protected final String TEXT_166 = NL + "\tcase ";
185
  protected final String TEXT_166 = " modelObject = viewObject.getElement();" + NL + "\t";
186
  protected final String TEXT_167 = ".VISUAL_ID: {";
186
  protected final String TEXT_167 = " nextValue;" + NL + "\tint nodeVID;";
187
  protected final String TEXT_168 = NL + "\tif (";
187
  protected final String TEXT_168 = NL + "\tfor(";
188
  protected final String TEXT_169 = ".VISUAL_ID == nodeVID) {";
188
  protected final String TEXT_169 = " it = ";
189
  protected final String TEXT_170 = NL + "\t\tresult.add(new ";
189
  protected final String TEXT_170 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
190
  protected final String TEXT_171 = "(nextValue, nodeVID));";
190
  protected final String TEXT_171 = ") it.next();";
191
  protected final String TEXT_172 = NL + "\t\tbreak;" + NL + "\t\t}";
191
  protected final String TEXT_172 = NL + "\tnextValue = (";
192
  protected final String TEXT_173 = NL + "\t\t}";
192
  protected final String TEXT_173 = ")";
193
  protected final String TEXT_174 = NL + "\t}";
193
  protected final String TEXT_174 = ";";
194
  protected final String TEXT_175 = NL + "\t}";
194
  protected final String TEXT_175 = NL + "\tnodeVID = ";
195
  protected final String TEXT_176 = NL + "\treturn result;";
195
  protected final String TEXT_176 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
196
  protected final String TEXT_177 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
196
  protected final String TEXT_177 = NL + "\tswitch (nodeVID) {";
197
  protected final String TEXT_178 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
197
  protected final String TEXT_178 = NL + "\tcase ";
198
  protected final String TEXT_179 = " descriptor) {" + NL + "\t\t\treturn ";
198
  protected final String TEXT_179 = ".VISUAL_ID: {";
199
  protected final String TEXT_180 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
199
  protected final String TEXT_180 = NL + "\tif (";
200
  protected final String TEXT_181 = " getHost() {" + NL + "\t\t\treturn ";
200
  protected final String TEXT_181 = ".VISUAL_ID == nodeVID) {";
201
  protected final String TEXT_182 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t";
201
  protected final String TEXT_182 = NL + "\t\tresult.add(new ";
202
  protected final String TEXT_183 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
202
  protected final String TEXT_183 = "(nextValue, nodeVID));";
203
  protected final String TEXT_184 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
203
  protected final String TEXT_184 = NL + "\t\tbreak;" + NL + "\t\t}";
204
  protected final String TEXT_185 = " domainModelEditDomain = ";
204
  protected final String TEXT_185 = NL + "\t\t}";
205
  protected final String TEXT_186 = ".getEditingDomain(";
205
  protected final String TEXT_186 = NL + "\t}";
206
  protected final String TEXT_187 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
206
  protected final String TEXT_187 = NL + "\t}";
207
  protected final String TEXT_188 = "(domainModelEditDomain, command));" + NL + "\t}" + NL;
207
  protected final String TEXT_188 = NL + "\treturn result;";
208
  protected final String TEXT_189 = NL;
208
  protected final String TEXT_189 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
209
  protected final String TEXT_190 = NL;
209
  protected final String TEXT_190 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
210
  protected final String TEXT_191 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
210
  protected final String TEXT_191 = " descriptor) {" + NL + "\t\t\treturn ";
211
  protected final String TEXT_192 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(";
211
  protected final String TEXT_192 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
212
  protected final String TEXT_193 = " feature, ";
212
  protected final String TEXT_193 = " getHost() {" + NL + "\t\t\treturn ";
213
  protected final String TEXT_194 = " 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 HashMap();";
213
  protected final String TEXT_194 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t";
214
  protected final String TEXT_195 = NL;
214
  protected final String TEXT_195 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
215
  protected final String TEXT_196 = "\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(";
215
  protected final String TEXT_196 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
216
  protected final String TEXT_197 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
216
  protected final String TEXT_197 = " domainModelEditDomain = ";
217
  protected final String TEXT_198 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);";
217
  protected final String TEXT_198 = ".getEditingDomain(";
218
  protected final String TEXT_199 = NL;
218
  protected final String TEXT_199 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
219
  protected final String TEXT_200 = "\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(";
219
  protected final String TEXT_200 = "(domainModelEditDomain, command));" + NL + "\t}" + NL;
220
  protected final String TEXT_201 = ".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;
220
  protected final String TEXT_201 = NL;
221
  protected final String TEXT_202 = NL;
221
  protected final String TEXT_202 = NL;
222
  protected final String TEXT_203 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
222
  protected final String TEXT_203 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
223
  protected final String TEXT_204 = "static ";
223
  protected final String TEXT_204 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(";
224
  protected final String TEXT_205 = "class Create";
224
  protected final String TEXT_205 = " feature, ";
225
  protected final String TEXT_206 = "NotationCommand extends ";
225
  protected final String TEXT_206 = " 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 HashMap();";
226
  protected final String TEXT_207 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create";
226
  protected final String TEXT_207 = NL;
227
  protected final String TEXT_208 = "NotationCommand(";
227
  protected final String TEXT_208 = "\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(";
228
  protected final String TEXT_209 = " parent, " + NL + "\t\t\t\t";
228
  protected final String TEXT_209 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
229
  protected final String TEXT_210 = " domainElement";
229
  protected final String TEXT_210 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);";
230
  protected final String TEXT_211 = ", ";
230
  protected final String TEXT_211 = NL;
231
  protected final String TEXT_212 = " constraint";
231
  protected final String TEXT_212 = "\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(";
232
  protected final String TEXT_213 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = ";
232
  protected final String TEXT_213 = ".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;
233
  protected final String TEXT_214 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t";
233
  protected final String TEXT_214 = NL;
234
  protected final String TEXT_215 = ".decorateView(createdNode);";
234
  protected final String TEXT_215 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
235
  protected final String TEXT_216 = NL + "\t\t\t";
235
  protected final String TEXT_216 = "static ";
236
  protected final String TEXT_217 = " bounds = ";
236
  protected final String TEXT_217 = "class Create";
237
  protected final String TEXT_218 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);";
237
  protected final String TEXT_218 = "NotationCommand extends ";
238
  protected final String TEXT_219 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, ";
238
  protected final String TEXT_219 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create";
239
  protected final String TEXT_220 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, ";
239
  protected final String TEXT_220 = "NotationCommand(";
240
  protected final String TEXT_221 = "));";
240
  protected final String TEXT_221 = " parent, " + NL + "\t\t\t\t";
241
  protected final String TEXT_222 = NL + "\t\t}" + NL + "\t}" + NL;
241
  protected final String TEXT_222 = " domainElement";
242
  protected final String TEXT_223 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
242
  protected final String TEXT_223 = ", ";
243
  protected final String TEXT_224 = "static ";
243
  protected final String TEXT_224 = " constraint";
244
  protected final String TEXT_225 = "class Create";
244
  protected final String TEXT_225 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = ";
245
  protected final String TEXT_226 = "Command extends ";
245
  protected final String TEXT_226 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t";
246
  protected final String TEXT_227 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create";
246
  protected final String TEXT_227 = ".decorateView(createdNode);";
247
  protected final String TEXT_228 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
247
  protected final String TEXT_228 = NL + "\t\t\t";
248
  protected final String TEXT_229 = "Command(";
248
  protected final String TEXT_229 = " bounds = ";
249
  protected final String TEXT_230 = " parent, ";
249
  protected final String TEXT_230 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);";
250
  protected final String TEXT_231 = " request";
250
  protected final String TEXT_231 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, ";
251
  protected final String TEXT_232 = ", ";
251
  protected final String TEXT_232 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, ";
252
  protected final String TEXT_233 = " constraint";
252
  protected final String TEXT_233 = "));";
253
  protected final String TEXT_234 = ") {" + NL + "\t\t\t";
253
  protected final String TEXT_234 = NL + "\t\t}" + NL + "\t}" + NL;
254
  protected final String TEXT_235 = " domainModelEditDomain = ";
254
  protected final String TEXT_235 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
255
  protected final String TEXT_236 = ".getEditingDomain(parent.getDiagram().getElement());";
255
  protected final String TEXT_236 = "static ";
256
  protected final String TEXT_237 = NL + "\t\t\t";
256
  protected final String TEXT_237 = "class Create";
257
  protected final String TEXT_238 = " createdDomainElement = ";
257
  protected final String TEXT_238 = "Command extends ";
258
  protected final String TEXT_239 = ".eINSTANCE.create(" + NL + "\t\t\t\t";
258
  protected final String TEXT_239 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create";
259
  protected final String TEXT_240 = ".eINSTANCE.get";
259
  protected final String TEXT_240 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
260
  protected final String TEXT_241 = "());";
260
  protected final String TEXT_241 = "Command(";
261
  protected final String TEXT_242 = NL + "\t\t\t";
261
  protected final String TEXT_242 = " parent, ";
262
  protected final String TEXT_243 = " createdDomainElement = ";
262
  protected final String TEXT_243 = " request";
263
  protected final String TEXT_244 = ".eINSTANCE.create";
263
  protected final String TEXT_244 = ", ";
264
  protected final String TEXT_245 = "();";
264
  protected final String TEXT_245 = " constraint";
265
  protected final String TEXT_246 = NL + "\t\t\t";
265
  protected final String TEXT_246 = ") {" + NL + "\t\t\t";
266
  protected final String TEXT_247 = NL + "\t\t\t";
266
  protected final String TEXT_247 = " domainModelEditDomain = ";
267
  protected final String TEXT_248 = ".";
267
  protected final String TEXT_248 = ".getEditingDomain(parent.getDiagram().getElement());";
268
  protected final String TEXT_249 = ".initializeElement(";
268
  protected final String TEXT_249 = NL + "\t\t\t";
269
  protected final String TEXT_250 = "(";
269
  protected final String TEXT_250 = " createdDomainElement = ";
270
  protected final String TEXT_251 = ") ";
270
  protected final String TEXT_251 = ".eINSTANCE.create(" + NL + "\t\t\t\t";
271
  protected final String TEXT_252 = "createdDomainElement);";
271
  protected final String TEXT_252 = ".eINSTANCE.get";
272
  protected final String TEXT_253 = NL + "\t\t\t";
272
  protected final String TEXT_253 = "());";
273
  protected final String TEXT_254 = " compoundCommand = new ";
273
  protected final String TEXT_254 = NL + "\t\t\t";
274
  protected final String TEXT_255 = "();" + NL + "\t\t\tcompoundCommand.append(";
274
  protected final String TEXT_255 = " createdDomainElement = ";
275
  protected final String TEXT_256 = ".create(domainModelEditDomain, ";
275
  protected final String TEXT_256 = ".eINSTANCE.create";
276
  protected final String TEXT_257 = ", " + NL + "\t\t\t\t";
276
  protected final String TEXT_257 = "();";
277
  protected final String TEXT_258 = ".eINSTANCE.get";
277
  protected final String TEXT_258 = NL + "\t\t\t";
278
  protected final String TEXT_259 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append(";
278
  protected final String TEXT_259 = NL + "\t\t\t";
279
  protected final String TEXT_260 = ".create(domainModelEditDomain, ";
279
  protected final String TEXT_260 = ".";
280
  protected final String TEXT_261 = ", " + NL + "\t\t\t\t";
280
  protected final String TEXT_261 = ".initializeElement(";
281
  protected final String TEXT_262 = ".eINSTANCE.get";
281
  protected final String TEXT_262 = "(";
282
  protected final String TEXT_263 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;";
282
  protected final String TEXT_263 = ") ";
283
  protected final String TEXT_264 = NL + "\t\t\tthis.domainModelAddCommand = ";
283
  protected final String TEXT_264 = "createdDomainElement);";
284
  protected final String TEXT_265 = ".create(domainModelEditDomain, ";
284
  protected final String TEXT_265 = NL + "\t\t\t";
285
  protected final String TEXT_266 = ", " + NL + "\t\t\t\t";
285
  protected final String TEXT_266 = " compoundCommand = new ";
286
  protected final String TEXT_267 = ".eINSTANCE.get";
286
  protected final String TEXT_267 = "();" + NL + "\t\t\tcompoundCommand.append(";
287
  protected final String TEXT_268 = "(), createdDomainElement);";
287
  protected final String TEXT_268 = ".create(domainModelEditDomain, ";
288
  protected final String TEXT_269 = NL + "\t\t\tthis.notationAddCommand = new Create";
288
  protected final String TEXT_269 = ", " + NL + "\t\t\t\t";
289
  protected final String TEXT_270 = "NotationCommand(parent, ";
289
  protected final String TEXT_270 = ".eINSTANCE.get";
290
  protected final String TEXT_271 = "(";
290
  protected final String TEXT_271 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append(";
291
  protected final String TEXT_272 = ") ";
291
  protected final String TEXT_272 = ".create(domainModelEditDomain, ";
292
  protected final String TEXT_273 = "createdDomainElement";
292
  protected final String TEXT_273 = ", " + NL + "\t\t\t\t";
293
  protected final String TEXT_274 = ", constraint";
293
  protected final String TEXT_274 = ".eINSTANCE.get";
294
  protected final String TEXT_275 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + 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}";
294
  protected final String TEXT_275 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;";
295
  protected final String TEXT_276 = NL + "}" + NL;
295
  protected final String TEXT_276 = NL + "\t\t\tthis.domainModelAddCommand = ";
296
  protected final String TEXT_277 = NL;
296
  protected final String TEXT_277 = ".create(domainModelEditDomain, ";
297
  protected final String TEXT_278 = ", " + NL + "\t\t\t\t";
298
  protected final String TEXT_279 = ".eINSTANCE.get";
299
  protected final String TEXT_280 = "(), createdDomainElement);";
300
  protected final String TEXT_281 = NL + "\t\t\tthis.notationAddCommand = new Create";
301
  protected final String TEXT_282 = "NotationCommand(parent, ";
302
  protected final String TEXT_283 = "(";
303
  protected final String TEXT_284 = ") ";
304
  protected final String TEXT_285 = "createdDomainElement";
305
  protected final String TEXT_286 = ", constraint";
306
  protected final String TEXT_287 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + 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}";
307
  protected final String TEXT_288 = NL + "}" + NL;
308
  protected final String TEXT_289 = NL;
297
309
298
  public String generate(Object argument)
310
  public String generate(Object argument)
299
  {
311
  {
Lines 428-579 Link Here
428
    stringBuffer.append(TEXT_34);
440
    stringBuffer.append(TEXT_34);
429
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.XYLayoutEditPolicy"));
441
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.XYLayoutEditPolicy"));
430
    stringBuffer.append(TEXT_35);
442
    stringBuffer.append(TEXT_35);
431
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest"));
443
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
432
    stringBuffer.append(TEXT_36);
444
    stringBuffer.append(TEXT_36);
433
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
445
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest"));
434
    stringBuffer.append(TEXT_37);
446
    stringBuffer.append(TEXT_37);
435
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
447
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
436
    stringBuffer.append(TEXT_38);
448
    stringBuffer.append(TEXT_38);
437
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
438
    stringBuffer.append(TEXT_39);
449
    stringBuffer.append(TEXT_39);
439
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
440
    stringBuffer.append(TEXT_40);
450
    stringBuffer.append(TEXT_40);
441
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
451
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
442
    stringBuffer.append(TEXT_41);
452
    stringBuffer.append(TEXT_41);
443
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
453
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
444
    stringBuffer.append(TEXT_42);
454
    stringBuffer.append(TEXT_42);
445
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
455
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
446
    stringBuffer.append(TEXT_43);
456
    stringBuffer.append(TEXT_43);
447
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
457
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
448
    stringBuffer.append(TEXT_44);
458
    stringBuffer.append(TEXT_44);
449
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
450
    stringBuffer.append(TEXT_45);
451
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
459
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
452
    stringBuffer.append(TEXT_46);
460
    stringBuffer.append(TEXT_45);
453
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
461
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
462
    stringBuffer.append(TEXT_46);
463
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
454
    stringBuffer.append(TEXT_47);
464
    stringBuffer.append(TEXT_47);
455
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
465
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
456
    stringBuffer.append(TEXT_48);
466
    stringBuffer.append(TEXT_48);
457
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
467
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
458
    stringBuffer.append(TEXT_49);
468
    stringBuffer.append(TEXT_49);
459
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
469
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
460
    stringBuffer.append(TEXT_50);
470
    stringBuffer.append(TEXT_50);
461
    } else {
471
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
462
    stringBuffer.append(TEXT_51);
472
    stringBuffer.append(TEXT_51);
463
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
473
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
464
    stringBuffer.append(TEXT_52);
474
    stringBuffer.append(TEXT_52);
465
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy"));
475
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
466
    stringBuffer.append(TEXT_53);
476
    stringBuffer.append(TEXT_53);
467
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
477
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
468
    stringBuffer.append(TEXT_54);
478
    stringBuffer.append(TEXT_54);
469
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
479
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
470
    stringBuffer.append(TEXT_55);
480
    stringBuffer.append(TEXT_55);
471
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
481
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
472
    stringBuffer.append(TEXT_56);
482
    stringBuffer.append(TEXT_56);
473
    }
483
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
474
    stringBuffer.append(TEXT_57);
484
    stringBuffer.append(TEXT_57);
475
    if (null != genDiagram.getPalette()) {
485
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
476
    stringBuffer.append(TEXT_58);
486
    stringBuffer.append(TEXT_58);
477
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
487
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
478
    stringBuffer.append(TEXT_59);
488
    stringBuffer.append(TEXT_59);
479
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
489
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
480
    stringBuffer.append(TEXT_60);
490
    stringBuffer.append(TEXT_60);
481
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
491
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
482
    stringBuffer.append(TEXT_61);
492
    stringBuffer.append(TEXT_61);
483
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
493
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
484
    stringBuffer.append(TEXT_62);
494
    stringBuffer.append(TEXT_62);
485
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
495
    } else {
486
    stringBuffer.append(TEXT_63);
496
    stringBuffer.append(TEXT_63);
497
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
498
    stringBuffer.append(TEXT_64);
499
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy"));
500
    stringBuffer.append(TEXT_65);
501
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
502
    stringBuffer.append(TEXT_66);
503
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
504
    stringBuffer.append(TEXT_67);
505
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
506
    stringBuffer.append(TEXT_68);
507
    }
508
    stringBuffer.append(TEXT_69);
509
    if (null != genDiagram.getPalette()) {
510
    stringBuffer.append(TEXT_70);
511
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
512
    stringBuffer.append(TEXT_71);
513
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
514
    stringBuffer.append(TEXT_72);
515
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
516
    stringBuffer.append(TEXT_73);
517
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
518
    stringBuffer.append(TEXT_74);
519
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
520
    stringBuffer.append(TEXT_75);
487
    
521
    
488
for(Iterator it = genCompartment.getChildNodes().iterator(); it.hasNext(); ) {
522
for(Iterator it = genCompartment.getChildNodes().iterator(); it.hasNext(); ) {
489
	GenChildNode next = (GenChildNode)it.next();
523
	GenChildNode next = (GenChildNode)it.next();
490
524
491
    stringBuffer.append(TEXT_64);
525
    stringBuffer.append(TEXT_76);
492
    stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName()));
526
    stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName()));
493
    stringBuffer.append(TEXT_65);
527
    stringBuffer.append(TEXT_77);
494
    stringBuffer.append(next.getDomainMetaClass().getName());
528
    stringBuffer.append(next.getDomainMetaClass().getName());
495
    stringBuffer.append(next.getVisualID());
529
    stringBuffer.append(next.getVisualID());
496
    stringBuffer.append(TEXT_66);
530
    stringBuffer.append(TEXT_78);
497
    if (!genCompartment.isListLayout()) {
531
    if (!genCompartment.isListLayout()) {
498
    stringBuffer.append(TEXT_67);
532
    stringBuffer.append(TEXT_79);
499
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
533
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
500
    stringBuffer.append(TEXT_68);
534
    stringBuffer.append(TEXT_80);
501
    }
535
    }
502
    stringBuffer.append(TEXT_69);
536
    stringBuffer.append(TEXT_81);
503
    
537
    
504
}
538
}
505
539
506
    stringBuffer.append(TEXT_70);
540
    stringBuffer.append(TEXT_82);
507
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
541
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
508
    stringBuffer.append(TEXT_71);
542
    stringBuffer.append(TEXT_83);
509
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
543
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
510
    stringBuffer.append(TEXT_72);
544
    stringBuffer.append(TEXT_84);
511
    }/*when there's palette*/
545
    }/*when there's palette*/
512
    stringBuffer.append(TEXT_73);
546
    stringBuffer.append(TEXT_85);
513
    stringBuffer.append(genCompartment.getTitle());
547
    stringBuffer.append(genCompartment.getTitle());
514
    stringBuffer.append(TEXT_74);
548
    stringBuffer.append(TEXT_86);
515
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
549
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
516
    stringBuffer.append(TEXT_75);
550
    stringBuffer.append(TEXT_87);
517
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LabeledContainer"));
551
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LabeledContainer"));
518
    stringBuffer.append(TEXT_76);
552
    stringBuffer.append(TEXT_88);
519
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LabeledContainer"));
553
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.LabeledContainer"));
520
    stringBuffer.append(TEXT_77);
554
    stringBuffer.append(TEXT_89);
521
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.StackLayout"));
555
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.StackLayout"));
522
    stringBuffer.append(TEXT_78);
556
    stringBuffer.append(TEXT_90);
523
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ScrollPane"));
557
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ScrollPane"));
524
    stringBuffer.append(TEXT_79);
558
    stringBuffer.append(TEXT_91);
525
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ScrollPane"));
559
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ScrollPane"));
526
    stringBuffer.append(TEXT_80);
560
    stringBuffer.append(TEXT_92);
527
    if (genCompartment.isListLayout()) {
561
    if (genCompartment.isListLayout()) {
528
    stringBuffer.append(TEXT_81);
562
    stringBuffer.append(TEXT_93);
529
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport"));
563
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport"));
530
    stringBuffer.append(TEXT_82);
564
    stringBuffer.append(TEXT_94);
531
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport"));
565
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport"));
532
    stringBuffer.append(TEXT_83);
566
    stringBuffer.append(TEXT_95);
533
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
567
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
534
    stringBuffer.append(TEXT_84);
568
    stringBuffer.append(TEXT_96);
535
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout"));
569
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout"));
536
    stringBuffer.append(TEXT_85);
570
    stringBuffer.append(TEXT_97);
537
    } else {
571
    } else {
538
    stringBuffer.append(TEXT_86);
572
    stringBuffer.append(TEXT_98);
539
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport"));
573
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Viewport"));
540
    stringBuffer.append(TEXT_87);
574
    stringBuffer.append(TEXT_99);
541
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformViewport"));
575
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformViewport"));
542
    stringBuffer.append(TEXT_88);
576
    stringBuffer.append(TEXT_100);
543
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayer"));
577
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayer"));
544
    stringBuffer.append(TEXT_89);
578
    stringBuffer.append(TEXT_101);
545
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout"));
579
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout"));
546
    stringBuffer.append(TEXT_90);
580
    stringBuffer.append(TEXT_102);
547
    }
581
    }
548
    stringBuffer.append(TEXT_91);
582
    stringBuffer.append(TEXT_103);
549
    stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()));
583
    stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()));
550
    stringBuffer.append(TEXT_92);
584
    stringBuffer.append(TEXT_104);
551
    stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()));
585
    stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()));
552
    stringBuffer.append(TEXT_93);
586
    stringBuffer.append(TEXT_105);
553
    stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()));
587
    stringBuffer.append(importManager.getImportedName(genHost.getDomainMetaClass().getQualifiedInterfaceName()));
554
    stringBuffer.append(TEXT_94);
588
    stringBuffer.append(TEXT_106);
555
    
589
    
556
{
590
{
557
String _getViewCode = "getDiagramNode()";
591
String _getViewCode = "getDiagramNode()";
558
String _getDiagramCode = _getViewCode + ".getDiagram()";
592
String _getDiagramCode = _getViewCode + ".getDiagram()";
559
boolean isListLayout = genCompartment.isListLayout();
593
boolean isListLayout = genCompartment.isListLayout();
560
594
561
    stringBuffer.append(TEXT_95);
595
    stringBuffer.append(TEXT_107);
562
    stringBuffer.append(TEXT_96);
596
    stringBuffer.append(TEXT_108);
563
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
597
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
564
    stringBuffer.append(TEXT_97);
598
    stringBuffer.append(TEXT_109);
565
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
599
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
566
    stringBuffer.append(TEXT_98);
600
    stringBuffer.append(TEXT_110);
567
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
601
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
568
    stringBuffer.append(TEXT_99);
602
    stringBuffer.append(TEXT_111);
569
    stringBuffer.append(_getDiagramCode);
603
    stringBuffer.append(_getDiagramCode);
570
    stringBuffer.append(TEXT_100);
604
    stringBuffer.append(TEXT_112);
571
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
605
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
572
    stringBuffer.append(TEXT_101);
606
    stringBuffer.append(TEXT_113);
573
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
607
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
574
    stringBuffer.append(TEXT_102);
608
    stringBuffer.append(TEXT_114);
575
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
609
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
576
    stringBuffer.append(TEXT_103);
610
    stringBuffer.append(TEXT_115);
577
    
611
    
578
boolean hasConstraintsInChildren = false;
612
boolean hasConstraintsInChildren = false;
579
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
613
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
Lines 588-606 Link Here
588
    
622
    
589
if (hasConstraintsInChildren) {
623
if (hasConstraintsInChildren) {
590
624
591
    stringBuffer.append(TEXT_104);
625
    stringBuffer.append(TEXT_116);
592
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
626
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
593
    stringBuffer.append(TEXT_105);
627
    stringBuffer.append(TEXT_117);
594
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
628
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
595
    stringBuffer.append(TEXT_106);
629
    stringBuffer.append(TEXT_118);
596
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
630
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
597
    stringBuffer.append(TEXT_107);
631
    stringBuffer.append(TEXT_119);
598
    
632
    
599
}
633
}
600
634
601
    stringBuffer.append(TEXT_108);
635
    stringBuffer.append(TEXT_120);
602
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
636
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
603
    stringBuffer.append(TEXT_109);
637
    stringBuffer.append(TEXT_121);
604
    
638
    
605
{
639
{
606
	boolean hasDeclaredFilter = false;
640
	boolean hasDeclaredFilter = false;
Lines 619-643 Link Here
619
		if (!hasDeclaredFilter) {
653
		if (!hasDeclaredFilter) {
620
			hasDeclaredFilter = true;
654
			hasDeclaredFilter = true;
621
655
622
    stringBuffer.append(TEXT_110);
656
    stringBuffer.append(TEXT_122);
623
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
657
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
624
    stringBuffer.append(TEXT_111);
658
    stringBuffer.append(TEXT_123);
625
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
659
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
626
    stringBuffer.append(TEXT_112);
660
    stringBuffer.append(TEXT_124);
627
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
661
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
628
    stringBuffer.append(TEXT_113);
662
    stringBuffer.append(TEXT_125);
629
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
663
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
630
    stringBuffer.append(TEXT_114);
664
    stringBuffer.append(TEXT_126);
631
    
665
    
632
		} else {
666
		} else {
633
667
634
    stringBuffer.append(TEXT_115);
668
    stringBuffer.append(TEXT_127);
635
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
669
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
636
    stringBuffer.append(TEXT_116);
670
    stringBuffer.append(TEXT_128);
637
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
671
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
638
    stringBuffer.append(TEXT_117);
672
    stringBuffer.append(TEXT_129);
639
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
673
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
640
    stringBuffer.append(TEXT_118);
674
    stringBuffer.append(TEXT_130);
641
    
675
    
642
		}
676
		}
643
	}	//for
677
	}	//for
Lines 645-666 Link Here
645
    
679
    
646
	if (hasDeclaredFilter) {
680
	if (hasDeclaredFilter) {
647
681
648
    stringBuffer.append(TEXT_119);
682
    stringBuffer.append(TEXT_131);
649
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
683
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
650
    stringBuffer.append(TEXT_120);
684
    stringBuffer.append(TEXT_132);
651
    stringBuffer.append(_getViewCode);
685
    stringBuffer.append(_getViewCode);
652
    stringBuffer.append(TEXT_121);
686
    stringBuffer.append(TEXT_133);
653
    
687
    
654
	} else {
688
	} else {
655
		hasDeclaredFilter = true;
689
		hasDeclaredFilter = true;
656
690
657
    stringBuffer.append(TEXT_122);
691
    stringBuffer.append(TEXT_134);
658
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
692
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
659
    stringBuffer.append(TEXT_123);
693
    stringBuffer.append(TEXT_135);
660
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
694
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
661
    stringBuffer.append(TEXT_124);
695
    stringBuffer.append(TEXT_136);
662
    stringBuffer.append(_getViewCode);
696
    stringBuffer.append(_getViewCode);
663
    stringBuffer.append(TEXT_125);
697
    stringBuffer.append(TEXT_137);
664
    
698
    
665
	}
699
	}
666
700
Lines 669-705 Link Here
669
		if (hasDeclaredFilter) {
703
		if (hasDeclaredFilter) {
670
			hasDeclaredFilter = true;
704
			hasDeclaredFilter = true;
671
705
672
    stringBuffer.append(TEXT_126);
706
    stringBuffer.append(TEXT_138);
673
    
707
    
674
		} else {
708
		} else {
675
709
676
    stringBuffer.append(TEXT_127);
710
    stringBuffer.append(TEXT_139);
677
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
711
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
678
    stringBuffer.append(TEXT_128);
712
    stringBuffer.append(TEXT_140);
679
    
713
    
680
		}
714
		}
681
	}
715
	}
682
	if (!hasDeclaredFilter) {
716
	if (!hasDeclaredFilter) {
683
717
684
    stringBuffer.append(TEXT_129);
718
    stringBuffer.append(TEXT_141);
685
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
719
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
686
    stringBuffer.append(TEXT_130);
720
    stringBuffer.append(TEXT_142);
687
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
721
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
688
    stringBuffer.append(TEXT_131);
722
    stringBuffer.append(TEXT_143);
689
    
723
    
690
	}
724
	}
691
725
692
    stringBuffer.append(TEXT_132);
726
    stringBuffer.append(TEXT_144);
693
    
727
    
694
}	//local declaration of hasDeclaredFilter
728
}	//local declaration of hasDeclaredFilter
695
729
696
    stringBuffer.append(TEXT_133);
730
    stringBuffer.append(TEXT_145);
697
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
731
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
698
    stringBuffer.append(TEXT_134);
732
    stringBuffer.append(TEXT_146);
699
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
733
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
700
    stringBuffer.append(TEXT_135);
734
    stringBuffer.append(TEXT_147);
701
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
735
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
702
    stringBuffer.append(TEXT_136);
736
    stringBuffer.append(TEXT_148);
703
    
737
    
704
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
738
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
705
	GenNode nextNode = (GenNode) it.next();
739
	GenNode nextNode = (GenNode) it.next();
Lines 709-747 Link Here
709
	}
743
	}
710
	String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName());
744
	String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName());
711
745
712
    stringBuffer.append(TEXT_137);
746
    stringBuffer.append(TEXT_149);
713
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
747
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
714
    stringBuffer.append(TEXT_138);
748
    stringBuffer.append(TEXT_150);
715
    stringBuffer.append(childNodeInterfaceName);
749
    stringBuffer.append(childNodeInterfaceName);
716
    stringBuffer.append(TEXT_139);
750
    stringBuffer.append(TEXT_151);
717
    stringBuffer.append(nextNode.getDomainMetaClass().getName());
751
    stringBuffer.append(nextNode.getDomainMetaClass().getName());
718
    stringBuffer.append(nextNode.getVisualID());
752
    stringBuffer.append(nextNode.getVisualID());
719
    stringBuffer.append(TEXT_140);
753
    stringBuffer.append(TEXT_152);
720
    if (!isListLayout) {
754
    if (!isListLayout) {
721
    stringBuffer.append(TEXT_141);
755
    stringBuffer.append(TEXT_153);
722
    }
756
    }
723
    stringBuffer.append(TEXT_142);
757
    stringBuffer.append(TEXT_154);
724
    
758
    
725
}
759
}
726
760
727
    stringBuffer.append(TEXT_143);
761
    stringBuffer.append(TEXT_155);
728
    stringBuffer.append(importManager.getImportedName("java.util.List"));
762
    stringBuffer.append(importManager.getImportedName("java.util.List"));
729
    stringBuffer.append(TEXT_144);
763
    stringBuffer.append(TEXT_156);
730
    stringBuffer.append(TEXT_145);
764
    stringBuffer.append(TEXT_157);
731
    
765
    
732
if (childNodes.size() == 0) {
766
if (childNodes.size() == 0) {
733
767
734
    stringBuffer.append(TEXT_146);
768
    stringBuffer.append(TEXT_158);
735
    stringBuffer.append(importManager.getImportedName("java.util.Collections"));
769
    stringBuffer.append(importManager.getImportedName("java.util.Collections"));
736
    stringBuffer.append(TEXT_147);
770
    stringBuffer.append(TEXT_159);
737
    
771
    
738
} else {
772
} else {
739
773
740
    stringBuffer.append(TEXT_148);
774
    stringBuffer.append(TEXT_160);
741
    stringBuffer.append(importManager.getImportedName("java.util.List"));
775
    stringBuffer.append(importManager.getImportedName("java.util.List"));
742
    stringBuffer.append(TEXT_149);
776
    stringBuffer.append(TEXT_161);
743
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
777
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
744
    stringBuffer.append(TEXT_150);
778
    stringBuffer.append(TEXT_162);
745
    
779
    
746
	Map genFeature2genNodeMap = new LinkedHashMap();
780
	Map genFeature2genNodeMap = new LinkedHashMap();
747
	for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) {
781
	for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) {
Lines 759-773 Link Here
759
	Set entrySet = genFeature2genNodeMap.entrySet();
793
	Set entrySet = genFeature2genNodeMap.entrySet();
760
	if (entrySet.size() > 0) {
794
	if (entrySet.size() > 0) {
761
795
762
    stringBuffer.append(TEXT_151);
796
    stringBuffer.append(TEXT_163);
763
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
797
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
764
    stringBuffer.append(TEXT_152);
798
    stringBuffer.append(TEXT_164);
765
    stringBuffer.append(_getViewCode);
799
    stringBuffer.append(_getViewCode);
766
    stringBuffer.append(TEXT_153);
800
    stringBuffer.append(TEXT_165);
767
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
801
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
768
    stringBuffer.append(TEXT_154);
802
    stringBuffer.append(TEXT_166);
769
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
803
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
770
    stringBuffer.append(TEXT_155);
804
    stringBuffer.append(TEXT_167);
771
    
805
    
772
	}
806
	}
773
	for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
807
	for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
Lines 776-900 Link Here
776
		Collection genNodesCollection = (Collection) nextEntry.getValue();
810
		Collection genNodesCollection = (Collection) nextEntry.getValue();
777
		if (childMetaFeature.isListType()) {
811
		if (childMetaFeature.isListType()) {
778
812
779
    stringBuffer.append(TEXT_156);
813
    stringBuffer.append(TEXT_168);
780
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
814
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
781
    stringBuffer.append(TEXT_157);
815
    stringBuffer.append(TEXT_169);
782
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true);
816
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true);
783
    stringBuffer.append(TEXT_158);
817
    stringBuffer.append(TEXT_170);
784
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
818
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
785
    stringBuffer.append(TEXT_159);
819
    stringBuffer.append(TEXT_171);
786
    
820
    
787
		} else {
821
		} else {
788
822
789
    stringBuffer.append(TEXT_160);
823
    stringBuffer.append(TEXT_172);
790
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
824
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
791
    stringBuffer.append(TEXT_161);
825
    stringBuffer.append(TEXT_173);
792
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false);
826
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false);
793
    stringBuffer.append(TEXT_162);
827
    stringBuffer.append(TEXT_174);
794
    
828
    
795
	}
829
	}
796
830
797
    stringBuffer.append(TEXT_163);
831
    stringBuffer.append(TEXT_175);
798
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
832
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
799
    stringBuffer.append(TEXT_164);
833
    stringBuffer.append(TEXT_176);
800
    
834
    
801
	boolean generateSwitch = genNodesCollection.size() != 1;
835
	boolean generateSwitch = genNodesCollection.size() != 1;
802
	if (generateSwitch) {
836
	if (generateSwitch) {
803
837
804
    stringBuffer.append(TEXT_165);
838
    stringBuffer.append(TEXT_177);
805
    
839
    
806
	}
840
	}
807
	for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
841
	for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
808
		GenNode nextNode = (GenNode) genNodesIterator.next();
842
		GenNode nextNode = (GenNode) genNodesIterator.next();
809
		if (generateSwitch) {
843
		if (generateSwitch) {
810
844
811
    stringBuffer.append(TEXT_166);
845
    stringBuffer.append(TEXT_178);
812
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
846
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
813
    stringBuffer.append(TEXT_167);
847
    stringBuffer.append(TEXT_179);
814
    
848
    
815
		} else {
849
		} else {
816
850
817
    stringBuffer.append(TEXT_168);
851
    stringBuffer.append(TEXT_180);
818
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
852
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
819
    stringBuffer.append(TEXT_169);
853
    stringBuffer.append(TEXT_181);
820
    
854
    
821
		}
855
		}
822
856
823
    stringBuffer.append(TEXT_170);
857
    stringBuffer.append(TEXT_182);
824
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
858
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
825
    stringBuffer.append(TEXT_171);
859
    stringBuffer.append(TEXT_183);
826
    
860
    
827
		if (generateSwitch) {
861
		if (generateSwitch) {
828
862
829
    stringBuffer.append(TEXT_172);
863
    stringBuffer.append(TEXT_184);
830
    
864
    
831
		} else {
865
		} else {
832
866
833
    stringBuffer.append(TEXT_173);
867
    stringBuffer.append(TEXT_185);
834
    
868
    
835
		}
869
		}
836
	}
870
	}
837
	if (generateSwitch) {
871
	if (generateSwitch) {
838
872
839
    stringBuffer.append(TEXT_174);
873
    stringBuffer.append(TEXT_186);
840
    
874
    
841
	}
875
	}
842
	if (childMetaFeature.isListType()) {
876
	if (childMetaFeature.isListType()) {
843
877
844
    stringBuffer.append(TEXT_175);
878
    stringBuffer.append(TEXT_187);
845
    
879
    
846
	}
880
	}
847
}
881
}
848
882
849
    stringBuffer.append(TEXT_176);
883
    stringBuffer.append(TEXT_188);
850
    
884
    
851
}
885
}
852
886
853
    stringBuffer.append(TEXT_177);
887
    stringBuffer.append(TEXT_189);
854
    stringBuffer.append(genDiagram.isSynchronized());
888
    stringBuffer.append(genDiagram.isSynchronized());
855
    stringBuffer.append(TEXT_178);
889
    stringBuffer.append(TEXT_190);
856
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
890
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
857
    stringBuffer.append(TEXT_179);
891
    stringBuffer.append(TEXT_191);
858
    stringBuffer.append(genDiagram.isSynchronized());
892
    stringBuffer.append(genDiagram.isSynchronized());
859
    stringBuffer.append(TEXT_180);
893
    stringBuffer.append(TEXT_192);
860
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
894
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
861
    stringBuffer.append(TEXT_181);
895
    stringBuffer.append(TEXT_193);
862
    stringBuffer.append(_getViewCode);
896
    stringBuffer.append(_getViewCode);
863
    stringBuffer.append(TEXT_182);
897
    stringBuffer.append(TEXT_194);
864
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
898
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
865
    stringBuffer.append(TEXT_183);
899
    stringBuffer.append(TEXT_195);
866
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
900
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
867
    stringBuffer.append(TEXT_184);
901
    stringBuffer.append(TEXT_196);
868
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
902
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
869
    stringBuffer.append(TEXT_185);
903
    stringBuffer.append(TEXT_197);
870
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
904
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
871
    stringBuffer.append(TEXT_186);
905
    stringBuffer.append(TEXT_198);
872
    stringBuffer.append(_getDiagramCode);
906
    stringBuffer.append(_getDiagramCode);
873
    stringBuffer.append(TEXT_187);
907
    stringBuffer.append(TEXT_199);
874
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
908
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
875
    stringBuffer.append(TEXT_188);
909
    stringBuffer.append(TEXT_200);
876
    
910
    
877
}
911
}
878
912
879
    stringBuffer.append(TEXT_189);
913
    stringBuffer.append(TEXT_201);
880
    stringBuffer.append(TEXT_190);
914
    stringBuffer.append(TEXT_202);
881
    stringBuffer.append(TEXT_191);
915
    stringBuffer.append(TEXT_203);
882
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
916
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
883
    stringBuffer.append(TEXT_192);
917
    stringBuffer.append(TEXT_204);
884
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
918
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
885
    stringBuffer.append(TEXT_193);
919
    stringBuffer.append(TEXT_205);
886
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
920
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
887
    stringBuffer.append(TEXT_194);
921
    stringBuffer.append(TEXT_206);
888
    stringBuffer.append(TEXT_195);
922
    stringBuffer.append(TEXT_207);
889
    stringBuffer.append(TEXT_196);
923
    stringBuffer.append(TEXT_208);
890
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
924
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
891
    stringBuffer.append(TEXT_197);
925
    stringBuffer.append(TEXT_209);
892
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
926
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
893
    stringBuffer.append(TEXT_198);
927
    stringBuffer.append(TEXT_210);
894
    stringBuffer.append(TEXT_199);
928
    stringBuffer.append(TEXT_211);
895
    stringBuffer.append(TEXT_200);
929
    stringBuffer.append(TEXT_212);
896
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
930
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
897
    stringBuffer.append(TEXT_201);
931
    stringBuffer.append(TEXT_213);
898
    
932
    
899
for(Iterator it = genCompartment.getChildNodes().iterator(); it.hasNext(); ) {
933
for(Iterator it = genCompartment.getChildNodes().iterator(); it.hasNext(); ) {
900
	GenChildNode next = (GenChildNode)it.next();
934
	GenChildNode next = (GenChildNode)it.next();
Lines 902-943 Link Here
902
	boolean isListLayout = genCompartment.isListLayout();
936
	boolean isListLayout = genCompartment.isListLayout();
903
	String resolvedSemanticElement = "resolveSemanticElement()";
937
	String resolvedSemanticElement = "resolveSemanticElement()";
904
938
905
    stringBuffer.append(TEXT_202);
939
    stringBuffer.append(TEXT_214);
906
    stringBuffer.append(TEXT_203);
940
    stringBuffer.append(TEXT_215);
907
    if (isStatic) {
941
    if (isStatic) {
908
    stringBuffer.append(TEXT_204);
942
    stringBuffer.append(TEXT_216);
909
    }
943
    }
910
    stringBuffer.append(TEXT_205);
944
    stringBuffer.append(TEXT_217);
911
    stringBuffer.append(next.getDomainMetaClass().getName());
945
    stringBuffer.append(next.getDomainMetaClass().getName());
912
    stringBuffer.append(next.getVisualID());
946
    stringBuffer.append(next.getVisualID());
913
    stringBuffer.append(TEXT_206);
947
    stringBuffer.append(TEXT_218);
914
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand"));
948
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand"));
915
    stringBuffer.append(TEXT_207);
949
    stringBuffer.append(TEXT_219);
916
    stringBuffer.append(next.getDomainMetaClass().getName());
950
    stringBuffer.append(next.getDomainMetaClass().getName());
917
    stringBuffer.append(next.getVisualID());
951
    stringBuffer.append(next.getVisualID());
918
    stringBuffer.append(TEXT_208);
952
    stringBuffer.append(TEXT_220);
919
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
953
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
920
    stringBuffer.append(TEXT_209);
954
    stringBuffer.append(TEXT_221);
921
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
955
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
922
    stringBuffer.append(TEXT_210);
956
    stringBuffer.append(TEXT_222);
923
    if (!isListLayout) {
957
    if (!isListLayout) {
924
    stringBuffer.append(TEXT_211);
958
    stringBuffer.append(TEXT_223);
925
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
959
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
926
    stringBuffer.append(TEXT_212);
960
    stringBuffer.append(TEXT_224);
927
    }
961
    }
928
    stringBuffer.append(TEXT_213);
962
    stringBuffer.append(TEXT_225);
929
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
963
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
930
    stringBuffer.append(TEXT_214);
964
    stringBuffer.append(TEXT_226);
931
    stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName()));
965
    stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName()));
932
    stringBuffer.append(TEXT_215);
966
    stringBuffer.append(TEXT_227);
933
    
967
    
934
	if (!isListLayout) {
968
	if (!isListLayout) {
935
969
936
    stringBuffer.append(TEXT_216);
970
    stringBuffer.append(TEXT_228);
937
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
971
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
938
    stringBuffer.append(TEXT_217);
972
    stringBuffer.append(TEXT_229);
939
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
973
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
940
    stringBuffer.append(TEXT_218);
974
    stringBuffer.append(TEXT_230);
941
    
975
    
942
		int defaultWidth = 40;
976
		int defaultWidth = 40;
943
		int defaultHeight = 40;
977
		int defaultHeight = 40;
Lines 947-1098 Link Here
947
			defaultHeight = defSizeAttrs.getHeight();
981
			defaultHeight = defSizeAttrs.getHeight();
948
		}
982
		}
949
983
950
    stringBuffer.append(TEXT_219);
984
    stringBuffer.append(TEXT_231);
951
    stringBuffer.append(defaultWidth);
985
    stringBuffer.append(defaultWidth);
952
    stringBuffer.append(TEXT_220);
986
    stringBuffer.append(TEXT_232);
953
    stringBuffer.append(defaultHeight);
987
    stringBuffer.append(defaultHeight);
954
    stringBuffer.append(TEXT_221);
988
    stringBuffer.append(TEXT_233);
955
    
989
    
956
	}
990
	}
957
991
958
    stringBuffer.append(TEXT_222);
992
    stringBuffer.append(TEXT_234);
959
    
993
    
960
if (genDiagram.getPalette() != null) {
994
if (genDiagram.getPalette() != null) {
961
995
962
    stringBuffer.append(TEXT_223);
996
    stringBuffer.append(TEXT_235);
963
    if (isStatic) {
997
    if (isStatic) {
964
    stringBuffer.append(TEXT_224);
998
    stringBuffer.append(TEXT_236);
965
    }
999
    }
966
    stringBuffer.append(TEXT_225);
1000
    stringBuffer.append(TEXT_237);
967
    stringBuffer.append(next.getDomainMetaClass().getName());
1001
    stringBuffer.append(next.getDomainMetaClass().getName());
968
    stringBuffer.append(next.getVisualID());
1002
    stringBuffer.append(next.getVisualID());
969
    stringBuffer.append(TEXT_226);
1003
    stringBuffer.append(TEXT_238);
970
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
1004
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
971
    stringBuffer.append(TEXT_227);
1005
    stringBuffer.append(TEXT_239);
972
    stringBuffer.append(next.getDomainMetaClass().getName());
1006
    stringBuffer.append(next.getDomainMetaClass().getName());
973
    stringBuffer.append(next.getVisualID());
1007
    stringBuffer.append(next.getVisualID());
974
    stringBuffer.append(TEXT_228);
1008
    stringBuffer.append(TEXT_240);
975
    stringBuffer.append(next.getDomainMetaClass().getName());
1009
    stringBuffer.append(next.getDomainMetaClass().getName());
976
    stringBuffer.append(next.getVisualID());
1010
    stringBuffer.append(next.getVisualID());
977
    stringBuffer.append(TEXT_229);
1011
    stringBuffer.append(TEXT_241);
978
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1012
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
979
    stringBuffer.append(TEXT_230);
1013
    stringBuffer.append(TEXT_242);
980
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
1014
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
981
    stringBuffer.append(TEXT_231);
1015
    stringBuffer.append(TEXT_243);
982
    if (!isListLayout) {
1016
    if (!isListLayout) {
983
    stringBuffer.append(TEXT_232);
1017
    stringBuffer.append(TEXT_244);
984
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1018
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
985
    stringBuffer.append(TEXT_233);
1019
    stringBuffer.append(TEXT_245);
986
    }
1020
    }
987
    stringBuffer.append(TEXT_234);
1021
    stringBuffer.append(TEXT_246);
988
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1022
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
989
    stringBuffer.append(TEXT_235);
1023
    stringBuffer.append(TEXT_247);
990
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1024
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
991
    stringBuffer.append(TEXT_236);
1025
    stringBuffer.append(TEXT_248);
992
    
1026
    
993
	if (next.getDomainMetaClass().isMapEntry()) {
1027
	if (next.getDomainMetaClass().isMapEntry()) {
994
	/*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/
1028
	/*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/
995
1029
996
    stringBuffer.append(TEXT_237);
1030
    stringBuffer.append(TEXT_249);
997
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1031
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
998
    stringBuffer.append(TEXT_238);
1032
    stringBuffer.append(TEXT_250);
999
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
1033
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
1000
    stringBuffer.append(TEXT_239);
1034
    stringBuffer.append(TEXT_251);
1001
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName()));
1035
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName()));
1002
    stringBuffer.append(TEXT_240);
1036
    stringBuffer.append(TEXT_252);
1003
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
1037
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
1004
    stringBuffer.append(TEXT_241);
1038
    stringBuffer.append(TEXT_253);
1005
    
1039
    
1006
	} else {
1040
	} else {
1007
1041
1008
    stringBuffer.append(TEXT_242);
1042
    stringBuffer.append(TEXT_254);
1009
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName()));
1043
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName()));
1010
    stringBuffer.append(TEXT_243);
1044
    stringBuffer.append(TEXT_255);
1011
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
1045
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
1012
    stringBuffer.append(TEXT_244);
1046
    stringBuffer.append(TEXT_256);
1013
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
1047
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
1014
    stringBuffer.append(TEXT_245);
1048
    stringBuffer.append(TEXT_257);
1015
    
1049
    
1016
	}
1050
	}
1017
1051
1018
    stringBuffer.append(TEXT_246);
1052
    stringBuffer.append(TEXT_258);
1019
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
1053
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
1020
    stringBuffer.append(TEXT_247);
1054
    stringBuffer.append(TEXT_259);
1021
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
1055
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
1022
    stringBuffer.append(TEXT_248);
1056
    stringBuffer.append(TEXT_260);
1023
    stringBuffer.append(next.getUniqueIdentifier());
1057
    stringBuffer.append(next.getUniqueIdentifier());
1024
    stringBuffer.append(TEXT_249);
1058
    stringBuffer.append(TEXT_261);
1025
    if (next.getDomainMetaClass().isExternalInterface()) {
1059
    if (next.getDomainMetaClass().isExternalInterface()) {
1026
    stringBuffer.append(TEXT_250);
1060
    stringBuffer.append(TEXT_262);
1027
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1061
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1028
    stringBuffer.append(TEXT_251);
1062
    stringBuffer.append(TEXT_263);
1029
    }
1063
    }
1030
    stringBuffer.append(TEXT_252);
1064
    stringBuffer.append(TEXT_264);
1031
    
1065
    
1032
	TypeModelFacet facet = next.getModelFacet();
1066
	TypeModelFacet facet = next.getModelFacet();
1033
	GenFeature childFeature = facet.getChildMetaFeature();
1067
	GenFeature childFeature = facet.getChildMetaFeature();
1034
	GenFeature containmentFeature = facet.getContainmentMetaFeature();
1068
	GenFeature containmentFeature = facet.getContainmentMetaFeature();
1035
	if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
1069
	if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
1036
1070
1037
    stringBuffer.append(TEXT_253);
1071
    stringBuffer.append(TEXT_265);
1038
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1072
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1039
    stringBuffer.append(TEXT_254);
1073
    stringBuffer.append(TEXT_266);
1040
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1074
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1041
    stringBuffer.append(TEXT_255);
1075
    stringBuffer.append(TEXT_267);
1042
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
1076
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
1043
    stringBuffer.append(TEXT_256);
1077
    stringBuffer.append(TEXT_268);
1044
    stringBuffer.append(resolvedSemanticElement);
1078
    stringBuffer.append(resolvedSemanticElement);
1045
    stringBuffer.append(TEXT_257);
1079
    stringBuffer.append(TEXT_269);
1046
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1080
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1047
    stringBuffer.append(TEXT_258);
1081
    stringBuffer.append(TEXT_270);
1048
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1082
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1049
    stringBuffer.append(TEXT_259);
1083
    stringBuffer.append(TEXT_271);
1050
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
1084
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
1051
    stringBuffer.append(TEXT_260);
1085
    stringBuffer.append(TEXT_272);
1052
    stringBuffer.append(resolvedSemanticElement);
1086
    stringBuffer.append(resolvedSemanticElement);
1053
    stringBuffer.append(TEXT_261);
1087
    stringBuffer.append(TEXT_273);
1054
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1088
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1055
    stringBuffer.append(TEXT_262);
1089
    stringBuffer.append(TEXT_274);
1056
    stringBuffer.append(childFeature.getFeatureAccessorName());
1090
    stringBuffer.append(childFeature.getFeatureAccessorName());
1057
    stringBuffer.append(TEXT_263);
1091
    stringBuffer.append(TEXT_275);
1058
    
1092
    
1059
	} else {
1093
	} else {
1060
1094
1061
    stringBuffer.append(TEXT_264);
1095
    stringBuffer.append(TEXT_276);
1062
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
1096
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
1063
    stringBuffer.append(TEXT_265);
1097
    stringBuffer.append(TEXT_277);
1064
    stringBuffer.append(resolvedSemanticElement);
1098
    stringBuffer.append(resolvedSemanticElement);
1065
    stringBuffer.append(TEXT_266);
1099
    stringBuffer.append(TEXT_278);
1066
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1100
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1067
    stringBuffer.append(TEXT_267);
1101
    stringBuffer.append(TEXT_279);
1068
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1102
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1069
    stringBuffer.append(TEXT_268);
1103
    stringBuffer.append(TEXT_280);
1070
    
1104
    
1071
	}
1105
	}
1072
1106
1073
    stringBuffer.append(TEXT_269);
1107
    stringBuffer.append(TEXT_281);
1074
    stringBuffer.append(next.getDomainMetaClass().getName());
1108
    stringBuffer.append(next.getDomainMetaClass().getName());
1075
    stringBuffer.append(next.getVisualID());
1109
    stringBuffer.append(next.getVisualID());
1076
    stringBuffer.append(TEXT_270);
1110
    stringBuffer.append(TEXT_282);
1077
    if (next.getDomainMetaClass().isExternalInterface()) {
1111
    if (next.getDomainMetaClass().isExternalInterface()) {
1078
    stringBuffer.append(TEXT_271);
1112
    stringBuffer.append(TEXT_283);
1079
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1113
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1080
    stringBuffer.append(TEXT_272);
1114
    stringBuffer.append(TEXT_284);
1081
    }
1115
    }
1082
    stringBuffer.append(TEXT_273);
1116
    stringBuffer.append(TEXT_285);
1083
    if(!isListLayout) {
1117
    if(!isListLayout) {
1084
    stringBuffer.append(TEXT_274);
1118
    stringBuffer.append(TEXT_286);
1085
    }
1119
    }
1086
    stringBuffer.append(TEXT_275);
1120
    stringBuffer.append(TEXT_287);
1087
    
1121
    
1088
}
1122
}
1089
1123
1090
    
1124
    
1091
}
1125
}
1092
1126
1093
    stringBuffer.append(TEXT_276);
1127
    stringBuffer.append(TEXT_288);
1094
    importManager.emitSortedImports();
1128
    importManager.emitSortedImports();
1095
    stringBuffer.append(TEXT_277);
1129
    stringBuffer.append(TEXT_289);
1096
    return stringBuffer.toString();
1130
    return stringBuffer.toString();
1097
  }
1131
  }
1098
}
1132
}
(-)src-templates/org/eclipse/gmf/codegen/templates/lite/parts/DiagramEditPartGenerator.java (-762 / +820 lines)
Lines 66-312 Link Here
66
  protected final String TEXT_47 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
66
  protected final String TEXT_47 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
67
  protected final String TEXT_48 = "(";
67
  protected final String TEXT_48 = "(";
68
  protected final String TEXT_49 = ".getEditingDomain(getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
68
  protected final String TEXT_49 = ".getEditingDomain(getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
69
  protected final String TEXT_50 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(final ChangeBoundsRequest request, EditPart child, Object constraint) {" + NL + "\t\t\t\tfinal Node node = (Node) child.getModel();" + NL + "\t\t\t\t";
69
  protected final String TEXT_50 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected ";
70
  protected final String TEXT_51 = " emfCommand = new ";
70
  protected final String TEXT_51 = " createChangeConstraintCommand(final ";
71
  protected final String TEXT_52 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate Point moveDelta;" + NL + "\t\t\t\t\tprivate Dimension resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof Bounds == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t";
71
  protected final String TEXT_52 = " request, final ";
72
  protected final String TEXT_53 = " original = new ";
72
  protected final String TEXT_53 = " child, Object constraint) {";
73
  protected final String TEXT_54 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t";
73
  protected final String TEXT_54 = NL;
74
  protected final String TEXT_55 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(Point move, Dimension resize) {" + NL + "\t\t\t\t\t\tBounds bounds = (Bounds) node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new ";
74
  protected final String TEXT_55 = "\t\t\t\tfinal ";
75
  protected final String TEXT_56 = "(";
75
  protected final String TEXT_56 = " node = (";
76
  protected final String TEXT_57 = ".getEditingDomain(getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(EditPart child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn UnexecutableCommand.INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();";
76
  protected final String TEXT_57 = ") child.getModel();" + NL + "\t\t\t\t";
77
  protected final String TEXT_58 = NL + "\t\tinstallLinkNotationModelRefresher();";
77
  protected final String TEXT_58 = " emfCommand = new ";
78
  protected final String TEXT_59 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {" + NL + "\t\tIFigure f = new FreeformLayer();" + NL + "\t\tf.setBorder(new MarginBorder(5));" + NL + "\t\tf.setLayoutManager(new FreeformLayout());" + NL + "\t\treturn f;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {" + NL + "\t\tif (";
78
  protected final String TEXT_59 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate ";
79
  protected final String TEXT_60 = ".class == key) {" + NL + "\t\t\treturn new ";
79
  protected final String TEXT_60 = " moveDelta;" + NL + "\t\t\t\t\tprivate ";
80
  protected final String TEXT_61 = "(this);" + NL + "\t\t}";
80
  protected final String TEXT_61 = " resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof ";
81
  protected final String TEXT_62 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn getDiagram().getVisibleChildren();" + NL + "\t}" + NL;
81
  protected final String TEXT_62 = " == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t";
82
  protected final String TEXT_63 = NL;
82
  protected final String TEXT_63 = " bounds = (";
83
  protected final String TEXT_64 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
83
  protected final String TEXT_64 = ") node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t";
84
  protected final String TEXT_65 = "static ";
84
  protected final String TEXT_65 = " original = new ";
85
  protected final String TEXT_66 = "class Create";
85
  protected final String TEXT_66 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t";
86
  protected final String TEXT_67 = "NotationCommand extends ";
86
  protected final String TEXT_67 = " referenceFigure = ((";
87
  protected final String TEXT_68 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create";
87
  protected final String TEXT_68 = ")child).getFigure();" + NL + "\t\t\t\t\t\treferenceFigure.translateToAbsolute(original);" + NL + "\t\t\t\t\t\t";
88
  protected final String TEXT_69 = "NotationCommand(";
88
  protected final String TEXT_69 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(transformed);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(";
89
  protected final String TEXT_70 = " parent, " + NL + "\t\t\t\t";
89
  protected final String TEXT_70 = " move, ";
90
  protected final String TEXT_71 = " domainElement";
90
  protected final String TEXT_71 = " resize) {" + NL + "\t\t\t\t\t\t";
91
  protected final String TEXT_72 = ", ";
91
  protected final String TEXT_72 = " bounds = (";
92
  protected final String TEXT_73 = " constraint";
92
  protected final String TEXT_73 = ") node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new ";
93
  protected final String TEXT_74 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = ";
93
  protected final String TEXT_74 = "(";
94
  protected final String TEXT_75 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t";
94
  protected final String TEXT_75 = ".getEditingDomain(node.getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(";
95
  protected final String TEXT_76 = ".decorateView(createdNode);";
95
  protected final String TEXT_76 = " child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn ";
96
  protected final String TEXT_77 = NL + "\t\t\t";
96
  protected final String TEXT_77 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallNotationModelRefresher();";
97
  protected final String TEXT_78 = " bounds = ";
97
  protected final String TEXT_78 = NL + "\t\tinstallLinkNotationModelRefresher();";
98
  protected final String TEXT_79 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);";
98
  protected final String TEXT_79 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected IFigure createFigure() {" + NL + "\t\tIFigure f = new FreeformLayer();" + NL + "\t\tf.setBorder(new MarginBorder(5));" + NL + "\t\tf.setLayoutManager(new FreeformLayout());" + NL + "\t\treturn f;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {" + NL + "\t\tif (";
99
  protected final String TEXT_80 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, ";
99
  protected final String TEXT_80 = ".class == key) {" + NL + "\t\t\treturn new ";
100
  protected final String TEXT_81 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, ";
100
  protected final String TEXT_81 = "(this);" + NL + "\t\t}";
101
  protected final String TEXT_82 = "));";
101
  protected final String TEXT_82 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected List getModelChildren() {" + NL + "\t\treturn getDiagram().getVisibleChildren();" + NL + "\t}" + NL;
102
  protected final String TEXT_83 = NL + "\t\t}" + NL + "\t}" + NL;
102
  protected final String TEXT_83 = NL;
103
  protected final String TEXT_84 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
103
  protected final String TEXT_84 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
104
  protected final String TEXT_85 = "static ";
104
  protected final String TEXT_85 = "static ";
105
  protected final String TEXT_86 = "class Create";
105
  protected final String TEXT_86 = "class Create";
106
  protected final String TEXT_87 = "Command extends ";
106
  protected final String TEXT_87 = "NotationCommand extends ";
107
  protected final String TEXT_88 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create";
107
  protected final String TEXT_88 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create";
108
  protected final String TEXT_89 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
108
  protected final String TEXT_89 = "NotationCommand(";
109
  protected final String TEXT_90 = "Command(";
109
  protected final String TEXT_90 = " parent, " + NL + "\t\t\t\t";
110
  protected final String TEXT_91 = " parent, ";
110
  protected final String TEXT_91 = " domainElement";
111
  protected final String TEXT_92 = " request";
111
  protected final String TEXT_92 = ", ";
112
  protected final String TEXT_93 = ", ";
112
  protected final String TEXT_93 = " constraint";
113
  protected final String TEXT_94 = " constraint";
113
  protected final String TEXT_94 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = ";
114
  protected final String TEXT_95 = ") {" + NL + "\t\t\t";
114
  protected final String TEXT_95 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t";
115
  protected final String TEXT_96 = " domainModelEditDomain = ";
115
  protected final String TEXT_96 = ".decorateView(createdNode);";
116
  protected final String TEXT_97 = ".getEditingDomain(parent.getDiagram().getElement());";
116
  protected final String TEXT_97 = NL + "\t\t\t";
117
  protected final String TEXT_98 = NL + "\t\t\t";
117
  protected final String TEXT_98 = " bounds = ";
118
  protected final String TEXT_99 = " createdDomainElement = ";
118
  protected final String TEXT_99 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);";
119
  protected final String TEXT_100 = ".eINSTANCE.create(" + NL + "\t\t\t\t";
119
  protected final String TEXT_100 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, ";
120
  protected final String TEXT_101 = ".eINSTANCE.get";
120
  protected final String TEXT_101 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, ";
121
  protected final String TEXT_102 = "());";
121
  protected final String TEXT_102 = "));";
122
  protected final String TEXT_103 = NL + "\t\t\t";
122
  protected final String TEXT_103 = NL + "\t\t}" + NL + "\t}" + NL;
123
  protected final String TEXT_104 = " createdDomainElement = ";
123
  protected final String TEXT_104 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
124
  protected final String TEXT_105 = ".eINSTANCE.create";
124
  protected final String TEXT_105 = "static ";
125
  protected final String TEXT_106 = "();";
125
  protected final String TEXT_106 = "class Create";
126
  protected final String TEXT_107 = NL + "\t\t\t";
126
  protected final String TEXT_107 = "Command extends ";
127
  protected final String TEXT_108 = NL + "\t\t\t";
127
  protected final String TEXT_108 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create";
128
  protected final String TEXT_109 = ".";
128
  protected final String TEXT_109 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
129
  protected final String TEXT_110 = ".initializeElement(";
129
  protected final String TEXT_110 = "Command(";
130
  protected final String TEXT_111 = "(";
130
  protected final String TEXT_111 = " parent, ";
131
  protected final String TEXT_112 = ") ";
131
  protected final String TEXT_112 = " request";
132
  protected final String TEXT_113 = "createdDomainElement);";
132
  protected final String TEXT_113 = ", ";
133
  protected final String TEXT_114 = NL + "\t\t\t";
133
  protected final String TEXT_114 = " constraint";
134
  protected final String TEXT_115 = " compoundCommand = new ";
134
  protected final String TEXT_115 = ") {" + NL + "\t\t\t";
135
  protected final String TEXT_116 = "();" + NL + "\t\t\tcompoundCommand.append(";
135
  protected final String TEXT_116 = " domainModelEditDomain = ";
136
  protected final String TEXT_117 = ".create(domainModelEditDomain, ";
136
  protected final String TEXT_117 = ".getEditingDomain(parent.getDiagram().getElement());";
137
  protected final String TEXT_118 = ", " + NL + "\t\t\t\t";
137
  protected final String TEXT_118 = NL + "\t\t\t";
138
  protected final String TEXT_119 = ".eINSTANCE.get";
138
  protected final String TEXT_119 = " createdDomainElement = ";
139
  protected final String TEXT_120 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append(";
139
  protected final String TEXT_120 = ".eINSTANCE.create(" + NL + "\t\t\t\t";
140
  protected final String TEXT_121 = ".create(domainModelEditDomain, ";
140
  protected final String TEXT_121 = ".eINSTANCE.get";
141
  protected final String TEXT_122 = ", " + NL + "\t\t\t\t";
141
  protected final String TEXT_122 = "());";
142
  protected final String TEXT_123 = ".eINSTANCE.get";
142
  protected final String TEXT_123 = NL + "\t\t\t";
143
  protected final String TEXT_124 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;";
143
  protected final String TEXT_124 = " createdDomainElement = ";
144
  protected final String TEXT_125 = NL + "\t\t\tthis.domainModelAddCommand = ";
144
  protected final String TEXT_125 = ".eINSTANCE.create";
145
  protected final String TEXT_126 = ".create(domainModelEditDomain, ";
145
  protected final String TEXT_126 = "();";
146
  protected final String TEXT_127 = ", " + NL + "\t\t\t\t";
146
  protected final String TEXT_127 = NL + "\t\t\t";
147
  protected final String TEXT_128 = ".eINSTANCE.get";
147
  protected final String TEXT_128 = NL + "\t\t\t";
148
  protected final String TEXT_129 = "(), createdDomainElement);";
148
  protected final String TEXT_129 = ".";
149
  protected final String TEXT_130 = NL + "\t\t\tthis.notationAddCommand = new Create";
149
  protected final String TEXT_130 = ".initializeElement(";
150
  protected final String TEXT_131 = "NotationCommand(parent, ";
150
  protected final String TEXT_131 = "(";
151
  protected final String TEXT_132 = "(";
151
  protected final String TEXT_132 = ") ";
152
  protected final String TEXT_133 = ") ";
152
  protected final String TEXT_133 = "createdDomainElement);";
153
  protected final String TEXT_134 = "createdDomainElement";
153
  protected final String TEXT_134 = NL + "\t\t\t";
154
  protected final String TEXT_135 = ", constraint";
154
  protected final String TEXT_135 = " compoundCommand = new ";
155
  protected final String TEXT_136 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + 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}";
155
  protected final String TEXT_136 = "();" + NL + "\t\t\tcompoundCommand.append(";
156
  protected final String TEXT_137 = NL;
156
  protected final String TEXT_137 = ".create(domainModelEditDomain, ";
157
  protected final String TEXT_138 = NL;
157
  protected final String TEXT_138 = ", " + NL + "\t\t\t\t";
158
  protected final String TEXT_139 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
158
  protected final String TEXT_139 = ".eINSTANCE.get";
159
  protected final String TEXT_140 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(";
159
  protected final String TEXT_140 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append(";
160
  protected final String TEXT_141 = " feature, ";
160
  protected final String TEXT_141 = ".create(domainModelEditDomain, ";
161
  protected final String TEXT_142 = " 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 HashMap();";
161
  protected final String TEXT_142 = ", " + NL + "\t\t\t\t";
162
  protected final String TEXT_143 = NL;
162
  protected final String TEXT_143 = ".eINSTANCE.get";
163
  protected final String TEXT_144 = "\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(";
163
  protected final String TEXT_144 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;";
164
  protected final String TEXT_145 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
164
  protected final String TEXT_145 = NL + "\t\t\tthis.domainModelAddCommand = ";
165
  protected final String TEXT_146 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tif (!getDiagram().eAdapters().contains(getUpdateManager())) {" + NL + "\t\t\tgetDiagram().eAdapters().add(getUpdateManager());" + NL + "\t\t}" + NL + "\t\tif (!getDiagram().getElement().eAdapters().contains(domainModelRefresher)) {" + NL + "\t\t\tgetDiagram().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t\t}" + NL + "\t\tinstallNotationModelRefresher();";
165
  protected final String TEXT_146 = ".create(domainModelEditDomain, ";
166
  protected final String TEXT_147 = NL + "\t\tinstallLinkNotationModelRefresher();";
166
  protected final String TEXT_147 = ", " + NL + "\t\t\t\t";
167
  protected final String TEXT_148 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {";
167
  protected final String TEXT_148 = ".eINSTANCE.get";
168
  protected final String TEXT_149 = NL + "\t\tuninstallLinkNotationModelRefresher();";
168
  protected final String TEXT_149 = "(), createdDomainElement);";
169
  protected final String TEXT_150 = NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tgetDiagram().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tgetDiagram().eAdapters().remove(getUpdateManager());" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL;
169
  protected final String TEXT_150 = NL + "\t\t\tthis.notationAddCommand = new Create";
170
  protected final String TEXT_151 = NL;
170
  protected final String TEXT_151 = "NotationCommand(parent, ";
171
  protected final String TEXT_152 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t";
171
  protected final String TEXT_152 = "(";
172
  protected final String TEXT_153 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
172
  protected final String TEXT_153 = ") ";
173
  protected final String TEXT_154 = " domainModelEditDomain = ";
173
  protected final String TEXT_154 = "createdDomainElement";
174
  protected final String TEXT_155 = ".getEditingDomain(";
174
  protected final String TEXT_155 = ", constraint";
175
  protected final String TEXT_156 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
175
  protected final String TEXT_156 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + 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}";
176
  protected final String TEXT_157 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
176
  protected final String TEXT_157 = NL;
177
  protected final String TEXT_158 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends ";
177
  protected final String TEXT_158 = NL;
178
  protected final String TEXT_159 = " {";
178
  protected final String TEXT_159 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
179
  protected final String TEXT_160 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in ";
179
  protected final String TEXT_160 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(";
180
  protected final String TEXT_161 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
180
  protected final String TEXT_161 = " feature, ";
181
  protected final String TEXT_162 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn ";
181
  protected final String TEXT_162 = " 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 HashMap();";
182
  protected final String TEXT_163 = ".NOT_TOUCH;" + NL + "\t\t}";
182
  protected final String TEXT_163 = NL;
183
  protected final String TEXT_164 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
183
  protected final String TEXT_164 = "\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(";
184
  protected final String TEXT_165 = " createFilter() {";
184
  protected final String TEXT_165 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
185
  protected final String TEXT_166 = NL + "\t\t\t";
185
  protected final String TEXT_166 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tif (!getDiagram().eAdapters().contains(getUpdateManager())) {" + NL + "\t\t\tgetDiagram().eAdapters().add(getUpdateManager());" + NL + "\t\t}" + NL + "\t\tif (!getDiagram().getElement().eAdapters().contains(domainModelRefresher)) {" + NL + "\t\t\tgetDiagram().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t\t}" + NL + "\t\tinstallNotationModelRefresher();";
186
  protected final String TEXT_167 = " filter = ";
186
  protected final String TEXT_167 = NL + "\t\tinstallLinkNotationModelRefresher();";
187
  protected final String TEXT_168 = ".createFeatureFilter(";
187
  protected final String TEXT_168 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {";
188
  protected final String TEXT_169 = ".eINSTANCE.get";
188
  protected final String TEXT_169 = NL + "\t\tuninstallLinkNotationModelRefresher();";
189
  protected final String TEXT_170 = "());";
189
  protected final String TEXT_170 = NL + "\t\tuninstallNotationModelRefresher();" + NL + "\t\tgetDiagram().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tgetDiagram().eAdapters().remove(getUpdateManager());" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL;
190
  protected final String TEXT_171 = NL + "\t\t\tfilter = filter.or(";
190
  protected final String TEXT_171 = NL;
191
  protected final String TEXT_172 = ".createFeatureFilter(";
191
  protected final String TEXT_172 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t";
192
  protected final String TEXT_173 = ".eINSTANCE.get";
192
  protected final String TEXT_173 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
193
  protected final String TEXT_174 = "()));";
193
  protected final String TEXT_174 = " domainModelEditDomain = ";
194
  protected final String TEXT_175 = NL + "\t\t\tfilter = filter.and(";
194
  protected final String TEXT_175 = ".getEditingDomain(";
195
  protected final String TEXT_176 = ".createNotifierFilter(";
195
  protected final String TEXT_176 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
196
  protected final String TEXT_177 = ".getElement()));";
196
  protected final String TEXT_177 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
197
  protected final String TEXT_178 = NL + "\t\t\t";
197
  protected final String TEXT_178 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends ";
198
  protected final String TEXT_179 = " filter = ";
198
  protected final String TEXT_179 = " {";
199
  protected final String TEXT_180 = ".createNotifierFilter(";
199
  protected final String TEXT_180 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in ";
200
  protected final String TEXT_181 = ".getElement());";
200
  protected final String TEXT_181 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
201
  protected final String TEXT_182 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);";
201
  protected final String TEXT_182 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn ";
202
  protected final String TEXT_183 = NL + "\t\t\t";
202
  protected final String TEXT_183 = ".NOT_TOUCH;" + NL + "\t\t}";
203
  protected final String TEXT_184 = " filter = getConstrainedChildrenFilter();";
203
  protected final String TEXT_184 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
204
  protected final String TEXT_185 = NL + "\t\t\t";
204
  protected final String TEXT_185 = " createFilter() {";
205
  protected final String TEXT_186 = " filter = ";
205
  protected final String TEXT_186 = NL + "\t\t\t";
206
  protected final String TEXT_187 = ".NOT_TOUCH;";
206
  protected final String TEXT_187 = " filter = ";
207
  protected final String TEXT_188 = NL + "\t\t\treturn filter;";
207
  protected final String TEXT_188 = ".createFeatureFilter(";
208
  protected final String TEXT_189 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
208
  protected final String TEXT_189 = ".eINSTANCE.get";
209
  protected final String TEXT_190 = " getCreateNotationalElementCommand(";
209
  protected final String TEXT_190 = "());";
210
  protected final String TEXT_191 = " descriptor) {" + NL + "\t\t\t";
210
  protected final String TEXT_191 = NL + "\t\t\tfilter = filter.or(";
211
  protected final String TEXT_192 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {";
211
  protected final String TEXT_192 = ".createFeatureFilter(";
212
  protected final String TEXT_193 = NL + "\t\t\tcase ";
212
  protected final String TEXT_193 = ".eINSTANCE.get";
213
  protected final String TEXT_194 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof ";
213
  protected final String TEXT_194 = "()));";
214
  protected final String TEXT_195 = ") {" + NL + "\t\t\t\t\treturn new Create";
214
  protected final String TEXT_195 = NL + "\t\t\tfilter = filter.and(";
215
  protected final String TEXT_196 = "NotationCommand(getHost(), domainElement";
215
  protected final String TEXT_196 = ".createNotifierFilter(";
216
  protected final String TEXT_197 = ", new Rectangle(0, 0, 0, 0)";
216
  protected final String TEXT_197 = ".getElement()));";
217
  protected final String TEXT_198 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;";
217
  protected final String TEXT_198 = NL + "\t\t\t";
218
  protected final String TEXT_199 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
218
  protected final String TEXT_199 = " filter = ";
219
  protected final String TEXT_200 = " getSemanticChildNodes() {";
219
  protected final String TEXT_200 = ".createNotifierFilter(";
220
  protected final String TEXT_201 = NL;
220
  protected final String TEXT_201 = ".getElement());";
221
  protected final String TEXT_202 = NL + "\treturn ";
221
  protected final String TEXT_202 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);";
222
  protected final String TEXT_203 = ".EMPTY_LIST;";
222
  protected final String TEXT_203 = NL + "\t\t\t";
223
  protected final String TEXT_204 = NL + "\t";
223
  protected final String TEXT_204 = " filter = getConstrainedChildrenFilter();";
224
  protected final String TEXT_205 = " result = new ";
224
  protected final String TEXT_205 = NL + "\t\t\t";
225
  protected final String TEXT_206 = "();";
225
  protected final String TEXT_206 = " filter = ";
226
  protected final String TEXT_207 = NL + "\t";
226
  protected final String TEXT_207 = ".NOT_TOUCH;";
227
  protected final String TEXT_208 = " viewObject = ";
227
  protected final String TEXT_208 = NL + "\t\t\treturn filter;";
228
  protected final String TEXT_209 = ";" + NL + "\t";
228
  protected final String TEXT_209 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
229
  protected final String TEXT_210 = " modelObject = viewObject.getElement();" + NL + "\t";
229
  protected final String TEXT_210 = " getCreateNotationalElementCommand(";
230
  protected final String TEXT_211 = " nextValue;" + NL + "\tint nodeVID;";
230
  protected final String TEXT_211 = " descriptor) {" + NL + "\t\t\t";
231
  protected final String TEXT_212 = NL + "\tfor(";
231
  protected final String TEXT_212 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {";
232
  protected final String TEXT_213 = " it = ";
232
  protected final String TEXT_213 = NL + "\t\t\tcase ";
233
  protected final String TEXT_214 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
233
  protected final String TEXT_214 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof ";
234
  protected final String TEXT_215 = ") it.next();";
234
  protected final String TEXT_215 = ") {" + NL + "\t\t\t\t\treturn new Create";
235
  protected final String TEXT_216 = NL + "\tnextValue = (";
235
  protected final String TEXT_216 = "NotationCommand(getHost(), domainElement";
236
  protected final String TEXT_217 = ")";
236
  protected final String TEXT_217 = ", new Rectangle(0, 0, 0, 0)";
237
  protected final String TEXT_218 = ";";
237
  protected final String TEXT_218 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;";
238
  protected final String TEXT_219 = NL + "\tnodeVID = ";
238
  protected final String TEXT_219 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
239
  protected final String TEXT_220 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
239
  protected final String TEXT_220 = " getSemanticChildNodes() {";
240
  protected final String TEXT_221 = NL + "\tswitch (nodeVID) {";
240
  protected final String TEXT_221 = NL;
241
  protected final String TEXT_222 = NL + "\tcase ";
241
  protected final String TEXT_222 = NL + "\treturn ";
242
  protected final String TEXT_223 = ".VISUAL_ID: {";
242
  protected final String TEXT_223 = ".EMPTY_LIST;";
243
  protected final String TEXT_224 = NL + "\tif (";
243
  protected final String TEXT_224 = NL + "\t";
244
  protected final String TEXT_225 = ".VISUAL_ID == nodeVID) {";
244
  protected final String TEXT_225 = " result = new ";
245
  protected final String TEXT_226 = NL + "\t\tresult.add(new ";
245
  protected final String TEXT_226 = "();";
246
  protected final String TEXT_227 = "(nextValue, nodeVID));";
246
  protected final String TEXT_227 = NL + "\t";
247
  protected final String TEXT_228 = NL + "\t\tbreak;" + NL + "\t\t}";
247
  protected final String TEXT_228 = " viewObject = ";
248
  protected final String TEXT_229 = NL + "\t\t}";
248
  protected final String TEXT_229 = ";" + NL + "\t";
249
  protected final String TEXT_230 = NL + "\t}";
249
  protected final String TEXT_230 = " modelObject = viewObject.getElement();" + NL + "\t";
250
  protected final String TEXT_231 = NL + "\t}";
250
  protected final String TEXT_231 = " nextValue;" + NL + "\tint nodeVID;";
251
  protected final String TEXT_232 = NL + "\treturn result;";
251
  protected final String TEXT_232 = NL + "\tfor(";
252
  protected final String TEXT_233 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
252
  protected final String TEXT_233 = " it = ";
253
  protected final String TEXT_234 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
253
  protected final String TEXT_234 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
254
  protected final String TEXT_235 = " descriptor) {" + NL + "\t\t\treturn ";
254
  protected final String TEXT_235 = ") it.next();";
255
  protected final String TEXT_236 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
255
  protected final String TEXT_236 = NL + "\tnextValue = (";
256
  protected final String TEXT_237 = " getHost() {" + NL + "\t\t\treturn ";
256
  protected final String TEXT_237 = ")";
257
  protected final String TEXT_238 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t";
257
  protected final String TEXT_238 = ";";
258
  protected final String TEXT_239 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
258
  protected final String TEXT_239 = NL + "\tnodeVID = ";
259
  protected final String TEXT_240 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
259
  protected final String TEXT_240 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
260
  protected final String TEXT_241 = " domainModelEditDomain = ";
260
  protected final String TEXT_241 = NL + "\tswitch (nodeVID) {";
261
  protected final String TEXT_242 = ".getEditingDomain(";
261
  protected final String TEXT_242 = NL + "\tcase ";
262
  protected final String TEXT_243 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
262
  protected final String TEXT_243 = ".VISUAL_ID: {";
263
  protected final String TEXT_244 = "(domainModelEditDomain, command));" + NL + "\t}" + NL + NL;
263
  protected final String TEXT_244 = NL + "\tif (";
264
  protected final String TEXT_245 = NL;
264
  protected final String TEXT_245 = ".VISUAL_ID == nodeVID) {";
265
  protected final String TEXT_246 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
265
  protected final String TEXT_246 = NL + "\t\tresult.add(new ";
266
  protected final String TEXT_247 = " domainModelEditDomain = ";
266
  protected final String TEXT_247 = "(nextValue, nodeVID));";
267
  protected final String TEXT_248 = ".getEditingDomain(";
267
  protected final String TEXT_248 = NL + "\t\tbreak;" + NL + "\t\t}";
268
  protected final String TEXT_249 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * Service to find a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
268
  protected final String TEXT_249 = NL + "\t\t}";
269
  protected final String TEXT_250 = " viewService;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
269
  protected final String TEXT_250 = NL + "\t}";
270
  protected final String TEXT_251 = " getViewService() {" + NL + "\t\tif (viewService == null) {" + NL + "\t\t\tviewService = new ";
270
  protected final String TEXT_251 = NL + "\t}";
271
  protected final String TEXT_252 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn viewService;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher(getViewService());" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends ";
271
  protected final String TEXT_252 = NL + "\treturn result;";
272
  protected final String TEXT_253 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher(";
272
  protected final String TEXT_253 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
273
  protected final String TEXT_254 = " viewService) {" + NL + "\t\t\tsuper(viewService);" + NL + "\t\t}";
273
  protected final String TEXT_254 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
274
  protected final String TEXT_255 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in ";
274
  protected final String TEXT_255 = " descriptor) {" + NL + "\t\t\treturn ";
275
  protected final String TEXT_256 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
275
  protected final String TEXT_256 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
276
  protected final String TEXT_257 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn ";
276
  protected final String TEXT_257 = " getHost() {" + NL + "\t\t\treturn ";
277
  protected final String TEXT_258 = ".NOT_TOUCH;" + NL + "\t\t}";
277
  protected final String TEXT_258 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t";
278
  protected final String TEXT_259 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
278
  protected final String TEXT_259 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
279
  protected final String TEXT_260 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn ";
279
  protected final String TEXT_260 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
280
  protected final String TEXT_261 = ".createEventTypeFilter(";
280
  protected final String TEXT_261 = " domainModelEditDomain = ";
281
  protected final String TEXT_262 = ".SET).or(" + NL + "\t\t\t\t";
281
  protected final String TEXT_262 = ".getEditingDomain(";
282
  protected final String TEXT_263 = ".createEventTypeFilter(";
282
  protected final String TEXT_263 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
283
  protected final String TEXT_264 = ".UNSET).or(" + NL + "\t\t\t\t";
283
  protected final String TEXT_264 = "(domainModelEditDomain, command));" + NL + "\t}" + NL + NL;
284
  protected final String TEXT_265 = ".createEventTypeFilter(";
284
  protected final String TEXT_265 = NL;
285
  protected final String TEXT_266 = ".REMOVE).or(" + NL + "\t\t\t\t";
285
  protected final String TEXT_266 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
286
  protected final String TEXT_267 = ".createEventTypeFilter(";
286
  protected final String TEXT_267 = " domainModelEditDomain = ";
287
  protected final String TEXT_268 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}";
287
  protected final String TEXT_268 = ".getEditingDomain(";
288
  protected final String TEXT_269 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
288
  protected final String TEXT_269 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * Service to find a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
289
  protected final String TEXT_270 = " createFilter() {";
289
  protected final String TEXT_270 = " viewService;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
290
  protected final String TEXT_271 = NL;
290
  protected final String TEXT_271 = " getViewService() {" + NL + "\t\tif (viewService == null) {" + NL + "\t\t\tviewService = new ";
291
  protected final String TEXT_272 = NL + "\t\t\t";
291
  protected final String TEXT_272 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn viewService;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher(getViewService());" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends ";
292
  protected final String TEXT_273 = " filter = ";
292
  protected final String TEXT_273 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher(";
293
  protected final String TEXT_274 = ".createFeatureFilter(";
293
  protected final String TEXT_274 = " viewService) {" + NL + "\t\t\tsuper(viewService);" + NL + "\t\t}";
294
  protected final String TEXT_275 = ".eINSTANCE.get";
294
  protected final String TEXT_275 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in ";
295
  protected final String TEXT_276 = "());";
295
  protected final String TEXT_276 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
296
  protected final String TEXT_277 = NL + "\t\t\tfilter = filter.or(";
296
  protected final String TEXT_277 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn ";
297
  protected final String TEXT_278 = ".createFeatureFilter(";
297
  protected final String TEXT_278 = ".NOT_TOUCH;" + NL + "\t\t}";
298
  protected final String TEXT_279 = ".eINSTANCE.get";
298
  protected final String TEXT_279 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
299
  protected final String TEXT_280 = "()));";
299
  protected final String TEXT_280 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn ";
300
  protected final String TEXT_281 = NL;
300
  protected final String TEXT_281 = ".createEventTypeFilter(";
301
  protected final String TEXT_282 = NL + "\t\t\t";
301
  protected final String TEXT_282 = ".SET).or(" + NL + "\t\t\t\t";
302
  protected final String TEXT_283 = " filter = ";
302
  protected final String TEXT_283 = ".createEventTypeFilter(";
303
  protected final String TEXT_284 = ".createFeatureFilter(";
303
  protected final String TEXT_284 = ".UNSET).or(" + NL + "\t\t\t\t";
304
  protected final String TEXT_285 = ".eINSTANCE.get";
304
  protected final String TEXT_285 = ".createEventTypeFilter(";
305
  protected final String TEXT_286 = "());";
305
  protected final String TEXT_286 = ".REMOVE).or(" + NL + "\t\t\t\t";
306
  protected final String TEXT_287 = NL + "\t\t\tfilter = filter.or(";
306
  protected final String TEXT_287 = ".createEventTypeFilter(";
307
  protected final String TEXT_288 = ".createFeatureFilter(";
307
  protected final String TEXT_288 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}";
308
  protected final String TEXT_289 = ".eINSTANCE.get";
308
  protected final String TEXT_289 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
309
  protected final String TEXT_290 = "()));";
309
  protected final String TEXT_290 = " createFilter() {";
310
  protected final String TEXT_291 = NL;
310
  protected final String TEXT_291 = NL;
311
  protected final String TEXT_292 = NL + "\t\t\t";
311
  protected final String TEXT_292 = NL + "\t\t\t";
312
  protected final String TEXT_293 = " filter = ";
312
  protected final String TEXT_293 = " filter = ";
Lines 327-464 Link Here
327
  protected final String TEXT_308 = ".createFeatureFilter(";
327
  protected final String TEXT_308 = ".createFeatureFilter(";
328
  protected final String TEXT_309 = ".eINSTANCE.get";
328
  protected final String TEXT_309 = ".eINSTANCE.get";
329
  protected final String TEXT_310 = "()));";
329
  protected final String TEXT_310 = "()));";
330
  protected final String TEXT_311 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);";
330
  protected final String TEXT_311 = NL;
331
  protected final String TEXT_312 = NL + "\t\t\t";
331
  protected final String TEXT_312 = NL + "\t\t\t";
332
  protected final String TEXT_313 = " filter = getConstrainedChildLinksFilter();";
332
  protected final String TEXT_313 = " filter = ";
333
  protected final String TEXT_314 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());";
333
  protected final String TEXT_314 = ".createFeatureFilter(";
334
  protected final String TEXT_315 = NL + "\t\t\t";
334
  protected final String TEXT_315 = ".eINSTANCE.get";
335
  protected final String TEXT_316 = " filter = createUncontainedLinksFilter();";
335
  protected final String TEXT_316 = "());";
336
  protected final String TEXT_317 = NL + "\t\t\t";
336
  protected final String TEXT_317 = NL + "\t\t\tfilter = filter.or(";
337
  protected final String TEXT_318 = " filter = ";
337
  protected final String TEXT_318 = ".createFeatureFilter(";
338
  protected final String TEXT_319 = ".NOT_TOUCH;";
338
  protected final String TEXT_319 = ".eINSTANCE.get";
339
  protected final String TEXT_320 = NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t \t * @generated" + NL + "\t \t */" + NL + "\t\tprotected ";
339
  protected final String TEXT_320 = "()));";
340
  protected final String TEXT_321 = " getCreateNotationalElementCommand(";
340
  protected final String TEXT_321 = NL;
341
  protected final String TEXT_322 = " descriptor) {" + NL + "\t\t\t";
341
  protected final String TEXT_322 = NL + "\t\t\t";
342
  protected final String TEXT_323 = " linkDescriptor = (";
342
  protected final String TEXT_323 = " filter = ";
343
  protected final String TEXT_324 = ") descriptor;" + NL + "\t\t\t";
343
  protected final String TEXT_324 = ".createFeatureFilter(";
344
  protected final String TEXT_325 = " sourceView = getViewService().findView(linkDescriptor.getSource());" + NL + "\t\t\t";
344
  protected final String TEXT_325 = ".eINSTANCE.get";
345
  protected final String TEXT_326 = " targetView = getViewService().findView(linkDescriptor.getDestination());" + NL + "\t\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t";
345
  protected final String TEXT_326 = "());";
346
  protected final String TEXT_327 = " createdEdge = ";
346
  protected final String TEXT_327 = NL + "\t\t\tfilter = filter.or(";
347
  protected final String TEXT_328 = ".eINSTANCE.createEdge();" + NL + "\t\t\tswitch (linkDescriptor.getVisualID()) {";
347
  protected final String TEXT_328 = ".createFeatureFilter(";
348
  protected final String TEXT_329 = NL + "\t\t\tcase ";
348
  protected final String TEXT_329 = ".eINSTANCE.get";
349
  protected final String TEXT_330 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() instanceof ";
349
  protected final String TEXT_330 = "()));";
350
  protected final String TEXT_331 = ") {" + NL + "\t\t\t\t\tcreatedEdge.setElement(linkDescriptor.getElement());" + NL + "\t\t\t\t\t";
350
  protected final String TEXT_331 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);";
351
  protected final String TEXT_332 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
351
  protected final String TEXT_332 = NL + "\t\t\t";
352
  protected final String TEXT_333 = NL + "\t\t\tcase ";
352
  protected final String TEXT_333 = " filter = getConstrainedChildLinksFilter();";
353
  protected final String TEXT_334 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() == null) {" + NL + "\t\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t\t";
353
  protected final String TEXT_334 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());";
354
  protected final String TEXT_335 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
354
  protected final String TEXT_335 = NL + "\t\t\t";
355
  protected final String TEXT_336 = NL + "\t\t\t}" + NL + "\t\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn new ";
355
  protected final String TEXT_336 = " filter = createUncontainedLinksFilter();";
356
  protected final String TEXT_337 = "(getHost().getDiagram(), createdEdge, sourceView, targetView);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
356
  protected final String TEXT_337 = NL + "\t\t\t";
357
  protected final String TEXT_338 = " getSemanticChildLinks() {";
357
  protected final String TEXT_338 = " filter = ";
358
  protected final String TEXT_339 = NL;
358
  protected final String TEXT_339 = ".NOT_TOUCH;";
359
  protected final String TEXT_340 = "\t";
359
  protected final String TEXT_340 = NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t \t * @generated" + NL + "\t \t */" + NL + "\t\tprotected ";
360
  protected final String TEXT_341 = " result = new ";
360
  protected final String TEXT_341 = " getCreateNotationalElementCommand(";
361
  protected final String TEXT_342 = "();";
361
  protected final String TEXT_342 = " descriptor) {" + NL + "\t\t\t";
362
  protected final String TEXT_343 = NL + "\t";
362
  protected final String TEXT_343 = " linkDescriptor = (";
363
  protected final String TEXT_344 = " modelObject = ";
363
  protected final String TEXT_344 = ") descriptor;" + NL + "\t\t\t";
364
  protected final String TEXT_345 = ".getElement();" + NL + "\t";
364
  protected final String TEXT_345 = " sourceView = getViewService().findView(linkDescriptor.getSource());" + NL + "\t\t\t";
365
  protected final String TEXT_346 = " nextValue;";
365
  protected final String TEXT_346 = " targetView = getViewService().findView(linkDescriptor.getDestination());" + NL + "\t\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t";
366
  protected final String TEXT_347 = NL + "\tint linkVID;";
366
  protected final String TEXT_347 = " createdEdge = ";
367
  protected final String TEXT_348 = NL + "\tfor(";
367
  protected final String TEXT_348 = ".eINSTANCE.createEdge();" + NL + "\t\t\tswitch (linkDescriptor.getVisualID()) {";
368
  protected final String TEXT_349 = " it = ";
368
  protected final String TEXT_349 = NL + "\t\t\tcase ";
369
  protected final String TEXT_350 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
369
  protected final String TEXT_350 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() instanceof ";
370
  protected final String TEXT_351 = ") it.next();";
370
  protected final String TEXT_351 = ") {" + NL + "\t\t\t\t\tcreatedEdge.setElement(linkDescriptor.getElement());" + NL + "\t\t\t\t\t";
371
  protected final String TEXT_352 = NL + "\tnextValue = (";
371
  protected final String TEXT_352 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
372
  protected final String TEXT_353 = ")";
372
  protected final String TEXT_353 = NL + "\t\t\tcase ";
373
  protected final String TEXT_354 = ";";
373
  protected final String TEXT_354 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() == null) {" + NL + "\t\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t\t";
374
  protected final String TEXT_355 = NL + "\tlinkVID = ";
374
  protected final String TEXT_355 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
375
  protected final String TEXT_356 = ".INSTANCE.getLinkWithClassVisualID(nextValue);";
375
  protected final String TEXT_356 = NL + "\t\t\t}" + NL + "\t\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn new ";
376
  protected final String TEXT_357 = NL + "\tswitch (linkVID) {";
376
  protected final String TEXT_357 = "(getHost().getDiagram(), createdEdge, sourceView, targetView);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
377
  protected final String TEXT_358 = NL + "\tcase ";
377
  protected final String TEXT_358 = " getSemanticChildLinks() {";
378
  protected final String TEXT_359 = ".VISUAL_ID: {";
378
  protected final String TEXT_359 = NL;
379
  protected final String TEXT_360 = NL + "\tif (";
379
  protected final String TEXT_360 = "\t";
380
  protected final String TEXT_361 = ".VISUAL_ID == linkVID) {";
380
  protected final String TEXT_361 = " result = new ";
381
  protected final String TEXT_362 = NL + "\t\t";
381
  protected final String TEXT_362 = "();";
382
  protected final String TEXT_363 = " source = (";
382
  protected final String TEXT_363 = NL + "\t";
383
  protected final String TEXT_364 = ")";
383
  protected final String TEXT_364 = " modelObject = ";
384
  protected final String TEXT_365 = ";";
384
  protected final String TEXT_365 = ".getElement();" + NL + "\t";
385
  protected final String TEXT_366 = NL + "\t\t";
385
  protected final String TEXT_366 = " nextValue;";
386
  protected final String TEXT_367 = " source = ";
386
  protected final String TEXT_367 = NL + "\tint linkVID;";
387
  protected final String TEXT_368 = ".getElement();";
387
  protected final String TEXT_368 = NL + "\tfor(";
388
  protected final String TEXT_369 = NL + "\t\t";
388
  protected final String TEXT_369 = " it = ";
389
  protected final String TEXT_370 = " target = (";
389
  protected final String TEXT_370 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
390
  protected final String TEXT_371 = ")";
390
  protected final String TEXT_371 = ") it.next();";
391
  protected final String TEXT_372 = ";";
391
  protected final String TEXT_372 = NL + "\tnextValue = (";
392
  protected final String TEXT_373 = NL + "\t\t";
392
  protected final String TEXT_373 = ")";
393
  protected final String TEXT_374 = " target = ";
393
  protected final String TEXT_374 = ";";
394
  protected final String TEXT_375 = ".getElement();";
394
  protected final String TEXT_375 = NL + "\tlinkVID = ";
395
  protected final String TEXT_376 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new ";
395
  protected final String TEXT_376 = ".INSTANCE.getLinkWithClassVisualID(nextValue);";
396
  protected final String TEXT_377 = "(source, target, nextValue, linkVID));" + NL + "\t\t}";
396
  protected final String TEXT_377 = NL + "\tswitch (linkVID) {";
397
  protected final String TEXT_378 = NL + "\t\tbreak;" + NL + "\t}";
397
  protected final String TEXT_378 = NL + "\tcase ";
398
  protected final String TEXT_379 = NL + "\t}";
398
  protected final String TEXT_379 = ".VISUAL_ID: {";
399
  protected final String TEXT_380 = NL + "\t}";
399
  protected final String TEXT_380 = NL + "\tif (";
400
  protected final String TEXT_381 = NL + "\t}";
400
  protected final String TEXT_381 = ".VISUAL_ID == linkVID) {";
401
  protected final String TEXT_382 = NL + "\tfor(";
401
  protected final String TEXT_382 = NL + "\t\t";
402
  protected final String TEXT_383 = " it = ";
402
  protected final String TEXT_383 = " source = (";
403
  protected final String TEXT_384 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
403
  protected final String TEXT_384 = ")";
404
  protected final String TEXT_385 = ") it.next();";
404
  protected final String TEXT_385 = ";";
405
  protected final String TEXT_386 = NL + "\tnextValue = (";
405
  protected final String TEXT_386 = NL + "\t\t";
406
  protected final String TEXT_387 = ")";
406
  protected final String TEXT_387 = " source = ";
407
  protected final String TEXT_388 = ";";
407
  protected final String TEXT_388 = ".getElement();";
408
  protected final String TEXT_389 = NL + "\tif (nextValue != null) {";
408
  protected final String TEXT_389 = NL + "\t\t";
409
  protected final String TEXT_390 = NL + "\t\tresult.add(new ";
409
  protected final String TEXT_390 = " target = (";
410
  protected final String TEXT_391 = "(modelObject, nextValue, null, ";
410
  protected final String TEXT_391 = ")";
411
  protected final String TEXT_392 = ".VISUAL_ID));";
411
  protected final String TEXT_392 = ";";
412
  protected final String TEXT_393 = NL + "\t}";
412
  protected final String TEXT_393 = NL + "\t\t";
413
  protected final String TEXT_394 = NL + "\t}";
413
  protected final String TEXT_394 = " target = ";
414
  protected final String TEXT_395 = NL + "\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
414
  protected final String TEXT_395 = ".getElement();";
415
  protected final String TEXT_396 = " getNotationalChildLinks() {" + NL + "\t\t\t";
415
  protected final String TEXT_396 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new ";
416
  protected final String TEXT_397 = " result = new ";
416
  protected final String TEXT_397 = "(source, target, nextValue, linkVID));" + NL + "\t\t}";
417
  protected final String TEXT_398 = "();" + NL + "\t\t\t";
417
  protected final String TEXT_398 = NL + "\t\tbreak;" + NL + "\t}";
418
  protected final String TEXT_399 = " allLinks = ";
418
  protected final String TEXT_399 = NL + "\t}";
419
  protected final String TEXT_400 = ".getEdges();" + NL + "\t\t\tfor(";
419
  protected final String TEXT_400 = NL + "\t}";
420
  protected final String TEXT_401 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\t";
420
  protected final String TEXT_401 = NL + "\t}";
421
  protected final String TEXT_402 = " next = (";
421
  protected final String TEXT_402 = NL + "\tfor(";
422
  protected final String TEXT_403 = ") it.next();";
422
  protected final String TEXT_403 = " it = ";
423
  protected final String TEXT_404 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
423
  protected final String TEXT_404 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
424
  protected final String TEXT_405 = " source = next.getSource();" + NL + "\t\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
424
  protected final String TEXT_405 = ") it.next();";
425
  protected final String TEXT_406 = " target = next.getTarget();" + NL + "\t\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}";
425
  protected final String TEXT_406 = NL + "\tnextValue = (";
426
  protected final String TEXT_407 = NL + "\t\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\t\tif (next.getSource() == ";
426
  protected final String TEXT_407 = ")";
427
  protected final String TEXT_408 = ") {" + NL + "\t\t\t\t\t\tint linkVID = ";
427
  protected final String TEXT_408 = ";";
428
  protected final String TEXT_409 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
428
  protected final String TEXT_409 = NL + "\tif (nextValue != null) {";
429
  protected final String TEXT_410 = NL + "\t\t\t\t\t\tcase ";
429
  protected final String TEXT_410 = NL + "\t\tresult.add(new ";
430
  protected final String TEXT_411 = ".VISUAL_ID:";
430
  protected final String TEXT_411 = "(modelObject, nextValue, null, ";
431
  protected final String TEXT_412 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}";
431
  protected final String TEXT_412 = ".VISUAL_ID));";
432
  protected final String TEXT_413 = NL + "\t\t\t\t} else {";
432
  protected final String TEXT_413 = NL + "\t}";
433
  protected final String TEXT_414 = NL + "\t\t\t\t}";
433
  protected final String TEXT_414 = NL + "\t}";
434
  protected final String TEXT_415 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null) {";
434
  protected final String TEXT_415 = NL + "\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
435
  protected final String TEXT_416 = NL + "\t\t\t\t\tif (next.getElement().eContainer() == ";
435
  protected final String TEXT_416 = " getNotationalChildLinks() {" + NL + "\t\t\t";
436
  protected final String TEXT_417 = ".getElement()) {" + NL + "\t\t\t\t\t\tint linkVID = ";
436
  protected final String TEXT_417 = " result = new ";
437
  protected final String TEXT_418 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
437
  protected final String TEXT_418 = "();" + NL + "\t\t\t";
438
  protected final String TEXT_419 = NL + "\t\t\t\t\t\tcase ";
438
  protected final String TEXT_419 = " allLinks = ";
439
  protected final String TEXT_420 = ".VISUAL_ID:";
439
  protected final String TEXT_420 = ".getEdges();" + NL + "\t\t\tfor(";
440
  protected final String TEXT_421 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
440
  protected final String TEXT_421 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\t";
441
  protected final String TEXT_422 = NL + "\t\t\t}" + NL + "\t\t\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
441
  protected final String TEXT_422 = " next = (";
442
  protected final String TEXT_423 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
442
  protected final String TEXT_423 = ") it.next();";
443
  protected final String TEXT_424 = " descriptor) {" + NL + "\t\t\treturn ";
443
  protected final String TEXT_424 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
444
  protected final String TEXT_425 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
444
  protected final String TEXT_425 = " source = next.getSource();" + NL + "\t\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
445
  protected final String TEXT_426 = " getHost() {" + NL + "\t\t\treturn ";
445
  protected final String TEXT_426 = " target = next.getTarget();" + NL + "\t\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}";
446
  protected final String TEXT_427 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t";
446
  protected final String TEXT_427 = NL + "\t\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\t\tif (next.getSource() == ";
447
  protected final String TEXT_428 = " linkRefresher = getLinkNotationModelRefresher();" + NL + "\t\tif (!linkRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
447
  protected final String TEXT_428 = ") {" + NL + "\t\t\t\t\t\tint linkVID = ";
448
  protected final String TEXT_429 = " command = linkRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
448
  protected final String TEXT_429 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
449
  protected final String TEXT_430 = " domainModelEditDomain = ";
449
  protected final String TEXT_430 = NL + "\t\t\t\t\t\tcase ";
450
  protected final String TEXT_431 = ".getEditingDomain(";
450
  protected final String TEXT_431 = ".VISUAL_ID:";
451
  protected final String TEXT_432 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
451
  protected final String TEXT_432 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}";
452
  protected final String TEXT_433 = "(domainModelEditDomain, command));" + NL + "\t}";
452
  protected final String TEXT_433 = NL + "\t\t\t\t} else {";
453
  protected final String TEXT_434 = NL;
453
  protected final String TEXT_434 = NL + "\t\t\t\t}";
454
  protected final String TEXT_435 = NL;
454
  protected final String TEXT_435 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null) {";
455
  protected final String TEXT_436 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
455
  protected final String TEXT_436 = NL + "\t\t\t\t\tif (next.getElement().eContainer() == ";
456
  protected final String TEXT_437 = " domainModelRefresher = new ";
456
  protected final String TEXT_437 = ".getElement()) {" + NL + "\t\t\t\t\t\tint linkVID = ";
457
  protected final String TEXT_438 = "(this);" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
457
  protected final String TEXT_438 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
458
  protected final String TEXT_439 = " updateManager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
458
  protected final String TEXT_439 = NL + "\t\t\t\t\t\tcase ";
459
  protected final String TEXT_440 = " getUpdateManager() {" + NL + "\t\tif (updateManager == null) {" + NL + "\t\t\tupdateManager = new ";
459
  protected final String TEXT_440 = ".VISUAL_ID:";
460
  protected final String TEXT_441 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn updateManager;" + NL + "\t}" + NL + "}";
460
  protected final String TEXT_441 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
461
  protected final String TEXT_442 = NL;
461
  protected final String TEXT_442 = NL + "\t\t\t}" + NL + "\t\t\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
462
  protected final String TEXT_443 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
463
  protected final String TEXT_444 = " descriptor) {" + NL + "\t\t\treturn ";
464
  protected final String TEXT_445 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
465
  protected final String TEXT_446 = " getHost() {" + NL + "\t\t\treturn ";
466
  protected final String TEXT_447 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t";
467
  protected final String TEXT_448 = " linkRefresher = getLinkNotationModelRefresher();" + NL + "\t\tif (!linkRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
468
  protected final String TEXT_449 = " command = linkRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
469
  protected final String TEXT_450 = " domainModelEditDomain = ";
470
  protected final String TEXT_451 = ".getEditingDomain(";
471
  protected final String TEXT_452 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
472
  protected final String TEXT_453 = "(domainModelEditDomain, command));" + NL + "\t}";
473
  protected final String TEXT_454 = NL;
474
  protected final String TEXT_455 = NL;
475
  protected final String TEXT_456 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
476
  protected final String TEXT_457 = " domainModelRefresher = new ";
477
  protected final String TEXT_458 = "(this);" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
478
  protected final String TEXT_459 = " updateManager;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
479
  protected final String TEXT_460 = " getUpdateManager() {" + NL + "\t\tif (updateManager == null) {" + NL + "\t\t\tupdateManager = new ";
480
  protected final String TEXT_461 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn updateManager;" + NL + "\t}" + NL + "}";
481
  protected final String TEXT_462 = NL;
462
482
463
  public String generate(Object argument)
483
  public String generate(Object argument)
464
  {
484
  {
Lines 699-733 Link Here
699
    stringBuffer.append(TEXT_49);
719
    stringBuffer.append(TEXT_49);
700
    }/*when there's palette*/
720
    }/*when there's palette*/
701
    stringBuffer.append(TEXT_50);
721
    stringBuffer.append(TEXT_50);
702
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
722
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
703
    stringBuffer.append(TEXT_51);
723
    stringBuffer.append(TEXT_51);
704
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
724
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest"));
705
    stringBuffer.append(TEXT_52);
725
    stringBuffer.append(TEXT_52);
706
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
726
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
707
    stringBuffer.append(TEXT_53);
727
    stringBuffer.append(TEXT_53);
708
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
709
    stringBuffer.append(TEXT_54);
728
    stringBuffer.append(TEXT_54);
710
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
711
    stringBuffer.append(TEXT_55);
729
    stringBuffer.append(TEXT_55);
712
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
730
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
713
    stringBuffer.append(TEXT_56);
731
    stringBuffer.append(TEXT_56);
714
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
732
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
715
    stringBuffer.append(TEXT_57);
733
    stringBuffer.append(TEXT_57);
734
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
735
    stringBuffer.append(TEXT_58);
736
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
737
    stringBuffer.append(TEXT_59);
738
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
739
    stringBuffer.append(TEXT_60);
740
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
741
    stringBuffer.append(TEXT_61);
742
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
743
    stringBuffer.append(TEXT_62);
744
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
745
    stringBuffer.append(TEXT_63);
746
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
747
    stringBuffer.append(TEXT_64);
748
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
749
    stringBuffer.append(TEXT_65);
750
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
751
    stringBuffer.append(TEXT_66);
752
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
753
    stringBuffer.append(TEXT_67);
754
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
755
    stringBuffer.append(TEXT_68);
756
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
757
    stringBuffer.append(TEXT_69);
758
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
759
    stringBuffer.append(TEXT_70);
760
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
761
    stringBuffer.append(TEXT_71);
762
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
763
    stringBuffer.append(TEXT_72);
764
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
765
    stringBuffer.append(TEXT_73);
766
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
767
    stringBuffer.append(TEXT_74);
768
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
769
    stringBuffer.append(TEXT_75);
770
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
771
    stringBuffer.append(TEXT_76);
772
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
773
    stringBuffer.append(TEXT_77);
716
    
774
    
717
//link notation model refresher should always be installed for the diagram edit part, because it tracks the uncontained links
775
//link notation model refresher should always be installed for the diagram edit part, because it tracks the uncontained links
718
//if (myHelper.containsLinks()) {
776
//if (myHelper.containsLinks()) {
719
777
720
    stringBuffer.append(TEXT_58);
778
    stringBuffer.append(TEXT_78);
721
    
779
    
722
//}
780
//}
723
781
724
    stringBuffer.append(TEXT_59);
782
    stringBuffer.append(TEXT_79);
725
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.SnapToHelper"));
783
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.SnapToHelper"));
726
    stringBuffer.append(TEXT_60);
784
    stringBuffer.append(TEXT_80);
727
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.SnapToGrid"));
785
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.SnapToGrid"));
728
    stringBuffer.append(TEXT_61);
786
    stringBuffer.append(TEXT_81);
729
    /*@ include file="adapters/propertySource.javajetinc"*/
787
    /*@ include file="adapters/propertySource.javajetinc"*/
730
    stringBuffer.append(TEXT_62);
788
    stringBuffer.append(TEXT_82);
731
    
789
    
732
for(Iterator it = childNodes.iterator(); it.hasNext(); ) {
790
for(Iterator it = childNodes.iterator(); it.hasNext(); ) {
733
	GenTopLevelNode next = (GenTopLevelNode)it.next();
791
	GenTopLevelNode next = (GenTopLevelNode)it.next();
Lines 735-776 Link Here
735
	boolean isListLayout = false;
793
	boolean isListLayout = false;
736
	String resolvedSemanticElement = "parent.getElement()";
794
	String resolvedSemanticElement = "parent.getElement()";
737
795
738
    stringBuffer.append(TEXT_63);
796
    stringBuffer.append(TEXT_83);
739
    stringBuffer.append(TEXT_64);
797
    stringBuffer.append(TEXT_84);
740
    if (isStatic) {
798
    if (isStatic) {
741
    stringBuffer.append(TEXT_65);
799
    stringBuffer.append(TEXT_85);
742
    }
800
    }
743
    stringBuffer.append(TEXT_66);
801
    stringBuffer.append(TEXT_86);
744
    stringBuffer.append(next.getDomainMetaClass().getName());
802
    stringBuffer.append(next.getDomainMetaClass().getName());
745
    stringBuffer.append(next.getVisualID());
803
    stringBuffer.append(next.getVisualID());
746
    stringBuffer.append(TEXT_67);
804
    stringBuffer.append(TEXT_87);
747
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand"));
805
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand"));
748
    stringBuffer.append(TEXT_68);
806
    stringBuffer.append(TEXT_88);
749
    stringBuffer.append(next.getDomainMetaClass().getName());
807
    stringBuffer.append(next.getDomainMetaClass().getName());
750
    stringBuffer.append(next.getVisualID());
808
    stringBuffer.append(next.getVisualID());
751
    stringBuffer.append(TEXT_69);
809
    stringBuffer.append(TEXT_89);
752
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
810
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
753
    stringBuffer.append(TEXT_70);
811
    stringBuffer.append(TEXT_90);
754
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
812
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
755
    stringBuffer.append(TEXT_71);
813
    stringBuffer.append(TEXT_91);
756
    if (!isListLayout) {
814
    if (!isListLayout) {
757
    stringBuffer.append(TEXT_72);
815
    stringBuffer.append(TEXT_92);
758
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
816
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
759
    stringBuffer.append(TEXT_73);
817
    stringBuffer.append(TEXT_93);
760
    }
818
    }
761
    stringBuffer.append(TEXT_74);
819
    stringBuffer.append(TEXT_94);
762
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
820
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
763
    stringBuffer.append(TEXT_75);
821
    stringBuffer.append(TEXT_95);
764
    stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName()));
822
    stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName()));
765
    stringBuffer.append(TEXT_76);
823
    stringBuffer.append(TEXT_96);
766
    
824
    
767
	if (!isListLayout) {
825
	if (!isListLayout) {
768
826
769
    stringBuffer.append(TEXT_77);
827
    stringBuffer.append(TEXT_97);
770
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
828
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
771
    stringBuffer.append(TEXT_78);
829
    stringBuffer.append(TEXT_98);
772
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
830
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
773
    stringBuffer.append(TEXT_79);
831
    stringBuffer.append(TEXT_99);
774
    
832
    
775
		int defaultWidth = 40;
833
		int defaultWidth = 40;
776
		int defaultHeight = 40;
834
		int defaultHeight = 40;
Lines 780-961 Link Here
780
			defaultHeight = defSizeAttrs.getHeight();
838
			defaultHeight = defSizeAttrs.getHeight();
781
		}
839
		}
782
840
783
    stringBuffer.append(TEXT_80);
841
    stringBuffer.append(TEXT_100);
784
    stringBuffer.append(defaultWidth);
842
    stringBuffer.append(defaultWidth);
785
    stringBuffer.append(TEXT_81);
843
    stringBuffer.append(TEXT_101);
786
    stringBuffer.append(defaultHeight);
844
    stringBuffer.append(defaultHeight);
787
    stringBuffer.append(TEXT_82);
845
    stringBuffer.append(TEXT_102);
788
    
846
    
789
	}
847
	}
790
848
791
    stringBuffer.append(TEXT_83);
849
    stringBuffer.append(TEXT_103);
792
    
850
    
793
if (genDiagram.getPalette() != null) {
851
if (genDiagram.getPalette() != null) {
794
852
795
    stringBuffer.append(TEXT_84);
853
    stringBuffer.append(TEXT_104);
796
    if (isStatic) {
854
    if (isStatic) {
797
    stringBuffer.append(TEXT_85);
855
    stringBuffer.append(TEXT_105);
798
    }
856
    }
799
    stringBuffer.append(TEXT_86);
857
    stringBuffer.append(TEXT_106);
800
    stringBuffer.append(next.getDomainMetaClass().getName());
858
    stringBuffer.append(next.getDomainMetaClass().getName());
801
    stringBuffer.append(next.getVisualID());
859
    stringBuffer.append(next.getVisualID());
802
    stringBuffer.append(TEXT_87);
860
    stringBuffer.append(TEXT_107);
803
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
861
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
804
    stringBuffer.append(TEXT_88);
862
    stringBuffer.append(TEXT_108);
805
    stringBuffer.append(next.getDomainMetaClass().getName());
863
    stringBuffer.append(next.getDomainMetaClass().getName());
806
    stringBuffer.append(next.getVisualID());
864
    stringBuffer.append(next.getVisualID());
807
    stringBuffer.append(TEXT_89);
865
    stringBuffer.append(TEXT_109);
808
    stringBuffer.append(next.getDomainMetaClass().getName());
866
    stringBuffer.append(next.getDomainMetaClass().getName());
809
    stringBuffer.append(next.getVisualID());
867
    stringBuffer.append(next.getVisualID());
810
    stringBuffer.append(TEXT_90);
868
    stringBuffer.append(TEXT_110);
811
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
869
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
812
    stringBuffer.append(TEXT_91);
870
    stringBuffer.append(TEXT_111);
813
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
871
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
814
    stringBuffer.append(TEXT_92);
872
    stringBuffer.append(TEXT_112);
815
    if (!isListLayout) {
873
    if (!isListLayout) {
816
    stringBuffer.append(TEXT_93);
874
    stringBuffer.append(TEXT_113);
817
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
875
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
818
    stringBuffer.append(TEXT_94);
876
    stringBuffer.append(TEXT_114);
819
    }
877
    }
820
    stringBuffer.append(TEXT_95);
878
    stringBuffer.append(TEXT_115);
821
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
879
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
822
    stringBuffer.append(TEXT_96);
880
    stringBuffer.append(TEXT_116);
823
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
881
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
824
    stringBuffer.append(TEXT_97);
882
    stringBuffer.append(TEXT_117);
825
    
883
    
826
	if (next.getDomainMetaClass().isMapEntry()) {
884
	if (next.getDomainMetaClass().isMapEntry()) {
827
	/*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/
885
	/*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/
828
886
829
    stringBuffer.append(TEXT_98);
887
    stringBuffer.append(TEXT_118);
830
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
888
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
831
    stringBuffer.append(TEXT_99);
889
    stringBuffer.append(TEXT_119);
832
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
890
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
833
    stringBuffer.append(TEXT_100);
891
    stringBuffer.append(TEXT_120);
834
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName()));
892
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName()));
835
    stringBuffer.append(TEXT_101);
893
    stringBuffer.append(TEXT_121);
836
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
894
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
837
    stringBuffer.append(TEXT_102);
895
    stringBuffer.append(TEXT_122);
838
    
896
    
839
	} else {
897
	} else {
840
898
841
    stringBuffer.append(TEXT_103);
899
    stringBuffer.append(TEXT_123);
842
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName()));
900
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName()));
843
    stringBuffer.append(TEXT_104);
901
    stringBuffer.append(TEXT_124);
844
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
902
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
845
    stringBuffer.append(TEXT_105);
903
    stringBuffer.append(TEXT_125);
846
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
904
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
847
    stringBuffer.append(TEXT_106);
905
    stringBuffer.append(TEXT_126);
848
    
906
    
849
	}
907
	}
850
908
851
    stringBuffer.append(TEXT_107);
909
    stringBuffer.append(TEXT_127);
852
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
910
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
853
    stringBuffer.append(TEXT_108);
911
    stringBuffer.append(TEXT_128);
854
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
912
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
855
    stringBuffer.append(TEXT_109);
913
    stringBuffer.append(TEXT_129);
856
    stringBuffer.append(next.getUniqueIdentifier());
914
    stringBuffer.append(next.getUniqueIdentifier());
857
    stringBuffer.append(TEXT_110);
915
    stringBuffer.append(TEXT_130);
858
    if (next.getDomainMetaClass().isExternalInterface()) {
916
    if (next.getDomainMetaClass().isExternalInterface()) {
859
    stringBuffer.append(TEXT_111);
917
    stringBuffer.append(TEXT_131);
860
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
918
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
861
    stringBuffer.append(TEXT_112);
919
    stringBuffer.append(TEXT_132);
862
    }
920
    }
863
    stringBuffer.append(TEXT_113);
921
    stringBuffer.append(TEXT_133);
864
    
922
    
865
	TypeModelFacet facet = next.getModelFacet();
923
	TypeModelFacet facet = next.getModelFacet();
866
	GenFeature childFeature = facet.getChildMetaFeature();
924
	GenFeature childFeature = facet.getChildMetaFeature();
867
	GenFeature containmentFeature = facet.getContainmentMetaFeature();
925
	GenFeature containmentFeature = facet.getContainmentMetaFeature();
868
	if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
926
	if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
869
927
870
    stringBuffer.append(TEXT_114);
928
    stringBuffer.append(TEXT_134);
871
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
929
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
872
    stringBuffer.append(TEXT_115);
930
    stringBuffer.append(TEXT_135);
873
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
931
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
874
    stringBuffer.append(TEXT_116);
932
    stringBuffer.append(TEXT_136);
875
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
933
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
876
    stringBuffer.append(TEXT_117);
934
    stringBuffer.append(TEXT_137);
877
    stringBuffer.append(resolvedSemanticElement);
935
    stringBuffer.append(resolvedSemanticElement);
878
    stringBuffer.append(TEXT_118);
936
    stringBuffer.append(TEXT_138);
879
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
937
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
880
    stringBuffer.append(TEXT_119);
938
    stringBuffer.append(TEXT_139);
881
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
939
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
882
    stringBuffer.append(TEXT_120);
940
    stringBuffer.append(TEXT_140);
883
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
941
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
884
    stringBuffer.append(TEXT_121);
942
    stringBuffer.append(TEXT_141);
885
    stringBuffer.append(resolvedSemanticElement);
943
    stringBuffer.append(resolvedSemanticElement);
886
    stringBuffer.append(TEXT_122);
944
    stringBuffer.append(TEXT_142);
887
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
945
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
888
    stringBuffer.append(TEXT_123);
946
    stringBuffer.append(TEXT_143);
889
    stringBuffer.append(childFeature.getFeatureAccessorName());
947
    stringBuffer.append(childFeature.getFeatureAccessorName());
890
    stringBuffer.append(TEXT_124);
948
    stringBuffer.append(TEXT_144);
891
    
949
    
892
	} else {
950
	} else {
893
951
894
    stringBuffer.append(TEXT_125);
952
    stringBuffer.append(TEXT_145);
895
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
953
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
896
    stringBuffer.append(TEXT_126);
954
    stringBuffer.append(TEXT_146);
897
    stringBuffer.append(resolvedSemanticElement);
955
    stringBuffer.append(resolvedSemanticElement);
898
    stringBuffer.append(TEXT_127);
956
    stringBuffer.append(TEXT_147);
899
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
957
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
900
    stringBuffer.append(TEXT_128);
958
    stringBuffer.append(TEXT_148);
901
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
959
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
902
    stringBuffer.append(TEXT_129);
960
    stringBuffer.append(TEXT_149);
903
    
961
    
904
	}
962
	}
905
963
906
    stringBuffer.append(TEXT_130);
964
    stringBuffer.append(TEXT_150);
907
    stringBuffer.append(next.getDomainMetaClass().getName());
965
    stringBuffer.append(next.getDomainMetaClass().getName());
908
    stringBuffer.append(next.getVisualID());
966
    stringBuffer.append(next.getVisualID());
909
    stringBuffer.append(TEXT_131);
967
    stringBuffer.append(TEXT_151);
910
    if (next.getDomainMetaClass().isExternalInterface()) {
968
    if (next.getDomainMetaClass().isExternalInterface()) {
911
    stringBuffer.append(TEXT_132);
969
    stringBuffer.append(TEXT_152);
912
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
970
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
913
    stringBuffer.append(TEXT_133);
971
    stringBuffer.append(TEXT_153);
914
    }
972
    }
915
    stringBuffer.append(TEXT_134);
973
    stringBuffer.append(TEXT_154);
916
    if(!isListLayout) {
974
    if(!isListLayout) {
917
    stringBuffer.append(TEXT_135);
975
    stringBuffer.append(TEXT_155);
918
    }
976
    }
919
    stringBuffer.append(TEXT_136);
977
    stringBuffer.append(TEXT_156);
920
    
978
    
921
}
979
}
922
980
923
    
981
    
924
}
982
}
925
983
926
    stringBuffer.append(TEXT_137);
984
    stringBuffer.append(TEXT_157);
927
    stringBuffer.append(TEXT_138);
985
    stringBuffer.append(TEXT_158);
928
    stringBuffer.append(TEXT_139);
986
    stringBuffer.append(TEXT_159);
929
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
987
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
930
    stringBuffer.append(TEXT_140);
988
    stringBuffer.append(TEXT_160);
931
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
989
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
932
    stringBuffer.append(TEXT_141);
990
    stringBuffer.append(TEXT_161);
933
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
991
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
934
    stringBuffer.append(TEXT_142);
992
    stringBuffer.append(TEXT_162);
935
    stringBuffer.append(TEXT_143);
993
    stringBuffer.append(TEXT_163);
936
    stringBuffer.append(TEXT_144);
994
    stringBuffer.append(TEXT_164);
937
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
995
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
938
    stringBuffer.append(TEXT_145);
996
    stringBuffer.append(TEXT_165);
939
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
997
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
940
    stringBuffer.append(TEXT_146);
998
    stringBuffer.append(TEXT_166);
941
    
999
    
942
//link notation model refresher should always be installed for the diagram edit part, because it tracks the uncontained links
1000
//link notation model refresher should always be installed for the diagram edit part, because it tracks the uncontained links
943
//if (myHelper.containsLinks()) {
1001
//if (myHelper.containsLinks()) {
944
1002
945
    stringBuffer.append(TEXT_147);
1003
    stringBuffer.append(TEXT_167);
946
    
1004
    
947
//}
1005
//}
948
1006
949
    stringBuffer.append(TEXT_148);
1007
    stringBuffer.append(TEXT_168);
950
    
1008
    
951
//link notation model refresher should always be installed/uninstalled for the diagram edit part, because it tracks the uncontained links
1009
//link notation model refresher should always be installed/uninstalled for the diagram edit part, because it tracks the uncontained links
952
//if (myHelper.containsLinks()) {
1010
//if (myHelper.containsLinks()) {
953
1011
954
    stringBuffer.append(TEXT_149);
1012
    stringBuffer.append(TEXT_169);
955
    
1013
    
956
//}
1014
//}
957
1015
958
    stringBuffer.append(TEXT_150);
1016
    stringBuffer.append(TEXT_170);
959
    
1017
    
960
{
1018
{
961
String _getDiagramCode = "getDiagram()";
1019
String _getDiagramCode = "getDiagram()";
Lines 963-984 Link Here
963
boolean isListLayout = false;
1021
boolean isListLayout = false;
964
final boolean _includeUncontainedLinks = true;
1022
final boolean _includeUncontainedLinks = true;
965
1023
966
    stringBuffer.append(TEXT_151);
1024
    stringBuffer.append(TEXT_171);
967
    stringBuffer.append(TEXT_152);
1025
    stringBuffer.append(TEXT_172);
968
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
1026
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
969
    stringBuffer.append(TEXT_153);
1027
    stringBuffer.append(TEXT_173);
970
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1028
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
971
    stringBuffer.append(TEXT_154);
1029
    stringBuffer.append(TEXT_174);
972
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1030
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
973
    stringBuffer.append(TEXT_155);
1031
    stringBuffer.append(TEXT_175);
974
    stringBuffer.append(_getDiagramCode);
1032
    stringBuffer.append(_getDiagramCode);
975
    stringBuffer.append(TEXT_156);
1033
    stringBuffer.append(TEXT_176);
976
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
1034
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
977
    stringBuffer.append(TEXT_157);
1035
    stringBuffer.append(TEXT_177);
978
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
1036
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
979
    stringBuffer.append(TEXT_158);
1037
    stringBuffer.append(TEXT_178);
980
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
1038
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
981
    stringBuffer.append(TEXT_159);
1039
    stringBuffer.append(TEXT_179);
982
    
1040
    
983
boolean hasConstraintsInChildren = false;
1041
boolean hasConstraintsInChildren = false;
984
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
1042
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
Lines 993-1011 Link Here
993
    
1051
    
994
if (hasConstraintsInChildren) {
1052
if (hasConstraintsInChildren) {
995
1053
996
    stringBuffer.append(TEXT_160);
1054
    stringBuffer.append(TEXT_180);
997
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
1055
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
998
    stringBuffer.append(TEXT_161);
1056
    stringBuffer.append(TEXT_181);
999
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1057
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1000
    stringBuffer.append(TEXT_162);
1058
    stringBuffer.append(TEXT_182);
1001
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1059
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1002
    stringBuffer.append(TEXT_163);
1060
    stringBuffer.append(TEXT_183);
1003
    
1061
    
1004
}
1062
}
1005
1063
1006
    stringBuffer.append(TEXT_164);
1064
    stringBuffer.append(TEXT_184);
1007
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1065
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1008
    stringBuffer.append(TEXT_165);
1066
    stringBuffer.append(TEXT_185);
1009
    
1067
    
1010
{
1068
{
1011
	boolean hasDeclaredFilter = false;
1069
	boolean hasDeclaredFilter = false;
Lines 1024-1048 Link Here
1024
		if (!hasDeclaredFilter) {
1082
		if (!hasDeclaredFilter) {
1025
			hasDeclaredFilter = true;
1083
			hasDeclaredFilter = true;
1026
1084
1027
    stringBuffer.append(TEXT_166);
1085
    stringBuffer.append(TEXT_186);
1028
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1086
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1029
    stringBuffer.append(TEXT_167);
1087
    stringBuffer.append(TEXT_187);
1030
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1088
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1031
    stringBuffer.append(TEXT_168);
1089
    stringBuffer.append(TEXT_188);
1032
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1090
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1033
    stringBuffer.append(TEXT_169);
1091
    stringBuffer.append(TEXT_189);
1034
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
1092
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
1035
    stringBuffer.append(TEXT_170);
1093
    stringBuffer.append(TEXT_190);
1036
    
1094
    
1037
		} else {
1095
		} else {
1038
1096
1039
    stringBuffer.append(TEXT_171);
1097
    stringBuffer.append(TEXT_191);
1040
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1098
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1041
    stringBuffer.append(TEXT_172);
1099
    stringBuffer.append(TEXT_192);
1042
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1100
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1043
    stringBuffer.append(TEXT_173);
1101
    stringBuffer.append(TEXT_193);
1044
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
1102
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
1045
    stringBuffer.append(TEXT_174);
1103
    stringBuffer.append(TEXT_194);
1046
    
1104
    
1047
		}
1105
		}
1048
	}	//for
1106
	}	//for
Lines 1050-1071 Link Here
1050
    
1108
    
1051
	if (hasDeclaredFilter) {
1109
	if (hasDeclaredFilter) {
1052
1110
1053
    stringBuffer.append(TEXT_175);
1111
    stringBuffer.append(TEXT_195);
1054
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1112
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1055
    stringBuffer.append(TEXT_176);
1113
    stringBuffer.append(TEXT_196);
1056
    stringBuffer.append(_getViewCode);
1114
    stringBuffer.append(_getViewCode);
1057
    stringBuffer.append(TEXT_177);
1115
    stringBuffer.append(TEXT_197);
1058
    
1116
    
1059
	} else {
1117
	} else {
1060
		hasDeclaredFilter = true;
1118
		hasDeclaredFilter = true;
1061
1119
1062
    stringBuffer.append(TEXT_178);
1120
    stringBuffer.append(TEXT_198);
1063
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1121
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1064
    stringBuffer.append(TEXT_179);
1122
    stringBuffer.append(TEXT_199);
1065
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1123
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1066
    stringBuffer.append(TEXT_180);
1124
    stringBuffer.append(TEXT_200);
1067
    stringBuffer.append(_getViewCode);
1125
    stringBuffer.append(_getViewCode);
1068
    stringBuffer.append(TEXT_181);
1126
    stringBuffer.append(TEXT_201);
1069
    
1127
    
1070
	}
1128
	}
1071
1129
Lines 1074-1110 Link Here
1074
		if (hasDeclaredFilter) {
1132
		if (hasDeclaredFilter) {
1075
			hasDeclaredFilter = true;
1133
			hasDeclaredFilter = true;
1076
1134
1077
    stringBuffer.append(TEXT_182);
1135
    stringBuffer.append(TEXT_202);
1078
    
1136
    
1079
		} else {
1137
		} else {
1080
1138
1081
    stringBuffer.append(TEXT_183);
1139
    stringBuffer.append(TEXT_203);
1082
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1140
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1083
    stringBuffer.append(TEXT_184);
1141
    stringBuffer.append(TEXT_204);
1084
    
1142
    
1085
		}
1143
		}
1086
	}
1144
	}
1087
	if (!hasDeclaredFilter) {
1145
	if (!hasDeclaredFilter) {
1088
1146
1089
    stringBuffer.append(TEXT_185);
1147
    stringBuffer.append(TEXT_205);
1090
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1148
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1091
    stringBuffer.append(TEXT_186);
1149
    stringBuffer.append(TEXT_206);
1092
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1150
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1093
    stringBuffer.append(TEXT_187);
1151
    stringBuffer.append(TEXT_207);
1094
    
1152
    
1095
	}
1153
	}
1096
1154
1097
    stringBuffer.append(TEXT_188);
1155
    stringBuffer.append(TEXT_208);
1098
    
1156
    
1099
}	//local declaration of hasDeclaredFilter
1157
}	//local declaration of hasDeclaredFilter
1100
1158
1101
    stringBuffer.append(TEXT_189);
1159
    stringBuffer.append(TEXT_209);
1102
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
1160
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
1103
    stringBuffer.append(TEXT_190);
1161
    stringBuffer.append(TEXT_210);
1104
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1162
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1105
    stringBuffer.append(TEXT_191);
1163
    stringBuffer.append(TEXT_211);
1106
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1164
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1107
    stringBuffer.append(TEXT_192);
1165
    stringBuffer.append(TEXT_212);
1108
    
1166
    
1109
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
1167
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
1110
	GenNode nextNode = (GenNode) it.next();
1168
	GenNode nextNode = (GenNode) it.next();
Lines 1114-1152 Link Here
1114
	}
1172
	}
1115
	String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName());
1173
	String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName());
1116
1174
1117
    stringBuffer.append(TEXT_193);
1175
    stringBuffer.append(TEXT_213);
1118
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
1176
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
1119
    stringBuffer.append(TEXT_194);
1177
    stringBuffer.append(TEXT_214);
1120
    stringBuffer.append(childNodeInterfaceName);
1178
    stringBuffer.append(childNodeInterfaceName);
1121
    stringBuffer.append(TEXT_195);
1179
    stringBuffer.append(TEXT_215);
1122
    stringBuffer.append(nextNode.getDomainMetaClass().getName());
1180
    stringBuffer.append(nextNode.getDomainMetaClass().getName());
1123
    stringBuffer.append(nextNode.getVisualID());
1181
    stringBuffer.append(nextNode.getVisualID());
1124
    stringBuffer.append(TEXT_196);
1182
    stringBuffer.append(TEXT_216);
1125
    if (!isListLayout) {
1183
    if (!isListLayout) {
1126
    stringBuffer.append(TEXT_197);
1184
    stringBuffer.append(TEXT_217);
1127
    }
1185
    }
1128
    stringBuffer.append(TEXT_198);
1186
    stringBuffer.append(TEXT_218);
1129
    
1187
    
1130
}
1188
}
1131
1189
1132
    stringBuffer.append(TEXT_199);
1190
    stringBuffer.append(TEXT_219);
1133
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1191
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1134
    stringBuffer.append(TEXT_200);
1192
    stringBuffer.append(TEXT_220);
1135
    stringBuffer.append(TEXT_201);
1193
    stringBuffer.append(TEXT_221);
1136
    
1194
    
1137
if (childNodes.size() == 0) {
1195
if (childNodes.size() == 0) {
1138
1196
1139
    stringBuffer.append(TEXT_202);
1197
    stringBuffer.append(TEXT_222);
1140
    stringBuffer.append(importManager.getImportedName("java.util.Collections"));
1198
    stringBuffer.append(importManager.getImportedName("java.util.Collections"));
1141
    stringBuffer.append(TEXT_203);
1199
    stringBuffer.append(TEXT_223);
1142
    
1200
    
1143
} else {
1201
} else {
1144
1202
1145
    stringBuffer.append(TEXT_204);
1203
    stringBuffer.append(TEXT_224);
1146
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1204
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1147
    stringBuffer.append(TEXT_205);
1205
    stringBuffer.append(TEXT_225);
1148
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
1206
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
1149
    stringBuffer.append(TEXT_206);
1207
    stringBuffer.append(TEXT_226);
1150
    
1208
    
1151
	Map genFeature2genNodeMap = new LinkedHashMap();
1209
	Map genFeature2genNodeMap = new LinkedHashMap();
1152
	for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) {
1210
	for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) {
Lines 1164-1178 Link Here
1164
	Set entrySet = genFeature2genNodeMap.entrySet();
1222
	Set entrySet = genFeature2genNodeMap.entrySet();
1165
	if (entrySet.size() > 0) {
1223
	if (entrySet.size() > 0) {
1166
1224
1167
    stringBuffer.append(TEXT_207);
1225
    stringBuffer.append(TEXT_227);
1168
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1226
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1169
    stringBuffer.append(TEXT_208);
1227
    stringBuffer.append(TEXT_228);
1170
    stringBuffer.append(_getViewCode);
1228
    stringBuffer.append(_getViewCode);
1171
    stringBuffer.append(TEXT_209);
1229
    stringBuffer.append(TEXT_229);
1172
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1230
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1173
    stringBuffer.append(TEXT_210);
1231
    stringBuffer.append(TEXT_230);
1174
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1232
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1175
    stringBuffer.append(TEXT_211);
1233
    stringBuffer.append(TEXT_231);
1176
    
1234
    
1177
	}
1235
	}
1178
	for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
1236
	for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
Lines 1181-1304 Link Here
1181
		Collection genNodesCollection = (Collection) nextEntry.getValue();
1239
		Collection genNodesCollection = (Collection) nextEntry.getValue();
1182
		if (childMetaFeature.isListType()) {
1240
		if (childMetaFeature.isListType()) {
1183
1241
1184
    stringBuffer.append(TEXT_212);
1242
    stringBuffer.append(TEXT_232);
1185
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1243
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1186
    stringBuffer.append(TEXT_213);
1244
    stringBuffer.append(TEXT_233);
1187
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true);
1245
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true);
1188
    stringBuffer.append(TEXT_214);
1246
    stringBuffer.append(TEXT_234);
1189
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1247
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1190
    stringBuffer.append(TEXT_215);
1248
    stringBuffer.append(TEXT_235);
1191
    
1249
    
1192
		} else {
1250
		} else {
1193
1251
1194
    stringBuffer.append(TEXT_216);
1252
    stringBuffer.append(TEXT_236);
1195
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1253
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1196
    stringBuffer.append(TEXT_217);
1254
    stringBuffer.append(TEXT_237);
1197
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false);
1255
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false);
1198
    stringBuffer.append(TEXT_218);
1256
    stringBuffer.append(TEXT_238);
1199
    
1257
    
1200
	}
1258
	}
1201
1259
1202
    stringBuffer.append(TEXT_219);
1260
    stringBuffer.append(TEXT_239);
1203
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1261
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1204
    stringBuffer.append(TEXT_220);
1262
    stringBuffer.append(TEXT_240);
1205
    
1263
    
1206
	boolean generateSwitch = genNodesCollection.size() != 1;
1264
	boolean generateSwitch = genNodesCollection.size() != 1;
1207
	if (generateSwitch) {
1265
	if (generateSwitch) {
1208
1266
1209
    stringBuffer.append(TEXT_221);
1267
    stringBuffer.append(TEXT_241);
1210
    
1268
    
1211
	}
1269
	}
1212
	for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
1270
	for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
1213
		GenNode nextNode = (GenNode) genNodesIterator.next();
1271
		GenNode nextNode = (GenNode) genNodesIterator.next();
1214
		if (generateSwitch) {
1272
		if (generateSwitch) {
1215
1273
1216
    stringBuffer.append(TEXT_222);
1274
    stringBuffer.append(TEXT_242);
1217
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
1275
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
1218
    stringBuffer.append(TEXT_223);
1276
    stringBuffer.append(TEXT_243);
1219
    
1277
    
1220
		} else {
1278
		} else {
1221
1279
1222
    stringBuffer.append(TEXT_224);
1280
    stringBuffer.append(TEXT_244);
1223
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
1281
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
1224
    stringBuffer.append(TEXT_225);
1282
    stringBuffer.append(TEXT_245);
1225
    
1283
    
1226
		}
1284
		}
1227
1285
1228
    stringBuffer.append(TEXT_226);
1286
    stringBuffer.append(TEXT_246);
1229
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1287
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1230
    stringBuffer.append(TEXT_227);
1288
    stringBuffer.append(TEXT_247);
1231
    
1289
    
1232
		if (generateSwitch) {
1290
		if (generateSwitch) {
1233
1291
1234
    stringBuffer.append(TEXT_228);
1292
    stringBuffer.append(TEXT_248);
1235
    
1293
    
1236
		} else {
1294
		} else {
1237
1295
1238
    stringBuffer.append(TEXT_229);
1296
    stringBuffer.append(TEXT_249);
1239
    
1297
    
1240
		}
1298
		}
1241
	}
1299
	}
1242
	if (generateSwitch) {
1300
	if (generateSwitch) {
1243
1301
1244
    stringBuffer.append(TEXT_230);
1302
    stringBuffer.append(TEXT_250);
1245
    
1303
    
1246
	}
1304
	}
1247
	if (childMetaFeature.isListType()) {
1305
	if (childMetaFeature.isListType()) {
1248
1306
1249
    stringBuffer.append(TEXT_231);
1307
    stringBuffer.append(TEXT_251);
1250
    
1308
    
1251
	}
1309
	}
1252
}
1310
}
1253
1311
1254
    stringBuffer.append(TEXT_232);
1312
    stringBuffer.append(TEXT_252);
1255
    
1313
    
1256
}
1314
}
1257
1315
1258
    stringBuffer.append(TEXT_233);
1316
    stringBuffer.append(TEXT_253);
1259
    stringBuffer.append(genDiagram.isSynchronized());
1317
    stringBuffer.append(genDiagram.isSynchronized());
1260
    stringBuffer.append(TEXT_234);
1318
    stringBuffer.append(TEXT_254);
1261
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1319
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1262
    stringBuffer.append(TEXT_235);
1320
    stringBuffer.append(TEXT_255);
1263
    stringBuffer.append(genDiagram.isSynchronized());
1321
    stringBuffer.append(genDiagram.isSynchronized());
1264
    stringBuffer.append(TEXT_236);
1322
    stringBuffer.append(TEXT_256);
1265
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1323
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1266
    stringBuffer.append(TEXT_237);
1324
    stringBuffer.append(TEXT_257);
1267
    stringBuffer.append(_getViewCode);
1325
    stringBuffer.append(_getViewCode);
1268
    stringBuffer.append(TEXT_238);
1326
    stringBuffer.append(TEXT_258);
1269
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
1327
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
1270
    stringBuffer.append(TEXT_239);
1328
    stringBuffer.append(TEXT_259);
1271
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1329
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1272
    stringBuffer.append(TEXT_240);
1330
    stringBuffer.append(TEXT_260);
1273
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1331
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1274
    stringBuffer.append(TEXT_241);
1332
    stringBuffer.append(TEXT_261);
1275
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1333
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1276
    stringBuffer.append(TEXT_242);
1334
    stringBuffer.append(TEXT_262);
1277
    stringBuffer.append(_getDiagramCode);
1335
    stringBuffer.append(_getDiagramCode);
1278
    stringBuffer.append(TEXT_243);
1336
    stringBuffer.append(TEXT_263);
1279
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1337
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1280
    stringBuffer.append(TEXT_244);
1338
    stringBuffer.append(TEXT_264);
1281
    stringBuffer.append(TEXT_245);
1339
    stringBuffer.append(TEXT_265);
1282
    
1340
    
1283
if (myHelper.containsLinks() || _includeUncontainedLinks) {
1341
if (myHelper.containsLinks() || _includeUncontainedLinks) {
1284
1342
1285
    stringBuffer.append(TEXT_246);
1343
    stringBuffer.append(TEXT_266);
1286
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1344
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1287
    stringBuffer.append(TEXT_247);
1345
    stringBuffer.append(TEXT_267);
1288
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1346
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1289
    stringBuffer.append(TEXT_248);
1347
    stringBuffer.append(TEXT_268);
1290
    stringBuffer.append(_getDiagramCode);
1348
    stringBuffer.append(_getDiagramCode);
1291
    stringBuffer.append(TEXT_249);
1349
    stringBuffer.append(TEXT_269);
1292
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
1350
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
1293
    stringBuffer.append(TEXT_250);
1351
    stringBuffer.append(TEXT_270);
1294
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
1352
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
1295
    stringBuffer.append(TEXT_251);
1353
    stringBuffer.append(TEXT_271);
1296
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService"));
1354
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService"));
1297
    stringBuffer.append(TEXT_252);
1355
    stringBuffer.append(TEXT_272);
1298
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher"));
1356
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher"));
1299
    stringBuffer.append(TEXT_253);
1357
    stringBuffer.append(TEXT_273);
1300
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
1358
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
1301
    stringBuffer.append(TEXT_254);
1359
    stringBuffer.append(TEXT_274);
1302
    
1360
    
1303
	boolean hasConstraintsInContainedLinks = false;
1361
	boolean hasConstraintsInContainedLinks = false;
1304
	for (Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
1362
	for (Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
Lines 1311-1352 Link Here
1311
	}
1369
	}
1312
	if (hasConstraintsInContainedLinks) {
1370
	if (hasConstraintsInContainedLinks) {
1313
1371
1314
    stringBuffer.append(TEXT_255);
1372
    stringBuffer.append(TEXT_275);
1315
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
1373
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
1316
    stringBuffer.append(TEXT_256);
1374
    stringBuffer.append(TEXT_276);
1317
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1375
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1318
    stringBuffer.append(TEXT_257);
1376
    stringBuffer.append(TEXT_277);
1319
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1377
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1320
    stringBuffer.append(TEXT_258);
1378
    stringBuffer.append(TEXT_278);
1321
    
1379
    
1322
	}
1380
	}
1323
	if (_includeUncontainedLinks) {
1381
	if (_includeUncontainedLinks) {
1324
1382
1325
    stringBuffer.append(TEXT_259);
1383
    stringBuffer.append(TEXT_279);
1326
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1384
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1327
    stringBuffer.append(TEXT_260);
1385
    stringBuffer.append(TEXT_280);
1328
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1386
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1329
    stringBuffer.append(TEXT_261);
1387
    stringBuffer.append(TEXT_281);
1330
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1388
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1331
    stringBuffer.append(TEXT_262);
1389
    stringBuffer.append(TEXT_282);
1332
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1390
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1333
    stringBuffer.append(TEXT_263);
1391
    stringBuffer.append(TEXT_283);
1334
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1392
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1335
    stringBuffer.append(TEXT_264);
1393
    stringBuffer.append(TEXT_284);
1336
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1394
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1337
    stringBuffer.append(TEXT_265);
1395
    stringBuffer.append(TEXT_285);
1338
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1396
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1339
    stringBuffer.append(TEXT_266);
1397
    stringBuffer.append(TEXT_286);
1340
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1398
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1341
    stringBuffer.append(TEXT_267);
1399
    stringBuffer.append(TEXT_287);
1342
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1400
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
1343
    stringBuffer.append(TEXT_268);
1401
    stringBuffer.append(TEXT_288);
1344
    
1402
    
1345
	}
1403
	}
1346
1404
1347
    stringBuffer.append(TEXT_269);
1405
    stringBuffer.append(TEXT_289);
1348
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1406
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1349
    stringBuffer.append(TEXT_270);
1407
    stringBuffer.append(TEXT_290);
1350
    
1408
    
1351
	{
1409
	{
1352
		boolean hasDeclaredFilter = false;
1410
		boolean hasDeclaredFilter = false;
Lines 1359-1365 Link Here
1359
			}
1417
			}
1360
			GenFeature _feature = modelFacet.getChildMetaFeature();
1418
			GenFeature _feature = modelFacet.getChildMetaFeature();
1361
1419
1362
    stringBuffer.append(TEXT_271);
1420
    stringBuffer.append(TEXT_291);
1363
    
1421
    
1364
	/*
1422
	/*
1365
	 * input: 
1423
	 * input: 
Lines 1373-1404 Link Here
1373
	if (!hasDeclaredFilter) {
1431
	if (!hasDeclaredFilter) {
1374
		hasDeclaredFilter = true;
1432
		hasDeclaredFilter = true;
1375
1433
1376
    stringBuffer.append(TEXT_272);
1434
    stringBuffer.append(TEXT_292);
1377
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1435
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1378
    stringBuffer.append(TEXT_273);
1436
    stringBuffer.append(TEXT_293);
1379
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1437
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1380
    stringBuffer.append(TEXT_274);
1438
    stringBuffer.append(TEXT_294);
1381
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1439
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1382
    stringBuffer.append(TEXT_275);
1440
    stringBuffer.append(TEXT_295);
1383
    stringBuffer.append(_feature.getFeatureAccessorName());
1441
    stringBuffer.append(_feature.getFeatureAccessorName());
1384
    stringBuffer.append(TEXT_276);
1442
    stringBuffer.append(TEXT_296);
1385
    
1443
    
1386
	} else {
1444
	} else {
1387
1445
1388
    stringBuffer.append(TEXT_277);
1446
    stringBuffer.append(TEXT_297);
1389
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1447
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1390
    stringBuffer.append(TEXT_278);
1448
    stringBuffer.append(TEXT_298);
1391
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1449
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1392
    stringBuffer.append(TEXT_279);
1450
    stringBuffer.append(TEXT_299);
1393
    stringBuffer.append(_feature.getFeatureAccessorName());
1451
    stringBuffer.append(_feature.getFeatureAccessorName());
1394
    stringBuffer.append(TEXT_280);
1452
    stringBuffer.append(TEXT_300);
1395
    
1453
    
1396
	}
1454
	}
1397
1455
1398
    
1456
    
1399
			_feature = modelFacet.getSourceMetaFeature();
1457
			_feature = modelFacet.getSourceMetaFeature();
1400
1458
1401
    stringBuffer.append(TEXT_281);
1459
    stringBuffer.append(TEXT_301);
1402
    
1460
    
1403
	/*
1461
	/*
1404
	 * input: 
1462
	 * input: 
Lines 1412-1443 Link Here
1412
	if (!hasDeclaredFilter) {
1470
	if (!hasDeclaredFilter) {
1413
		hasDeclaredFilter = true;
1471
		hasDeclaredFilter = true;
1414
1472
1415
    stringBuffer.append(TEXT_282);
1473
    stringBuffer.append(TEXT_302);
1416
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1474
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1417
    stringBuffer.append(TEXT_283);
1475
    stringBuffer.append(TEXT_303);
1418
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1476
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1419
    stringBuffer.append(TEXT_284);
1477
    stringBuffer.append(TEXT_304);
1420
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1478
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1421
    stringBuffer.append(TEXT_285);
1479
    stringBuffer.append(TEXT_305);
1422
    stringBuffer.append(_feature.getFeatureAccessorName());
1480
    stringBuffer.append(_feature.getFeatureAccessorName());
1423
    stringBuffer.append(TEXT_286);
1481
    stringBuffer.append(TEXT_306);
1424
    
1482
    
1425
	} else {
1483
	} else {
1426
1484
1427
    stringBuffer.append(TEXT_287);
1485
    stringBuffer.append(TEXT_307);
1428
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1486
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1429
    stringBuffer.append(TEXT_288);
1487
    stringBuffer.append(TEXT_308);
1430
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1488
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1431
    stringBuffer.append(TEXT_289);
1489
    stringBuffer.append(TEXT_309);
1432
    stringBuffer.append(_feature.getFeatureAccessorName());
1490
    stringBuffer.append(_feature.getFeatureAccessorName());
1433
    stringBuffer.append(TEXT_290);
1491
    stringBuffer.append(TEXT_310);
1434
    
1492
    
1435
	}
1493
	}
1436
1494
1437
    
1495
    
1438
			_feature = modelFacet.getTargetMetaFeature();
1496
			_feature = modelFacet.getTargetMetaFeature();
1439
1497
1440
    stringBuffer.append(TEXT_291);
1498
    stringBuffer.append(TEXT_311);
1441
    
1499
    
1442
	/*
1500
	/*
1443
	 * input: 
1501
	 * input: 
Lines 1451-1475 Link Here
1451
	if (!hasDeclaredFilter) {
1509
	if (!hasDeclaredFilter) {
1452
		hasDeclaredFilter = true;
1510
		hasDeclaredFilter = true;
1453
1511
1454
    stringBuffer.append(TEXT_292);
1512
    stringBuffer.append(TEXT_312);
1455
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1513
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1456
    stringBuffer.append(TEXT_293);
1514
    stringBuffer.append(TEXT_313);
1457
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1515
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1458
    stringBuffer.append(TEXT_294);
1516
    stringBuffer.append(TEXT_314);
1459
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1517
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1460
    stringBuffer.append(TEXT_295);
1518
    stringBuffer.append(TEXT_315);
1461
    stringBuffer.append(_feature.getFeatureAccessorName());
1519
    stringBuffer.append(_feature.getFeatureAccessorName());
1462
    stringBuffer.append(TEXT_296);
1520
    stringBuffer.append(TEXT_316);
1463
    
1521
    
1464
	} else {
1522
	} else {
1465
1523
1466
    stringBuffer.append(TEXT_297);
1524
    stringBuffer.append(TEXT_317);
1467
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1525
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1468
    stringBuffer.append(TEXT_298);
1526
    stringBuffer.append(TEXT_318);
1469
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1527
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1470
    stringBuffer.append(TEXT_299);
1528
    stringBuffer.append(TEXT_319);
1471
    stringBuffer.append(_feature.getFeatureAccessorName());
1529
    stringBuffer.append(_feature.getFeatureAccessorName());
1472
    stringBuffer.append(TEXT_300);
1530
    stringBuffer.append(TEXT_320);
1473
    
1531
    
1474
	}
1532
	}
1475
1533
Lines 1479-1485 Link Here
1479
			GenLink nextLink = (GenLink) it.next();
1537
			GenLink nextLink = (GenLink) it.next();
1480
			GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature();
1538
			GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature();
1481
1539
1482
    stringBuffer.append(TEXT_301);
1540
    stringBuffer.append(TEXT_321);
1483
    
1541
    
1484
	/*
1542
	/*
1485
	 * input: 
1543
	 * input: 
Lines 1493-1517 Link Here
1493
	if (!hasDeclaredFilter) {
1551
	if (!hasDeclaredFilter) {
1494
		hasDeclaredFilter = true;
1552
		hasDeclaredFilter = true;
1495
1553
1496
    stringBuffer.append(TEXT_302);
1554
    stringBuffer.append(TEXT_322);
1497
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1555
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1498
    stringBuffer.append(TEXT_303);
1556
    stringBuffer.append(TEXT_323);
1499
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1557
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1500
    stringBuffer.append(TEXT_304);
1558
    stringBuffer.append(TEXT_324);
1501
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1559
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1502
    stringBuffer.append(TEXT_305);
1560
    stringBuffer.append(TEXT_325);
1503
    stringBuffer.append(_feature.getFeatureAccessorName());
1561
    stringBuffer.append(_feature.getFeatureAccessorName());
1504
    stringBuffer.append(TEXT_306);
1562
    stringBuffer.append(TEXT_326);
1505
    
1563
    
1506
	} else {
1564
	} else {
1507
1565
1508
    stringBuffer.append(TEXT_307);
1566
    stringBuffer.append(TEXT_327);
1509
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1567
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1510
    stringBuffer.append(TEXT_308);
1568
    stringBuffer.append(TEXT_328);
1511
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1569
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
1512
    stringBuffer.append(TEXT_309);
1570
    stringBuffer.append(TEXT_329);
1513
    stringBuffer.append(_feature.getFeatureAccessorName());
1571
    stringBuffer.append(_feature.getFeatureAccessorName());
1514
    stringBuffer.append(TEXT_310);
1572
    stringBuffer.append(TEXT_330);
1515
    
1573
    
1516
	}
1574
	}
1517
1575
Lines 1520-1578 Link Here
1520
		if (hasConstraintsInContainedLinks) {
1578
		if (hasConstraintsInContainedLinks) {
1521
			if (hasDeclaredFilter) {
1579
			if (hasDeclaredFilter) {
1522
1580
1523
    stringBuffer.append(TEXT_311);
1581
    stringBuffer.append(TEXT_331);
1524
    
1582
    
1525
			} else {
1583
			} else {
1526
				hasDeclaredFilter = true;
1584
				hasDeclaredFilter = true;
1527
1585
1528
    stringBuffer.append(TEXT_312);
1586
    stringBuffer.append(TEXT_332);
1529
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1587
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1530
    stringBuffer.append(TEXT_313);
1588
    stringBuffer.append(TEXT_333);
1531
    
1589
    
1532
			}
1590
			}
1533
		}
1591
		}
1534
		if (_includeUncontainedLinks) {
1592
		if (_includeUncontainedLinks) {
1535
			if (hasDeclaredFilter) {
1593
			if (hasDeclaredFilter) {
1536
1594
1537
    stringBuffer.append(TEXT_314);
1595
    stringBuffer.append(TEXT_334);
1538
    
1596
    
1539
			} else {
1597
			} else {
1540
				hasDeclaredFilter = true;
1598
				hasDeclaredFilter = true;
1541
1599
1542
    stringBuffer.append(TEXT_315);
1600
    stringBuffer.append(TEXT_335);
1543
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1601
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1544
    stringBuffer.append(TEXT_316);
1602
    stringBuffer.append(TEXT_336);
1545
    
1603
    
1546
			}
1604
			}
1547
		}
1605
		}
1548
		if (!hasDeclaredFilter) {
1606
		if (!hasDeclaredFilter) {
1549
1607
1550
    stringBuffer.append(TEXT_317);
1608
    stringBuffer.append(TEXT_337);
1551
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1609
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1552
    stringBuffer.append(TEXT_318);
1610
    stringBuffer.append(TEXT_338);
1553
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1611
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
1554
    stringBuffer.append(TEXT_319);
1612
    stringBuffer.append(TEXT_339);
1555
    
1613
    
1556
		}
1614
		}
1557
	}	//local declaration of hasDeclaredFilter
1615
	}	//local declaration of hasDeclaredFilter
1558
1616
1559
    stringBuffer.append(TEXT_320);
1617
    stringBuffer.append(TEXT_340);
1560
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
1618
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
1561
    stringBuffer.append(TEXT_321);
1619
    stringBuffer.append(TEXT_341);
1562
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1620
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1563
    stringBuffer.append(TEXT_322);
1621
    stringBuffer.append(TEXT_342);
1564
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1622
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1565
    stringBuffer.append(TEXT_323);
1623
    stringBuffer.append(TEXT_343);
1566
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1624
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1567
    stringBuffer.append(TEXT_324);
1625
    stringBuffer.append(TEXT_344);
1568
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1626
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1569
    stringBuffer.append(TEXT_325);
1627
    stringBuffer.append(TEXT_345);
1570
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1628
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1571
    stringBuffer.append(TEXT_326);
1629
    stringBuffer.append(TEXT_346);
1572
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1630
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1573
    stringBuffer.append(TEXT_327);
1631
    stringBuffer.append(TEXT_347);
1574
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
1632
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
1575
    stringBuffer.append(TEXT_328);
1633
    stringBuffer.append(TEXT_348);
1576
    
1634
    
1577
	for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
1635
	for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
1578
		GenLink nextLink = (GenLink) it.next();
1636
		GenLink nextLink = (GenLink) it.next();
Lines 1581-1617 Link Here
1581
			continue;
1639
			continue;
1582
		}
1640
		}
1583
1641
1584
    stringBuffer.append(TEXT_329);
1642
    stringBuffer.append(TEXT_349);
1585
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1643
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1586
    stringBuffer.append(TEXT_330);
1644
    stringBuffer.append(TEXT_350);
1587
    stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName()));
1645
    stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName()));
1588
    stringBuffer.append(TEXT_331);
1646
    stringBuffer.append(TEXT_351);
1589
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
1647
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
1590
    stringBuffer.append(TEXT_332);
1648
    stringBuffer.append(TEXT_352);
1591
    
1649
    
1592
	}
1650
	}
1593
	for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
1651
	for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
1594
		GenLink nextLink = (GenLink) it.next();
1652
		GenLink nextLink = (GenLink) it.next();
1595
1653
1596
    stringBuffer.append(TEXT_333);
1654
    stringBuffer.append(TEXT_353);
1597
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1655
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1598
    stringBuffer.append(TEXT_334);
1656
    stringBuffer.append(TEXT_354);
1599
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
1657
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
1600
    stringBuffer.append(TEXT_335);
1658
    stringBuffer.append(TEXT_355);
1601
    
1659
    
1602
	}
1660
	}
1603
1661
1604
    stringBuffer.append(TEXT_336);
1662
    stringBuffer.append(TEXT_356);
1605
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand"));
1663
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand"));
1606
    stringBuffer.append(TEXT_337);
1664
    stringBuffer.append(TEXT_357);
1607
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1665
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1608
    stringBuffer.append(TEXT_338);
1666
    stringBuffer.append(TEXT_358);
1609
    stringBuffer.append(TEXT_339);
1667
    stringBuffer.append(TEXT_359);
1610
    stringBuffer.append(TEXT_340);
1668
    stringBuffer.append(TEXT_360);
1611
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1669
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1612
    stringBuffer.append(TEXT_341);
1670
    stringBuffer.append(TEXT_361);
1613
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
1671
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
1614
    stringBuffer.append(TEXT_342);
1672
    stringBuffer.append(TEXT_362);
1615
    
1673
    
1616
Map genFeature2genLinkMap = new LinkedHashMap();
1674
Map genFeature2genLinkMap = new LinkedHashMap();
1617
for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
1675
for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
Lines 1634-1651 Link Here
1634
}
1692
}
1635
if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) {
1693
if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) {
1636
1694
1637
    stringBuffer.append(TEXT_343);
1695
    stringBuffer.append(TEXT_363);
1638
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1696
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1639
    stringBuffer.append(TEXT_344);
1697
    stringBuffer.append(TEXT_364);
1640
    stringBuffer.append(_getViewCode);
1698
    stringBuffer.append(_getViewCode);
1641
    stringBuffer.append(TEXT_345);
1699
    stringBuffer.append(TEXT_365);
1642
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1700
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1643
    stringBuffer.append(TEXT_346);
1701
    stringBuffer.append(TEXT_366);
1644
    
1702
    
1645
}
1703
}
1646
if (!genFeature2genLinkMap.isEmpty()) {
1704
if (!genFeature2genLinkMap.isEmpty()) {
1647
1705
1648
    stringBuffer.append(TEXT_347);
1706
    stringBuffer.append(TEXT_367);
1649
    
1707
    
1650
}
1708
}
1651
for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) {
1709
for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) {
Lines 1654-1685 Link Here
1654
	Collection genLinksCollection = (Collection) nextEntry.getValue();
1712
	Collection genLinksCollection = (Collection) nextEntry.getValue();
1655
	if (metaFeature.isListType()) {
1713
	if (metaFeature.isListType()) {
1656
1714
1657
    stringBuffer.append(TEXT_348);
1715
    stringBuffer.append(TEXT_368);
1658
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1716
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1659
    stringBuffer.append(TEXT_349);
1717
    stringBuffer.append(TEXT_369);
1660
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
1718
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
1661
    stringBuffer.append(TEXT_350);
1719
    stringBuffer.append(TEXT_370);
1662
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1720
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1663
    stringBuffer.append(TEXT_351);
1721
    stringBuffer.append(TEXT_371);
1664
    
1722
    
1665
	} else {
1723
	} else {
1666
1724
1667
    stringBuffer.append(TEXT_352);
1725
    stringBuffer.append(TEXT_372);
1668
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1726
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1669
    stringBuffer.append(TEXT_353);
1727
    stringBuffer.append(TEXT_373);
1670
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
1728
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
1671
    stringBuffer.append(TEXT_354);
1729
    stringBuffer.append(TEXT_374);
1672
    
1730
    
1673
	}
1731
	}
1674
1732
1675
    stringBuffer.append(TEXT_355);
1733
    stringBuffer.append(TEXT_375);
1676
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1734
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1677
    stringBuffer.append(TEXT_356);
1735
    stringBuffer.append(TEXT_376);
1678
    
1736
    
1679
	boolean generateSwitch = genLinksCollection.size() != 1;
1737
	boolean generateSwitch = genLinksCollection.size() != 1;
1680
	if (generateSwitch) {
1738
	if (generateSwitch) {
1681
1739
1682
    stringBuffer.append(TEXT_357);
1740
    stringBuffer.append(TEXT_377);
1683
    
1741
    
1684
	}
1742
	}
1685
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
1743
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
Lines 1687-1753 Link Here
1687
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
1745
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
1688
		if (generateSwitch) {
1746
		if (generateSwitch) {
1689
1747
1690
    stringBuffer.append(TEXT_358);
1748
    stringBuffer.append(TEXT_378);
1691
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1749
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1692
    stringBuffer.append(TEXT_359);
1750
    stringBuffer.append(TEXT_379);
1693
    
1751
    
1694
		} else {
1752
		} else {
1695
1753
1696
    stringBuffer.append(TEXT_360);
1754
    stringBuffer.append(TEXT_380);
1697
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1755
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1698
    stringBuffer.append(TEXT_361);
1756
    stringBuffer.append(TEXT_381);
1699
    
1757
    
1700
		}
1758
		}
1701
		if (modelFacet.getSourceMetaFeature() != null) {
1759
		if (modelFacet.getSourceMetaFeature() != null) {
1702
1760
1703
    stringBuffer.append(TEXT_362);
1761
    stringBuffer.append(TEXT_382);
1704
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1762
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1705
    stringBuffer.append(TEXT_363);
1763
    stringBuffer.append(TEXT_383);
1706
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1764
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1707
    stringBuffer.append(TEXT_364);
1765
    stringBuffer.append(TEXT_384);
1708
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false);
1766
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false);
1709
    stringBuffer.append(TEXT_365);
1767
    stringBuffer.append(TEXT_385);
1710
    
1768
    
1711
		} else {
1769
		} else {
1712
1770
1713
    stringBuffer.append(TEXT_366);
1771
    stringBuffer.append(TEXT_386);
1714
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1772
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1715
    stringBuffer.append(TEXT_367);
1773
    stringBuffer.append(TEXT_387);
1716
    stringBuffer.append(_getViewCode);
1774
    stringBuffer.append(_getViewCode);
1717
    stringBuffer.append(TEXT_368);
1775
    stringBuffer.append(TEXT_388);
1718
    
1776
    
1719
		}
1777
		}
1720
		if (modelFacet.getTargetMetaFeature() != null) {
1778
		if (modelFacet.getTargetMetaFeature() != null) {
1721
1779
1722
    stringBuffer.append(TEXT_369);
1780
    stringBuffer.append(TEXT_389);
1723
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1781
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1724
    stringBuffer.append(TEXT_370);
1782
    stringBuffer.append(TEXT_390);
1725
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1783
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1726
    stringBuffer.append(TEXT_371);
1784
    stringBuffer.append(TEXT_391);
1727
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false);
1785
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false);
1728
    stringBuffer.append(TEXT_372);
1786
    stringBuffer.append(TEXT_392);
1729
    
1787
    
1730
		} else {
1788
		} else {
1731
1789
1732
    stringBuffer.append(TEXT_373);
1790
    stringBuffer.append(TEXT_393);
1733
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1791
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1734
    stringBuffer.append(TEXT_374);
1792
    stringBuffer.append(TEXT_394);
1735
    stringBuffer.append(_getViewCode);
1793
    stringBuffer.append(_getViewCode);
1736
    stringBuffer.append(TEXT_375);
1794
    stringBuffer.append(TEXT_395);
1737
    
1795
    
1738
		}
1796
		}
1739
1797
1740
    stringBuffer.append(TEXT_376);
1798
    stringBuffer.append(TEXT_396);
1741
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1799
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1742
    stringBuffer.append(TEXT_377);
1800
    stringBuffer.append(TEXT_397);
1743
    
1801
    
1744
		if (generateSwitch) {
1802
		if (generateSwitch) {
1745
1803
1746
    stringBuffer.append(TEXT_378);
1804
    stringBuffer.append(TEXT_398);
1747
    
1805
    
1748
		} else {
1806
		} else {
1749
1807
1750
    stringBuffer.append(TEXT_379);
1808
    stringBuffer.append(TEXT_399);
1751
    
1809
    
1752
		}
1810
		}
1753
1811
Lines 1755-1766 Link Here
1755
	}	//iterate over genLinksCollection
1813
	}	//iterate over genLinksCollection
1756
	if (generateSwitch) {
1814
	if (generateSwitch) {
1757
1815
1758
    stringBuffer.append(TEXT_380);
1816
    stringBuffer.append(TEXT_400);
1759
    
1817
    
1760
	}
1818
	}
1761
	if (metaFeature.isListType()) {
1819
	if (metaFeature.isListType()) {
1762
1820
1763
    stringBuffer.append(TEXT_381);
1821
    stringBuffer.append(TEXT_401);
1764
    
1822
    
1765
	}
1823
	}
1766
}
1824
}
Lines 1770-1941 Link Here
1770
	Collection genLinksCollection = (Collection) nextEntry.getValue();
1828
	Collection genLinksCollection = (Collection) nextEntry.getValue();
1771
	if (metaFeature.isListType()) {
1829
	if (metaFeature.isListType()) {
1772
1830
1773
    stringBuffer.append(TEXT_382);
1831
    stringBuffer.append(TEXT_402);
1774
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1832
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1775
    stringBuffer.append(TEXT_383);
1833
    stringBuffer.append(TEXT_403);
1776
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
1834
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
1777
    stringBuffer.append(TEXT_384);
1835
    stringBuffer.append(TEXT_404);
1778
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1836
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1779
    stringBuffer.append(TEXT_385);
1837
    stringBuffer.append(TEXT_405);
1780
    
1838
    
1781
	} else {
1839
	} else {
1782
1840
1783
    stringBuffer.append(TEXT_386);
1841
    stringBuffer.append(TEXT_406);
1784
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1842
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
1785
    stringBuffer.append(TEXT_387);
1843
    stringBuffer.append(TEXT_407);
1786
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
1844
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
1787
    stringBuffer.append(TEXT_388);
1845
    stringBuffer.append(TEXT_408);
1788
    
1846
    
1789
	}
1847
	}
1790
1848
1791
    stringBuffer.append(TEXT_389);
1849
    stringBuffer.append(TEXT_409);
1792
    
1850
    
1793
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
1851
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
1794
		GenLink nextLink = (GenLink) genLinksIterator.next();
1852
		GenLink nextLink = (GenLink) genLinksIterator.next();
1795
1853
1796
    stringBuffer.append(TEXT_390);
1854
    stringBuffer.append(TEXT_410);
1797
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1855
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
1798
    stringBuffer.append(TEXT_391);
1856
    stringBuffer.append(TEXT_411);
1799
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1857
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1800
    stringBuffer.append(TEXT_392);
1858
    stringBuffer.append(TEXT_412);
1801
    
1859
    
1802
	}
1860
	}
1803
1861
1804
    stringBuffer.append(TEXT_393);
1862
    stringBuffer.append(TEXT_413);
1805
    
1863
    
1806
	if (metaFeature.isListType()) {
1864
	if (metaFeature.isListType()) {
1807
1865
1808
    stringBuffer.append(TEXT_394);
1866
    stringBuffer.append(TEXT_414);
1809
    
1867
    
1810
	}
1868
	}
1811
}
1869
}
1812
1870
1813
    stringBuffer.append(TEXT_395);
1871
    stringBuffer.append(TEXT_415);
1814
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1872
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1815
    stringBuffer.append(TEXT_396);
1873
    stringBuffer.append(TEXT_416);
1816
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1874
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1817
    stringBuffer.append(TEXT_397);
1875
    stringBuffer.append(TEXT_417);
1818
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
1876
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
1819
    stringBuffer.append(TEXT_398);
1877
    stringBuffer.append(TEXT_418);
1820
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1878
    stringBuffer.append(importManager.getImportedName("java.util.List"));
1821
    stringBuffer.append(TEXT_399);
1879
    stringBuffer.append(TEXT_419);
1822
    stringBuffer.append(_getDiagramCode);
1880
    stringBuffer.append(_getDiagramCode);
1823
    stringBuffer.append(TEXT_400);
1881
    stringBuffer.append(TEXT_420);
1824
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1882
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
1825
    stringBuffer.append(TEXT_401);
1883
    stringBuffer.append(TEXT_421);
1826
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1884
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1827
    stringBuffer.append(TEXT_402);
1885
    stringBuffer.append(TEXT_422);
1828
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1886
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1829
    stringBuffer.append(TEXT_403);
1887
    stringBuffer.append(TEXT_423);
1830
    
1888
    
1831
	if (_includeUncontainedLinks) {
1889
	if (_includeUncontainedLinks) {
1832
1890
1833
    stringBuffer.append(TEXT_404);
1891
    stringBuffer.append(TEXT_424);
1834
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1892
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1835
    stringBuffer.append(TEXT_405);
1893
    stringBuffer.append(TEXT_425);
1836
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1894
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1837
    stringBuffer.append(TEXT_406);
1895
    stringBuffer.append(TEXT_426);
1838
    
1896
    
1839
	}
1897
	}
1840
	if (myHelper.containsFeatureModelFacetLinks()) {
1898
	if (myHelper.containsFeatureModelFacetLinks()) {
1841
1899
1842
    stringBuffer.append(TEXT_407);
1900
    stringBuffer.append(TEXT_427);
1843
    stringBuffer.append(_getViewCode);
1901
    stringBuffer.append(_getViewCode);
1844
    stringBuffer.append(TEXT_408);
1902
    stringBuffer.append(TEXT_428);
1845
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1903
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1846
    stringBuffer.append(TEXT_409);
1904
    stringBuffer.append(TEXT_429);
1847
    
1905
    
1848
		for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
1906
		for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
1849
			GenLink nextLink = (GenLink) it.next();
1907
			GenLink nextLink = (GenLink) it.next();
1850
1908
1851
    stringBuffer.append(TEXT_410);
1909
    stringBuffer.append(TEXT_430);
1852
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1910
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1853
    stringBuffer.append(TEXT_411);
1911
    stringBuffer.append(TEXT_431);
1854
    
1912
    
1855
		}
1913
		}
1856
1914
1857
    stringBuffer.append(TEXT_412);
1915
    stringBuffer.append(TEXT_432);
1858
    
1916
    
1859
		if (myHelper.containsTypeModelFacetLinks()) {
1917
		if (myHelper.containsTypeModelFacetLinks()) {
1860
1918
1861
    stringBuffer.append(TEXT_413);
1919
    stringBuffer.append(TEXT_433);
1862
    
1920
    
1863
		} else {
1921
		} else {
1864
1922
1865
    stringBuffer.append(TEXT_414);
1923
    stringBuffer.append(TEXT_434);
1866
    
1924
    
1867
		}
1925
		}
1868
	}
1926
	}
1869
	if (myHelper.containsTypeModelFacetLinks()) {
1927
	if (myHelper.containsTypeModelFacetLinks()) {
1870
		if (!myHelper.containsFeatureModelFacetLinks()) {
1928
		if (!myHelper.containsFeatureModelFacetLinks()) {
1871
1929
1872
    stringBuffer.append(TEXT_415);
1930
    stringBuffer.append(TEXT_435);
1873
    
1931
    
1874
		}
1932
		}
1875
1933
1876
    stringBuffer.append(TEXT_416);
1934
    stringBuffer.append(TEXT_436);
1877
    stringBuffer.append(_getViewCode);
1935
    stringBuffer.append(_getViewCode);
1878
    stringBuffer.append(TEXT_417);
1936
    stringBuffer.append(TEXT_437);
1879
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1937
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1880
    stringBuffer.append(TEXT_418);
1938
    stringBuffer.append(TEXT_438);
1881
    
1939
    
1882
		for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
1940
		for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
1883
			GenLink nextLink = (GenLink) it.next();
1941
			GenLink nextLink = (GenLink) it.next();
1884
1942
1885
    stringBuffer.append(TEXT_419);
1943
    stringBuffer.append(TEXT_439);
1886
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1944
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
1887
    stringBuffer.append(TEXT_420);
1945
    stringBuffer.append(TEXT_440);
1888
    
1946
    
1889
		}
1947
		}
1890
1948
1891
    stringBuffer.append(TEXT_421);
1949
    stringBuffer.append(TEXT_441);
1892
    
1950
    
1893
	}
1951
	}
1894
1952
1895
    stringBuffer.append(TEXT_422);
1953
    stringBuffer.append(TEXT_442);
1896
    stringBuffer.append(genDiagram.isSynchronized());
1954
    stringBuffer.append(genDiagram.isSynchronized());
1897
    stringBuffer.append(TEXT_423);
1955
    stringBuffer.append(TEXT_443);
1898
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1956
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
1899
    stringBuffer.append(TEXT_424);
1957
    stringBuffer.append(TEXT_444);
1900
    stringBuffer.append(genDiagram.isSynchronized());
1958
    stringBuffer.append(genDiagram.isSynchronized());
1901
    stringBuffer.append(TEXT_425);
1959
    stringBuffer.append(TEXT_445);
1902
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1960
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1903
    stringBuffer.append(TEXT_426);
1961
    stringBuffer.append(TEXT_446);
1904
    stringBuffer.append(_getViewCode);
1962
    stringBuffer.append(_getViewCode);
1905
    stringBuffer.append(TEXT_427);
1963
    stringBuffer.append(TEXT_447);
1906
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
1964
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
1907
    stringBuffer.append(TEXT_428);
1965
    stringBuffer.append(TEXT_448);
1908
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1966
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1909
    stringBuffer.append(TEXT_429);
1967
    stringBuffer.append(TEXT_449);
1910
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1968
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1911
    stringBuffer.append(TEXT_430);
1969
    stringBuffer.append(TEXT_450);
1912
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1970
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1913
    stringBuffer.append(TEXT_431);
1971
    stringBuffer.append(TEXT_451);
1914
    stringBuffer.append(_getDiagramCode);
1972
    stringBuffer.append(_getDiagramCode);
1915
    stringBuffer.append(TEXT_432);
1973
    stringBuffer.append(TEXT_452);
1916
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1974
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1917
    stringBuffer.append(TEXT_433);
1975
    stringBuffer.append(TEXT_453);
1918
    
1976
    
1919
}
1977
}
1920
1978
1921
    
1979
    
1922
}
1980
}
1923
1981
1924
    stringBuffer.append(TEXT_434);
1982
    stringBuffer.append(TEXT_454);
1925
    stringBuffer.append(TEXT_435);
1983
    stringBuffer.append(TEXT_455);
1926
    stringBuffer.append(TEXT_436);
1984
    stringBuffer.append(TEXT_456);
1927
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
1985
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
1928
    stringBuffer.append(TEXT_437);
1986
    stringBuffer.append(TEXT_457);
1929
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
1987
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
1930
    stringBuffer.append(TEXT_438);
1988
    stringBuffer.append(TEXT_458);
1931
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager"));
1989
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager"));
1932
    stringBuffer.append(TEXT_439);
1990
    stringBuffer.append(TEXT_459);
1933
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager"));
1991
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager"));
1934
    stringBuffer.append(TEXT_440);
1992
    stringBuffer.append(TEXT_460);
1935
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager"));
1993
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.UpdateManager"));
1936
    stringBuffer.append(TEXT_441);
1994
    stringBuffer.append(TEXT_461);
1937
    importManager.emitSortedImports();
1995
    importManager.emitSortedImports();
1938
    stringBuffer.append(TEXT_442);
1996
    stringBuffer.append(TEXT_462);
1939
    return stringBuffer.toString();
1997
    return stringBuffer.toString();
1940
  }
1998
  }
1941
}
1999
}
(-)src-templates/org/eclipse/gmf/codegen/templates/lite/parts/NodeEditPartGenerator.java (-2239 / +3211 lines)
Lines 50-1091 Link Here
50
  protected final String TEXT_29 = ";";
50
  protected final String TEXT_29 = ";";
51
  protected final String TEXT_30 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
51
  protected final String TEXT_30 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
52
  protected final String TEXT_31 = " contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
52
  protected final String TEXT_31 = " contentPane;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
53
  protected final String TEXT_32 = " primaryShape;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
53
  protected final String TEXT_32 = " primaryShape;" + NL;
54
  protected final String TEXT_33 = "(";
54
  protected final String TEXT_33 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
55
  protected final String TEXT_34 = " model) {" + NL + "\t\tassert model instanceof ";
55
  protected final String TEXT_34 = " childNodesPane;";
56
  protected final String TEXT_35 = ";" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL;
56
  protected final String TEXT_35 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
57
  protected final String TEXT_36 = NL;
57
  protected final String TEXT_36 = "(";
58
  protected final String TEXT_37 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t";
58
  protected final String TEXT_37 = " model) {" + NL + "\t\tassert model instanceof ";
59
  protected final String TEXT_38 = " view = (";
59
  protected final String TEXT_38 = ";" + NL + "\t\tsetModel(model);" + NL + "\t}" + NL;
60
  protected final String TEXT_39 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t";
60
  protected final String TEXT_39 = NL;
61
  protected final String TEXT_40 = " view = (";
61
  protected final String TEXT_40 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void registerModel() {" + NL + "\t\tsuper.registerModel();" + NL + "\t\t";
62
  protected final String TEXT_41 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {";
62
  protected final String TEXT_41 = " view = (";
63
  protected final String TEXT_42 = NL;
63
  protected final String TEXT_42 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().put(view.getElement(), this);\t" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void unregisterModel() {" + NL + "\t\tsuper.unregisterModel();" + NL + "\t\t";
64
  protected final String TEXT_43 = "\t\tinstallEditPolicy(";
64
  protected final String TEXT_43 = " view = (";
65
  protected final String TEXT_44 = ".COMPONENT_ROLE, new ";
65
  protected final String TEXT_44 = ") getModel();" + NL + "\t\tif (view != null && view.isSetElement() && view.getElement() != null && getViewer().getEditPartRegistry().get(view.getElement()) == this) {" + NL + "\t\t\tgetViewer().getEditPartRegistry().remove(view.getElement());" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void createEditPolicies() {";
66
  protected final String TEXT_45 = "() {" + NL + "\t\t\tprotected ";
66
  protected final String TEXT_45 = NL;
67
  protected final String TEXT_46 = " createDeleteCommand(";
67
  protected final String TEXT_46 = "\t\tinstallEditPolicy(";
68
  protected final String TEXT_47 = " deleteRequest) {" + NL + "\t\t\t\t";
68
  protected final String TEXT_47 = ".COMPONENT_ROLE, new ";
69
  protected final String TEXT_48 = " editingDomain = ";
69
  protected final String TEXT_48 = "() {" + NL + "\t\t\tprotected ";
70
  protected final String TEXT_49 = ".getEditingDomain(getDiagramNode().getDiagram().getElement());" + NL + "\t\t\t\t";
70
  protected final String TEXT_49 = " createDeleteCommand(";
71
  protected final String TEXT_50 = " cc = new ";
71
  protected final String TEXT_50 = " deleteRequest) {" + NL + "\t\t\t\t";
72
  protected final String TEXT_51 = "();" + NL + "\t\t\t\tcc.append(getDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append(";
72
  protected final String TEXT_51 = " editingDomain = ";
73
  protected final String TEXT_52 = ".create(editingDomain, getDiagramNode()));" + NL + "\t\t\t\treturn new ";
73
  protected final String TEXT_52 = ".getEditingDomain(getDiagramNode().getDiagram().getElement());" + NL + "\t\t\t\t";
74
  protected final String TEXT_53 = "(editingDomain, cc);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tprivate org.eclipse.emf.common.command.Command getDomainModelRemoveCommand(";
74
  protected final String TEXT_53 = " cc = new ";
75
  protected final String TEXT_54 = " editingDomain) {";
75
  protected final String TEXT_54 = "();" + NL + "\t\t\t\tcc.append(getDomainModelRemoveCommand(editingDomain));" + NL + "\t\t\t\tcc.append(";
76
  protected final String TEXT_55 = NL + "\t\t\t\t";
76
  protected final String TEXT_55 = ".create(editingDomain, getDiagramNode()));" + NL + "\t\t\t\treturn new ";
77
  protected final String TEXT_56 = " result = new ";
77
  protected final String TEXT_56 = "(editingDomain, cc);" + NL + "\t\t\t}" + NL + "" + NL + "\t\t\tprivate org.eclipse.emf.common.command.Command getDomainModelRemoveCommand(";
78
  protected final String TEXT_57 = "();";
78
  protected final String TEXT_57 = " editingDomain) {";
79
  protected final String TEXT_58 = NL + "\t\t\t\tresult.append(";
79
  protected final String TEXT_58 = NL + "\t\t\t\t";
80
  protected final String TEXT_59 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
80
  protected final String TEXT_59 = " result = new ";
81
  protected final String TEXT_60 = ".eINSTANCE.get";
81
  protected final String TEXT_60 = "();";
82
  protected final String TEXT_61 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));";
82
  protected final String TEXT_61 = NL + "\t\t\t\tresult.append(";
83
  protected final String TEXT_62 = NL + "\t\t\t\tresult.append(";
83
  protected final String TEXT_62 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
84
  protected final String TEXT_63 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
84
  protected final String TEXT_63 = ".eINSTANCE.get";
85
  protected final String TEXT_64 = ".eINSTANCE.get";
85
  protected final String TEXT_64 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));";
86
  protected final String TEXT_65 = "()," + NL + "\t\t\t\t\t";
86
  protected final String TEXT_65 = NL + "\t\t\t\tresult.append(";
87
  protected final String TEXT_66 = ".UNSET_VALUE));";
87
  protected final String TEXT_66 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
88
  protected final String TEXT_67 = NL + "\t\t\t\tresult.append(";
88
  protected final String TEXT_67 = ".eINSTANCE.get";
89
  protected final String TEXT_68 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
89
  protected final String TEXT_68 = "()," + NL + "\t\t\t\t\t";
90
  protected final String TEXT_69 = ".eINSTANCE.get";
90
  protected final String TEXT_69 = ".UNSET_VALUE));";
91
  protected final String TEXT_70 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));";
91
  protected final String TEXT_70 = NL + "\t\t\t\tresult.append(";
92
  protected final String TEXT_71 = NL + "\t\t\t\tresult.append(";
92
  protected final String TEXT_71 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
93
  protected final String TEXT_72 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
93
  protected final String TEXT_72 = ".eINSTANCE.get";
94
  protected final String TEXT_73 = ".eINSTANCE.get";
94
  protected final String TEXT_73 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement()));";
95
  protected final String TEXT_74 = "()," + NL + "\t\t\t\t\t";
95
  protected final String TEXT_74 = NL + "\t\t\t\tresult.append(";
96
  protected final String TEXT_75 = ".UNSET_VALUE));";
96
  protected final String TEXT_75 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
97
  protected final String TEXT_76 = NL + "\t\t\t\treturn result;";
97
  protected final String TEXT_76 = ".eINSTANCE.get";
98
  protected final String TEXT_77 = NL + "\t\t\t\treturn ";
98
  protected final String TEXT_77 = "()," + NL + "\t\t\t\t\t";
99
  protected final String TEXT_78 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
99
  protected final String TEXT_78 = ".UNSET_VALUE));";
100
  protected final String TEXT_79 = ".eINSTANCE.get";
100
  protected final String TEXT_79 = NL + "\t\t\t\treturn result;";
101
  protected final String TEXT_80 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement());";
101
  protected final String TEXT_80 = NL + "\t\t\t\treturn ";
102
  protected final String TEXT_81 = NL + "\t\t\t\treturn ";
102
  protected final String TEXT_81 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
103
  protected final String TEXT_82 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
103
  protected final String TEXT_82 = ".eINSTANCE.get";
104
  protected final String TEXT_83 = ".eINSTANCE.get";
104
  protected final String TEXT_83 = "()," + NL + "\t\t\t\t\tgetDiagramNode().getElement());";
105
  protected final String TEXT_84 = "()," + NL + "\t\t\t\t\t";
105
  protected final String TEXT_84 = NL + "\t\t\t\treturn ";
106
  protected final String TEXT_85 = ".UNSET_VALUE);";
106
  protected final String TEXT_85 = ".create(" + NL + "\t\t\t\t\teditingDomain, " + NL + "\t\t\t\t\tgetDiagramNode().getElement().eContainer(), ";
107
  protected final String TEXT_86 = NL + "\t\t\t}" + NL + "\t\t});";
107
  protected final String TEXT_86 = ".eINSTANCE.get";
108
  protected final String TEXT_87 = NL + "\t\tinstallEditPolicy(";
108
  protected final String TEXT_87 = "()," + NL + "\t\t\t\t\t";
109
  protected final String TEXT_88 = ".LAYOUT_ROLE, new ";
109
  protected final String TEXT_88 = ".UNSET_VALUE);";
110
  protected final String TEXT_89 = "() {" + NL + "\t\t\tprotected ";
110
  protected final String TEXT_89 = NL + "\t\t\t}" + NL + "\t\t});";
111
  protected final String TEXT_90 = " getCreateCommand(";
111
  protected final String TEXT_90 = NL + "\t\tinstallEditPolicy(";
112
  protected final String TEXT_91 = " request) {" + NL + "\t\t\t\treturn ";
112
  protected final String TEXT_91 = ".LAYOUT_ROLE, new ";
113
  protected final String TEXT_92 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor(";
113
  protected final String TEXT_92 = "() {" + NL + "\t\t\tprotected ";
114
  protected final String TEXT_93 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor(";
114
  protected final String TEXT_93 = " getCreateCommand(";
115
  protected final String TEXT_94 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected ";
115
  protected final String TEXT_94 = " request) {";
116
  protected final String TEXT_95 = " createChangeConstraintCommand(";
116
  protected final String TEXT_95 = NL + "\t\t\t\tif (request instanceof ";
117
  protected final String TEXT_96 = " child, Object constraint) {" + NL + "\t\t\t\treturn ";
117
  protected final String TEXT_96 = ") {" + NL + "\t\t\t\t\t";
118
  protected final String TEXT_97 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tprotected ";
118
  protected final String TEXT_97 = " requestEx = (";
119
  protected final String TEXT_98 = " createChildEditPolicy(";
119
  protected final String TEXT_98 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
120
  protected final String TEXT_99 = " child) {" + NL + "\t\t\t\treturn new ";
120
  protected final String TEXT_99 = " result = new ";
121
  protected final String TEXT_100 = "() {" + NL + "\t\t\t\t\tpublic ";
121
  protected final String TEXT_100 = "();" + NL + "\t\t\t\t\tfor(int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
122
  protected final String TEXT_101 = " getTargetEditPart(";
122
  protected final String TEXT_101 = NL + "\t\t\t\t\t\tcase ";
123
  protected final String TEXT_102 = " request) {" + NL + "\t\t\t\t\t\tif (";
123
  protected final String TEXT_102 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
124
  protected final String TEXT_103 = ".REQ_SELECTION.equals(request.getType())) {" + NL + "\t\t\t\t\t\t\treturn ";
124
  protected final String TEXT_103 = "Command((View) getModel(), requestEx";
125
  protected final String TEXT_104 = ".this;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getTargetEditPart(request);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallEditPolicy(";
125
  protected final String TEXT_104 = ", " + NL + "\t\t\t\t\t\t\t\t(";
126
  protected final String TEXT_105 = ".GRAPHICAL_NODE_ROLE, new ";
126
  protected final String TEXT_105 = ")getConstraintFor(request)";
127
  protected final String TEXT_106 = "() {" + NL + "\t\t\tprotected ";
127
  protected final String TEXT_106 = "));" + NL + "\t\t\t\t\t\t\tbreak;";
128
  protected final String TEXT_107 = " getReconnectTargetCommand(";
128
  protected final String TEXT_107 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
129
  protected final String TEXT_108 = " request) {";
129
  protected final String TEXT_108 = "(";
130
  protected final String TEXT_109 = " " + NL + "\t\t\t\treturn ";
130
  protected final String TEXT_109 = ".getEditingDomain(((View) getModel()).getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
131
  protected final String TEXT_110 = ".INSTANCE;";
131
  protected final String TEXT_110 = NL + "\t\t\t\treturn ";
132
  protected final String TEXT_111 = NL + "\t\t\t\t";
132
  protected final String TEXT_111 = ".INSTANCE;" + NL + "\t\t\t}";
133
  protected final String TEXT_112 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof ";
133
  protected final String TEXT_112 = NL + "\t\t\tprotected ";
134
  protected final String TEXT_113 = " == false) {" + NL + "\t\t\t\t\treturn ";
134
  protected final String TEXT_113 = " createChangeConstraintCommand(final ";
135
  protected final String TEXT_114 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
135
  protected final String TEXT_114 = " request, final ";
136
  protected final String TEXT_115 = " edge = (";
136
  protected final String TEXT_115 = " child, Object constraint) {" + NL + "\t\t\t\tif (!isDirectChild(child)) {" + NL + "\t\t\t\t\treturn ";
137
  protected final String TEXT_116 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = ";
137
  protected final String TEXT_116 = ".INSTANCE;" + NL + "\t\t\t\t}";
138
  protected final String TEXT_117 = ".getModelID(edge);" + NL + "\t\t\t\tif (!";
138
  protected final String TEXT_117 = NL;
139
  protected final String TEXT_118 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn ";
139
  protected final String TEXT_118 = "\t\t\t\tfinal ";
140
  protected final String TEXT_119 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
140
  protected final String TEXT_119 = " node = (";
141
  protected final String TEXT_120 = " result = null;" + NL + "\t\t\t\tint visualID = ";
141
  protected final String TEXT_120 = ") child.getModel();" + NL + "\t\t\t\t";
142
  protected final String TEXT_121 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {";
142
  protected final String TEXT_121 = " emfCommand = new ";
143
  protected final String TEXT_122 = NL + "\t\t\t\tcase ";
143
  protected final String TEXT_122 = "(\"Change node position/size\") {" + NL + "\t\t\t\t\tprivate ";
144
  protected final String TEXT_123 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect";
144
  protected final String TEXT_123 = " moveDelta;" + NL + "\t\t\t\t\tprivate ";
145
  protected final String TEXT_124 = "TargetCommand(request);" + NL + "\t\t\t\t\tbreak;";
145
  protected final String TEXT_124 = " resizeDelta;" + NL + "" + NL + "\t\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\t\treturn canExecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprotected boolean prepare() {" + NL + "\t\t\t\t\t\tif (node.getLayoutConstraint() instanceof ";
146
  protected final String TEXT_125 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn ";
146
  protected final String TEXT_125 = " == false) {" + NL + "\t\t\t\t\t\t\treturn false;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\t";
147
  protected final String TEXT_126 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new ";
147
  protected final String TEXT_126 = " bounds = (";
148
  protected final String TEXT_127 = "(";
148
  protected final String TEXT_127 = ") node.getLayoutConstraint();" + NL + "\t\t\t\t\t\t";
149
  protected final String TEXT_128 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);";
149
  protected final String TEXT_128 = " original = new ";
150
  protected final String TEXT_129 = NL + "\t\t\t}" + NL + "\t\t\tprotected ";
150
  protected final String TEXT_129 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());" + NL + "\t\t\t\t\t\t";
151
  protected final String TEXT_130 = " getReconnectSourceCommand(";
151
  protected final String TEXT_130 = " referenceFigure = ((";
152
  protected final String TEXT_131 = " request) {";
152
  protected final String TEXT_131 = ")child).getFigure();" + NL + "\t\t\t\t\t\treferenceFigure.translateToAbsolute(original);" + NL + "\t\t\t\t\t\t";
153
  protected final String TEXT_132 = " " + NL + "\t\t\t\treturn ";
153
  protected final String TEXT_132 = " transformed = request.getTransformedRectangle(original);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(transformed);" + NL + "\t\t\t\t\t\treferenceFigure.translateToRelative(original);" + NL + "\t\t\t\t\t\tresizeDelta = transformed.getSize().expand(original.getSize().negate());" + NL + "\t\t\t\t\t\tmoveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());" + NL + "\t\t\t\t\t\treturn true;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t\t\texecute(moveDelta.getNegated(), resizeDelta.getNegated());" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\t\texecute(moveDelta, resizeDelta);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t\t\texecute();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tprivate void execute(";
154
  protected final String TEXT_133 = ".INSTANCE;";
154
  protected final String TEXT_133 = " move, ";
155
  protected final String TEXT_134 = NL + "\t\t\t\t";
155
  protected final String TEXT_134 = " resize) {" + NL + "\t\t\t\t\t\t";
156
  protected final String TEXT_135 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof ";
156
  protected final String TEXT_135 = " bounds = (";
157
  protected final String TEXT_136 = " == false) {" + NL + "\t\t\t\t\treturn ";
157
  protected final String TEXT_136 = ") node.getLayoutConstraint();" + NL + "\t\t\t\t\t\tbounds.setX(bounds.getX() + move.x);" + NL + "\t\t\t\t\t\tbounds.setY(bounds.getY() + move.y);" + NL + "\t\t\t\t\t\tbounds.setWidth(bounds.getWidth() + resize.width);" + NL + "\t\t\t\t\t\tbounds.setHeight(bounds.getHeight() + resize.height);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t\treturn new ";
158
  protected final String TEXT_137 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
158
  protected final String TEXT_137 = "(";
159
  protected final String TEXT_138 = " edge = (";
159
  protected final String TEXT_138 = ".getEditingDomain(node.getDiagram().getElement()), emfCommand);" + NL + "\t\t\t}" + NL + "\t\t\tprotected Command createChangeConstraintCommand(";
160
  protected final String TEXT_139 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = ";
160
  protected final String TEXT_139 = " child, Object constraint) {" + NL + "\t\t\t\tassert false;" + NL + "\t\t\t\treturn ";
161
  protected final String TEXT_140 = ".getModelID(edge);" + NL + "\t\t\t\tif (!";
161
  protected final String TEXT_140 = ".INSTANCE;" + NL + "\t\t\t}";
162
  protected final String TEXT_141 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn ";
162
  protected final String TEXT_141 = NL + "\t\t\tprotected Object getConstraintFor(";
163
  protected final String TEXT_142 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
163
  protected final String TEXT_142 = " rect) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected Object getConstraintFor(";
164
  protected final String TEXT_143 = " result = null;" + NL + "\t\t\t\tint visualID = ";
164
  protected final String TEXT_143 = " point) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected ";
165
  protected final String TEXT_144 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {";
165
  protected final String TEXT_144 = " createChangeConstraintCommand(";
166
  protected final String TEXT_145 = NL + "\t\t\t\tcase ";
166
  protected final String TEXT_145 = " child, Object constraint) {" + NL + "\t\t\t\treturn ";
167
  protected final String TEXT_146 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect";
167
  protected final String TEXT_146 = ".INSTANCE;" + NL + "\t\t\t}";
168
  protected final String TEXT_147 = "SourceCommand(request);" + NL + "\t\t\t\t\tbreak;";
168
  protected final String TEXT_147 = NL + "\t\t\tprotected ";
169
  protected final String TEXT_148 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn ";
169
  protected final String TEXT_148 = " createChildEditPolicy(";
170
  protected final String TEXT_149 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new ";
170
  protected final String TEXT_149 = " child) {";
171
  protected final String TEXT_150 = "(";
171
  protected final String TEXT_150 = NL + "\t\t\t\tif (isDirectChild(child)) {" + NL + "\t\t\t\t\treturn super.createChildEditPolicy(child);" + NL + "\t\t\t\t}";
172
  protected final String TEXT_151 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);";
172
  protected final String TEXT_151 = NL + "\t\t\t\treturn new ";
173
  protected final String TEXT_152 = NL + "\t\t\t}" + NL + "\t\t\tprotected ";
173
  protected final String TEXT_152 = "() {" + NL + "\t\t\t\t\tpublic ";
174
  protected final String TEXT_153 = " getConnectionCreateCommand(";
174
  protected final String TEXT_153 = " getTargetEditPart(";
175
  protected final String TEXT_154 = " request) {";
175
  protected final String TEXT_154 = " request) {" + NL + "\t\t\t\t\t\tif (";
176
  protected final String TEXT_155 = NL + "\t\t\t\tif (request instanceof ";
176
  protected final String TEXT_155 = ".REQ_SELECTION.equals(request.getType())) {" + NL + "\t\t\t\t\t\t\treturn ";
177
  protected final String TEXT_156 = ") {" + NL + "\t\t\t\t\t";
177
  protected final String TEXT_156 = ".this;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t\treturn super.getTargetEditPart(request);" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t};" + NL + "\t\t\t}" + NL + "\t\t});" + NL + "\t\tinstallEditPolicy(";
178
  protected final String TEXT_157 = " requestEx = (";
178
  protected final String TEXT_157 = ".GRAPHICAL_NODE_ROLE, new ";
179
  protected final String TEXT_158 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
179
  protected final String TEXT_158 = "() {" + NL + "\t\t\tprotected ";
180
  protected final String TEXT_159 = " result = new ";
180
  protected final String TEXT_159 = " getReconnectTargetCommand(";
181
  protected final String TEXT_160 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
181
  protected final String TEXT_160 = " request) {";
182
  protected final String TEXT_161 = NL + "\t\t\t\t\t\tcase ";
182
  protected final String TEXT_161 = " " + NL + "\t\t\t\treturn ";
183
  protected final String TEXT_162 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
183
  protected final String TEXT_162 = ".INSTANCE;";
184
  protected final String TEXT_163 = "StartCommand(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;";
184
  protected final String TEXT_163 = NL + "\t\t\t\t";
185
  protected final String TEXT_164 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1 || !result.canExecute()) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\t//returning an unexecutable command does not change cursor to \"No\"." + NL + "\t\t\t\t\t\treturn null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t";
185
  protected final String TEXT_164 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof ";
186
  protected final String TEXT_165 = " wrappedResult = new ";
186
  protected final String TEXT_165 = " == false) {" + NL + "\t\t\t\t\treturn ";
187
  protected final String TEXT_166 = "(";
187
  protected final String TEXT_166 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
188
  protected final String TEXT_167 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t\trequest.setStartCommand(wrappedResult);" + NL + "\t\t\t\t\treturn wrappedResult;" + NL + "\t\t\t\t}";
188
  protected final String TEXT_167 = " edge = (";
189
  protected final String TEXT_168 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected ";
189
  protected final String TEXT_168 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = ";
190
  protected final String TEXT_169 = " getConnectionCompleteCommand(";
190
  protected final String TEXT_169 = ".getModelID(edge);" + NL + "\t\t\t\tif (!";
191
  protected final String TEXT_170 = " request) {";
191
  protected final String TEXT_170 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn ";
192
  protected final String TEXT_171 = NL + "\t\t\t\tif (request.getStartCommand() == null || !request.getStartCommand().canExecute()) {" + NL + "\t\t\t\t\treturn ";
192
  protected final String TEXT_171 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
193
  protected final String TEXT_172 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tif (request instanceof ";
193
  protected final String TEXT_172 = " result = null;" + NL + "\t\t\t\tint visualID = ";
194
  protected final String TEXT_173 = ") {" + NL + "\t\t\t\t\t";
194
  protected final String TEXT_173 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {";
195
  protected final String TEXT_174 = " requestEx = (";
195
  protected final String TEXT_174 = NL + "\t\t\t\tcase ";
196
  protected final String TEXT_175 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
196
  protected final String TEXT_175 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect";
197
  protected final String TEXT_176 = " result = new ";
197
  protected final String TEXT_176 = "TargetCommand(request);" + NL + "\t\t\t\t\tbreak;";
198
  protected final String TEXT_177 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
198
  protected final String TEXT_177 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn ";
199
  protected final String TEXT_178 = NL + "\t\t\t\t\t\tcase ";
199
  protected final String TEXT_178 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new ";
200
  protected final String TEXT_179 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
200
  protected final String TEXT_179 = "(";
201
  protected final String TEXT_180 = "Command(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;";
201
  protected final String TEXT_180 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);";
202
  protected final String TEXT_181 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\treturn ";
202
  protected final String TEXT_181 = NL + "\t\t\t}" + NL + "\t\t\tprotected ";
203
  protected final String TEXT_182 = ".INSTANCE;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
203
  protected final String TEXT_182 = " getReconnectSourceCommand(";
204
  protected final String TEXT_183 = "(";
204
  protected final String TEXT_183 = " request) {";
205
  protected final String TEXT_184 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
205
  protected final String TEXT_184 = " " + NL + "\t\t\t\treturn ";
206
  protected final String TEXT_185 = NL + "\t\t\t\treturn ";
206
  protected final String TEXT_185 = ".INSTANCE;";
207
  protected final String TEXT_186 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});";
207
  protected final String TEXT_186 = NL + "\t\t\t\t";
208
  protected final String TEXT_187 = NL + "\t\tinstallLinkNotationModelRefresher();";
208
  protected final String TEXT_187 = " connection = request.getConnectionEditPart();" + NL + "\t\t\t\tif (connection.getModel() instanceof ";
209
  protected final String TEXT_188 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
209
  protected final String TEXT_188 = " == false) {" + NL + "\t\t\t\t\treturn ";
210
  protected final String TEXT_189 = " createFigure() {" + NL + "\t\t";
210
  protected final String TEXT_189 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
211
  protected final String TEXT_190 = " invisibleRectangle = new ";
211
  protected final String TEXT_190 = " edge = (";
212
  protected final String TEXT_191 = "();" + NL + "\t\tinvisibleRectangle.setLayoutManager(new ";
212
  protected final String TEXT_191 = ")connection.getModel();" + NL + "\t\t\t\tString modelID = ";
213
  protected final String TEXT_192 = "());" + NL + "\t\t";
213
  protected final String TEXT_192 = ".getModelID(edge);" + NL + "\t\t\t\tif (!";
214
  protected final String TEXT_193 = " shape = createNodeShape();" + NL + "\t\tinvisibleRectangle.add(shape);" + NL + "\t\tcontentPane = setupContentPane(shape);" + NL + "\t\t" + NL + "\t\t";
214
  protected final String TEXT_193 = ".MODEL_ID.equals(modelID)) {" + NL + "\t\t\t\t\treturn ";
215
  protected final String TEXT_194 = " decorationShape = createDecorationPane();" + NL + "\t\tif (decorationShape != null) {" + NL + "\t\t\tinvisibleRectangle.add(decorationShape);" + NL + "\t\t}" + NL + "" + NL + "\t\treturn invisibleRectangle;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
215
  protected final String TEXT_194 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
216
  protected final String TEXT_195 = " createNodeShape() {";
216
  protected final String TEXT_195 = " result = null;" + NL + "\t\t\t\tint visualID = ";
217
  protected final String TEXT_196 = NL + "\t\tprimaryShape = new ";
217
  protected final String TEXT_196 = ".getVisualID(edge);" + NL + "\t\t\t\tswitch (visualID) {";
218
  protected final String TEXT_197 = "()";
218
  protected final String TEXT_197 = NL + "\t\t\t\tcase ";
219
  protected final String TEXT_198 = " {" + NL + "\t\t\tprotected boolean useLocalCoordinates() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}";
219
  protected final String TEXT_198 = ".VISUAL_ID:" + NL + "\t\t\t\t\tresult = new Reconnect";
220
  protected final String TEXT_199 = ";";
220
  protected final String TEXT_199 = "SourceCommand(request);" + NL + "\t\t\t\t\tbreak;";
221
  protected final String TEXT_200 = NL + "\t\tprimaryShape = ";
221
  protected final String TEXT_200 = NL + "\t\t\t\t}" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\treturn ";
222
  protected final String TEXT_201 = ";";
222
  protected final String TEXT_201 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn new ";
223
  protected final String TEXT_202 = NL + "\t\t";
223
  protected final String TEXT_202 = "(";
224
  protected final String TEXT_203 = " figure = new ";
224
  protected final String TEXT_203 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);";
225
  protected final String TEXT_204 = "();";
225
  protected final String TEXT_204 = NL + "\t\t\t}" + NL + "\t\t\tprotected ";
226
  protected final String TEXT_205 = NL + " \t\tfigure.setUseLocalCoordinates(true);";
226
  protected final String TEXT_205 = " getConnectionCreateCommand(";
227
  protected final String TEXT_206 = NL + " \t\tprimaryShape = figure;";
227
  protected final String TEXT_206 = " request) {";
228
  protected final String TEXT_207 = NL + "\t\treturn primaryShape;" + NL + "\t}";
228
  protected final String TEXT_207 = NL + "\t\t\t\tif (request instanceof ";
229
  protected final String TEXT_208 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
229
  protected final String TEXT_208 = ") {" + NL + "\t\t\t\t\t";
230
  protected final String TEXT_209 = " getPrimaryShape() {" + NL + "\t\treturn (";
230
  protected final String TEXT_209 = " requestEx = (";
231
  protected final String TEXT_210 = ") primaryShape;" + NL + "\t}";
231
  protected final String TEXT_210 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
232
  protected final String TEXT_211 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
232
  protected final String TEXT_211 = " result = new ";
233
  protected final String TEXT_212 = " createDecorationPane() {" + NL + "\t\t";
233
  protected final String TEXT_212 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
234
  protected final String TEXT_213 = " view = (";
234
  protected final String TEXT_213 = NL + "\t\t\t\t\t\tcase ";
235
  protected final String TEXT_214 = ") getModel();" + NL + "\t\t";
235
  protected final String TEXT_214 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
236
  protected final String TEXT_215 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t";
236
  protected final String TEXT_215 = "StartCommand(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;";
237
  protected final String TEXT_216 = " decorationPane = new ";
237
  protected final String TEXT_216 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1 || !result.canExecute()) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\t//returning an unexecutable command does not change cursor to \"No\"." + NL + "\t\t\t\t\t\treturn null;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\t";
238
  protected final String TEXT_217 = "();" + NL + "\t\tdecorationPane.setLayoutManager(new ";
238
  protected final String TEXT_217 = " wrappedResult = new ";
239
  protected final String TEXT_218 = "());" + NL + "" + NL + "\t\t";
239
  protected final String TEXT_218 = "(";
240
  protected final String TEXT_219 = " imageFigure = new ";
240
  protected final String TEXT_219 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t\trequest.setStartCommand(wrappedResult);" + NL + "\t\t\t\t\treturn wrappedResult;" + NL + "\t\t\t\t}";
241
  protected final String TEXT_220 = "(";
241
  protected final String TEXT_220 = NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\tprotected ";
242
  protected final String TEXT_221 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"), ";
242
  protected final String TEXT_221 = " getConnectionCompleteCommand(";
243
  protected final String TEXT_222 = ".EAST);" + NL + "\t\tdecorationPane.add(imageFigure, ";
243
  protected final String TEXT_222 = " request) {";
244
  protected final String TEXT_223 = ".BOTTOM);" + NL + " \t\treturn decorationPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
244
  protected final String TEXT_223 = NL + "\t\t\t\tif (request.getStartCommand() == null || !request.getStartCommand().canExecute()) {" + NL + "\t\t\t\t\treturn ";
245
  protected final String TEXT_224 = " setupContentPane(";
245
  protected final String TEXT_224 = ".INSTANCE;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tif (request instanceof ";
246
  protected final String TEXT_225 = " nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {";
246
  protected final String TEXT_225 = ") {" + NL + "\t\t\t\t\t";
247
  protected final String TEXT_226 = NL + "\t\t\t";
247
  protected final String TEXT_226 = " requestEx = (";
248
  protected final String TEXT_227 = " layout = new ";
248
  protected final String TEXT_227 = ") request;" + NL + "\t\t\t\t\tint[] visualIds = requestEx.getVisualIds();" + NL + "\t\t\t\t\t";
249
  protected final String TEXT_228 = "();" + NL + "\t\t\tlayout.setSpacing(5);" + NL + "\t\t\tnodeShape.setLayoutManager(layout);";
249
  protected final String TEXT_228 = " result = new ";
250
  protected final String TEXT_229 = NL + "\t\tnodeShape.setLayoutManager(new ";
250
  protected final String TEXT_229 = "();" + NL + "\t\t\t\t\tfor (int i = 0; i < visualIds.length; i++) {" + NL + "\t\t\t\t\t\tint nextVisualId = visualIds[i];" + NL + "\t\t\t\t\t\tswitch (nextVisualId) {";
251
  protected final String TEXT_230 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint(";
251
  protected final String TEXT_230 = NL + "\t\t\t\t\t\tcase ";
252
  protected final String TEXT_231 = " figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new ";
252
  protected final String TEXT_231 = ".VISUAL_ID:" + NL + "\t\t\t\t\t\t\tresult.append(new Create";
253
  protected final String TEXT_232 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});";
253
  protected final String TEXT_232 = "Command(requestEx));" + NL + "\t\t\t\t\t\t\tbreak;";
254
  protected final String TEXT_233 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
254
  protected final String TEXT_233 = NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\tif (result.getCommandList().size() != 1) {" + NL + "\t\t\t\t\t\t//Cannot create several connections at once." + NL + "\t\t\t\t\t\treturn ";
255
  protected final String TEXT_234 = " getContentPane() {" + NL + "\t\tif (contentPane == null) {" + NL + "\t\t\treturn super.getContentPane();" + NL + "\t\t}" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
255
  protected final String TEXT_234 = ".INSTANCE;" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t\treturn new ";
256
  protected final String TEXT_235 = " getDiagramNode() {" + NL + "\t\treturn (";
256
  protected final String TEXT_235 = "(";
257
  protected final String TEXT_236 = ") getModel();" + NL + "\t}" + NL;
257
  protected final String TEXT_236 = ".getEditingDomain(getDiagramNode().getDiagram().getElement()), result);" + NL + "\t\t\t\t}";
258
  protected final String TEXT_237 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild(";
258
  protected final String TEXT_237 = NL + "\t\t\t\treturn ";
259
  protected final String TEXT_238 = " childEditPart) {";
259
  protected final String TEXT_238 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t});";
260
  protected final String TEXT_239 = NL + "\t\tif (childEditPart instanceof ";
260
  protected final String TEXT_239 = NL + "\t\tinstallNotationModelRefresher();";
261
  protected final String TEXT_240 = ") {" + NL + "\t\t\t((";
261
  protected final String TEXT_240 = NL + "\t\tinstallLinkNotationModelRefresher();";
262
  protected final String TEXT_241 = ") childEditPart).";
262
  protected final String TEXT_241 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
263
  protected final String TEXT_242 = "(getPrimaryShape().";
263
  protected final String TEXT_242 = " createFigure() {" + NL + "\t\t";
264
  protected final String TEXT_243 = "());" + NL + "\t\t\treturn true;" + NL + "\t\t}";
264
  protected final String TEXT_243 = " invisibleRectangle = new ";
265
  protected final String TEXT_244 = NL + "\t\tif (childEditPart instanceof ";
265
  protected final String TEXT_244 = "();" + NL + "\t\tinvisibleRectangle.setLayoutManager(new ";
266
  protected final String TEXT_245 = ") {" + NL + "\t\t\t";
266
  protected final String TEXT_245 = "());" + NL + "\t\t";
267
  protected final String TEXT_246 = " pane = getPrimaryShape().";
267
  protected final String TEXT_246 = " shape = createNodeShape();" + NL + "\t\tinvisibleRectangle.add(shape);" + NL + "\t\tcontentPane = setupContentPane(shape);";
268
  protected final String TEXT_247 = "();" + NL + "\t\t\tsetupContentPane(pane); // FIXME each comparment should handle his content pane in his own way " + NL + "\t\t\tpane.add(((";
268
  protected final String TEXT_247 = NL + "\t\tchildNodesPane = createChildNodesPane();" + NL + "\t\tshape.add(childNodesPane);";
269
  protected final String TEXT_248 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t";
269
  protected final String TEXT_248 = NL + NL + "\t\t";
270
  protected final String TEXT_249 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean removeFixedChild(EditPart childEditPart) {";
270
  protected final String TEXT_249 = " decorationShape = createDecorationPane();" + NL + "\t\tif (decorationShape != null) {" + NL + "\t\t\tinvisibleRectangle.add(decorationShape);" + NL + "\t\t}" + NL + "" + NL + "\t\treturn invisibleRectangle;" + NL + "\t}" + NL;
271
  protected final String TEXT_250 = "\t\t" + NL + "\t\tif (childEditPart instanceof ";
271
  protected final String TEXT_250 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
272
  protected final String TEXT_251 = ") {" + NL + "\t\t\t";
272
  protected final String TEXT_251 = " createChildNodesPane() {" + NL + "\t\t";
273
  protected final String TEXT_252 = " pane = getPrimaryShape().";
273
  protected final String TEXT_252 = " result = new ";
274
  protected final String TEXT_253 = "();" + NL + "\t\t\tpane.remove(((";
274
  protected final String TEXT_253 = "();" + NL + "\t\tsetupContentPane(result);" + NL + "\t\treturn result;" + NL + "\t}";
275
  protected final String TEXT_254 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t";
275
  protected final String TEXT_254 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
276
  protected final String TEXT_255 = NL + "\t\treturn false;" + NL + "\t}";
276
  protected final String TEXT_255 = " createNodeShape() {";
277
  protected final String TEXT_256 = NL + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
277
  protected final String TEXT_256 = NL + "\t\tprimaryShape = new ";
278
  protected final String TEXT_257 = " getPrimaryLabelEditPart() {";
278
  protected final String TEXT_257 = "()";
279
  protected final String TEXT_258 = NL + "\t\tfor(";
279
  protected final String TEXT_258 = " {" + NL + "\t\t\tprotected boolean useLocalCoordinates() {" + NL + "\t\t\t\treturn true;" + NL + "\t\t\t}" + NL + "\t\t}";
280
  protected final String TEXT_259 = " it = getDiagramNode().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t";
280
  protected final String TEXT_259 = ";";
281
  protected final String TEXT_260 = " nextChild = (";
281
  protected final String TEXT_260 = NL + "\t\tprimaryShape = ";
282
  protected final String TEXT_261 = ")it.next();" + NL + "\t\t\tif (";
282
  protected final String TEXT_261 = ";";
283
  protected final String TEXT_262 = ".getVisualID(nextChild) == ";
283
  protected final String TEXT_262 = NL + "\t\t";
284
  protected final String TEXT_263 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn (";
284
  protected final String TEXT_263 = " figure = new ";
285
  protected final String TEXT_264 = ") getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}";
285
  protected final String TEXT_264 = "();";
286
  protected final String TEXT_265 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest(";
286
  protected final String TEXT_265 = NL + " \t\tfigure.setUseLocalCoordinates(true);";
287
  protected final String TEXT_266 = " req) {" + NL + "\t\tif (";
287
  protected final String TEXT_266 = NL + " \t\tprimaryShape = figure;";
288
  protected final String TEXT_267 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t";
288
  protected final String TEXT_267 = NL + "\t\treturn primaryShape;" + NL + "\t}";
289
  protected final String TEXT_268 = " labelToEdit;" + NL + "\t\t\tif (req instanceof ";
289
  protected final String TEXT_268 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
290
  protected final String TEXT_269 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart((";
290
  protected final String TEXT_269 = " getPrimaryShape() {" + NL + "\t\treturn (";
291
  protected final String TEXT_270 = ")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 ";
291
  protected final String TEXT_270 = ") primaryShape;" + NL + "\t}";
292
  protected final String TEXT_271 = " getLabelEditPart(";
292
  protected final String TEXT_271 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
293
  protected final String TEXT_272 = " req) {" + NL + "\t\t";
293
  protected final String TEXT_272 = " createDecorationPane() {" + NL + "\t\t";
294
  protected final String TEXT_273 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t";
294
  protected final String TEXT_273 = " view = (";
295
  protected final String TEXT_274 = " view = (";
295
  protected final String TEXT_274 = ") getModel();" + NL + "\t\t";
296
  protected final String TEXT_275 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = ";
296
  protected final String TEXT_275 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t";
297
  protected final String TEXT_276 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {";
297
  protected final String TEXT_276 = " decorationPane = new ";
298
  protected final String TEXT_277 = NL + "\t\t\t\tcase ";
298
  protected final String TEXT_277 = "();" + NL + "\t\tdecorationPane.setLayoutManager(new ";
299
  protected final String TEXT_278 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;";
299
  protected final String TEXT_278 = "());" + NL + "" + NL + "\t\t";
300
  protected final String TEXT_279 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL;
300
  protected final String TEXT_279 = " imageFigure = new ";
301
  protected final String TEXT_280 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel(";
301
  protected final String TEXT_280 = "(";
302
  protected final String TEXT_281 = " childEditPart) {";
302
  protected final String TEXT_281 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"), ";
303
  protected final String TEXT_282 = NL + "\t\tif (childEditPart instanceof ";
303
  protected final String TEXT_282 = ".EAST);" + NL + "\t\tdecorationPane.add(imageFigure, ";
304
  protected final String TEXT_283 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
304
  protected final String TEXT_283 = ".BOTTOM);" + NL + " \t\treturn decorationPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
305
  protected final String TEXT_284 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
305
  protected final String TEXT_284 = " setupContentPane(";
306
  protected final String TEXT_285 = " getExternalLabelsContainer() {" + NL + "\t\t";
306
  protected final String TEXT_285 = " nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {";
307
  protected final String TEXT_286 = " root = (";
307
  protected final String TEXT_286 = NL + "\t\t\t";
308
  protected final String TEXT_287 = ") getRoot();" + NL + "\t\treturn root.getLayer(";
308
  protected final String TEXT_287 = " layout = new ";
309
  protected final String TEXT_288 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL;
309
  protected final String TEXT_288 = "();" + NL + "\t\t\tlayout.setSpacing(5);" + NL + "\t\t\tnodeShape.setLayoutManager(layout);";
310
  protected final String TEXT_289 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(";
310
  protected final String TEXT_289 = NL + "\t\tnodeShape.setLayoutManager(new ";
311
  protected final String TEXT_290 = " childEditPart, int index) {";
311
  protected final String TEXT_290 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint(";
312
  protected final String TEXT_291 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t";
312
  protected final String TEXT_291 = " figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new ";
313
  protected final String TEXT_292 = " labelFigure = ((";
313
  protected final String TEXT_292 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});";
314
  protected final String TEXT_293 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}";
314
  protected final String TEXT_293 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
315
  protected final String TEXT_294 = NL + "\t\tif (addFixedChild(childEditPart)) {" + NL + "\t\t\treturn;" + NL + "\t\t}";
315
  protected final String TEXT_294 = " getContentPane() {" + NL + "\t\tif (contentPane == null) {" + NL + "\t\t\treturn super.getContentPane();" + NL + "\t\t}" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
316
  protected final String TEXT_295 = NL + "\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual(";
316
  protected final String TEXT_295 = " getDiagramNode() {" + NL + "\t\treturn (";
317
  protected final String TEXT_296 = " childEditPart) {";
317
  protected final String TEXT_296 = ") getModel();" + NL + "\t}" + NL;
318
  protected final String TEXT_297 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t";
318
  protected final String TEXT_297 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild(";
319
  protected final String TEXT_298 = " labelFigure = ((";
319
  protected final String TEXT_298 = " childEditPart) {";
320
  protected final String TEXT_299 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}";
320
  protected final String TEXT_299 = NL + "\t\tif (childEditPart instanceof ";
321
  protected final String TEXT_300 = NL + "\t\tif (removeFixedChild(childEditPart)){" + NL + "\t\t\treturn;" + NL + "\t\t}";
321
  protected final String TEXT_300 = ") {" + NL + "\t\t\t((";
322
  protected final String TEXT_301 = NL + "\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t}";
322
  protected final String TEXT_301 = ") childEditPart).";
323
  protected final String TEXT_302 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeNotify() {" + NL + "\t\tfor (";
323
  protected final String TEXT_302 = "(getPrimaryShape().";
324
  protected final String TEXT_303 = " it = getChildren().iterator(); it.hasNext();) {" + NL + "\t\t\t";
324
  protected final String TEXT_303 = "());" + NL + "\t\t\treturn true;" + NL + "\t\t}";
325
  protected final String TEXT_304 = " childEditPart = (";
325
  protected final String TEXT_304 = NL + "\t\tif (childEditPart instanceof ";
326
  protected final String TEXT_305 = ") it.next();" + NL + "\t\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t\tIFigure labelFigure = ((";
326
  protected final String TEXT_305 = ") {" + NL + "\t\t\t";
327
  protected final String TEXT_306 = ") childEditPart).getFigure();" + NL + "\t\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.removeNotify();" + NL + "\t}";
327
  protected final String TEXT_306 = " pane = getPrimaryShape().";
328
  protected final String TEXT_307 = 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";
328
  protected final String TEXT_307 = "();" + NL + "\t\t\tsetupContentPane(pane); // FIXME each comparment should handle his content pane in his own way " + NL + "\t\t\tpane.add(((";
329
  protected final String TEXT_308 = " node = getDiagramNode();" + NL + "\t\tif (node.getLayoutConstraint() == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tassert node.getLayoutConstraint() instanceof ";
329
  protected final String TEXT_308 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t";
330
  protected final String TEXT_309 = ";" + NL + "\t\t";
330
  protected final String TEXT_309 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean removeFixedChild(EditPart childEditPart) {";
331
  protected final String TEXT_310 = " bounds = (";
331
  protected final String TEXT_310 = "\t\t" + NL + "\t\tif (childEditPart instanceof ";
332
  protected final String TEXT_311 = ") node.getLayoutConstraint();" + NL + "\t\t((";
332
  protected final String TEXT_311 = ") {" + NL + "\t\t\t";
333
  protected final String TEXT_312 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew ";
333
  protected final String TEXT_312 = " pane = getPrimaryShape().";
334
  protected final String TEXT_313 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
334
  protected final String TEXT_313 = "();" + NL + "\t\t\tpane.remove(((";
335
  protected final String TEXT_314 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
335
  protected final String TEXT_314 = ")childEditPart).getFigure());" + NL + "\t\t\treturn true;" + NL + "\t\t}\t";
336
  protected final String TEXT_315 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
336
  protected final String TEXT_315 = NL + "\t\treturn false;" + NL + "\t}";
337
  protected final String TEXT_316 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
337
  protected final String TEXT_316 = NL + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
338
  protected final String TEXT_317 = " getSourceConnectionAnchor(";
338
  protected final String TEXT_317 = " getPrimaryLabelEditPart() {";
339
  protected final String TEXT_318 = " connection) {" + NL + "\t\treturn new ";
339
  protected final String TEXT_318 = NL + "\t\tfor(";
340
  protected final String TEXT_319 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
340
  protected final String TEXT_319 = " it = getDiagramNode().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t";
341
  protected final String TEXT_320 = " getSourceConnectionAnchor(";
341
  protected final String TEXT_320 = " nextChild = (";
342
  protected final String TEXT_321 = " request) {" + NL + "\t\treturn new ";
342
  protected final String TEXT_321 = ")it.next();" + NL + "\t\t\tif (";
343
  protected final String TEXT_322 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
343
  protected final String TEXT_322 = ".getVisualID(nextChild) == ";
344
  protected final String TEXT_323 = "  getTargetConnectionAnchor(";
344
  protected final String TEXT_323 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn (";
345
  protected final String TEXT_324 = " connection) {" + NL + "\t\treturn new ";
345
  protected final String TEXT_324 = ") getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}";
346
  protected final String TEXT_325 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
346
  protected final String TEXT_325 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest(";
347
  protected final String TEXT_326 = "  getTargetConnectionAnchor(";
347
  protected final String TEXT_326 = " req) {" + NL + "\t\tif (";
348
  protected final String TEXT_327 = " request) {" + NL + "\t\treturn new ";
348
  protected final String TEXT_327 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t";
349
  protected final String TEXT_328 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {";
349
  protected final String TEXT_328 = " labelToEdit;" + NL + "\t\t\tif (req instanceof ";
350
  protected final String TEXT_329 = 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);";
350
  protected final String TEXT_329 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart((";
351
  protected final String TEXT_330 = NL + "\t\tinstallLinkNotationModelRefresher();";
351
  protected final String TEXT_330 = ")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 ";
352
  protected final String TEXT_331 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {";
352
  protected final String TEXT_331 = " getLabelEditPart(";
353
  protected final String TEXT_332 = NL + "\t\tuninstallLinkNotationModelRefresher();";
353
  protected final String TEXT_332 = " req) {" + NL + "\t\t";
354
  protected final String TEXT_333 = NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}";
354
  protected final String TEXT_333 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t";
355
  protected final String TEXT_334 = NL;
355
  protected final String TEXT_334 = " view = (";
356
  protected final String TEXT_335 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
356
  protected final String TEXT_335 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = ";
357
  protected final String TEXT_336 = " domainModelEditDomain = ";
357
  protected final String TEXT_336 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {";
358
  protected final String TEXT_337 = ".getEditingDomain(";
358
  protected final String TEXT_337 = NL + "\t\t\t\tcase ";
359
  protected final String TEXT_338 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * Service to find a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
359
  protected final String TEXT_338 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;";
360
  protected final String TEXT_339 = " viewService;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
360
  protected final String TEXT_339 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL;
361
  protected final String TEXT_340 = " getViewService() {" + NL + "\t\tif (viewService == null) {" + NL + "\t\t\tviewService = new ";
361
  protected final String TEXT_340 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel(";
362
  protected final String TEXT_341 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn viewService;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher(getViewService());" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends ";
362
  protected final String TEXT_341 = " childEditPart) {";
363
  protected final String TEXT_342 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher(";
363
  protected final String TEXT_342 = NL + "\t\tif (childEditPart instanceof ";
364
  protected final String TEXT_343 = " viewService) {" + NL + "\t\t\tsuper(viewService);" + NL + "\t\t}";
364
  protected final String TEXT_343 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
365
  protected final String TEXT_344 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in ";
365
  protected final String TEXT_344 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
366
  protected final String TEXT_345 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
366
  protected final String TEXT_345 = " getExternalLabelsContainer() {" + NL + "\t\t";
367
  protected final String TEXT_346 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn ";
367
  protected final String TEXT_346 = " root = (";
368
  protected final String TEXT_347 = ".NOT_TOUCH;" + NL + "\t\t}";
368
  protected final String TEXT_347 = ") getRoot();" + NL + "\t\treturn root.getLayer(";
369
  protected final String TEXT_348 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
369
  protected final String TEXT_348 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL;
370
  protected final String TEXT_349 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn ";
370
  protected final String TEXT_349 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isDirectChild(";
371
  protected final String TEXT_350 = ".createEventTypeFilter(";
371
  protected final String TEXT_350 = " childEditPart) {";
372
  protected final String TEXT_351 = ".SET).or(" + NL + "\t\t\t\t";
372
  protected final String TEXT_351 = NL + "\t\tif (childEditPart instanceof ";
373
  protected final String TEXT_352 = ".createEventTypeFilter(";
373
  protected final String TEXT_352 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}";
374
  protected final String TEXT_353 = ".UNSET).or(" + NL + "\t\t\t\t";
374
  protected final String TEXT_353 = NL + "\t\treturn false;" + NL + "\t}";
375
  protected final String TEXT_354 = ".createEventTypeFilter(";
375
  protected final String TEXT_354 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual(";
376
  protected final String TEXT_355 = ".REMOVE).or(" + NL + "\t\t\t\t";
376
  protected final String TEXT_355 = " childEditPart, int index) {";
377
  protected final String TEXT_356 = ".createEventTypeFilter(";
377
  protected final String TEXT_356 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t";
378
  protected final String TEXT_357 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}";
378
  protected final String TEXT_357 = " labelFigure = ((";
379
  protected final String TEXT_358 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
379
  protected final String TEXT_358 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}";
380
  protected final String TEXT_359 = " createFilter() {";
380
  protected final String TEXT_359 = NL + "\t\tif (addFixedChild(childEditPart)) {" + NL + "\t\t\treturn;" + NL + "\t\t}";
381
  protected final String TEXT_360 = NL;
381
  protected final String TEXT_360 = NL + "\t\tif (isDirectChild(childEditPart)) {" + NL + "\t\t\t";
382
  protected final String TEXT_361 = NL + "\t\t\t";
382
  protected final String TEXT_361 = " childFigure = ((";
383
  protected final String TEXT_362 = " filter = ";
383
  protected final String TEXT_362 = ") childEditPart).getFigure();" + NL + "\t\t\tchildNodesPane.add(childFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}";
384
  protected final String TEXT_363 = ".createFeatureFilter(";
384
  protected final String TEXT_363 = NL + "\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual(";
385
  protected final String TEXT_364 = ".eINSTANCE.get";
385
  protected final String TEXT_364 = " childEditPart) {";
386
  protected final String TEXT_365 = "());";
386
  protected final String TEXT_365 = NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t";
387
  protected final String TEXT_366 = NL + "\t\t\tfilter = filter.or(";
387
  protected final String TEXT_366 = " labelFigure = ((";
388
  protected final String TEXT_367 = ".createFeatureFilter(";
388
  protected final String TEXT_367 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}";
389
  protected final String TEXT_368 = ".eINSTANCE.get";
389
  protected final String TEXT_368 = NL + "\t\tif (removeFixedChild(childEditPart)){" + NL + "\t\t\treturn;" + NL + "\t\t}";
390
  protected final String TEXT_369 = "()));";
390
  protected final String TEXT_369 = NL + "\t\tif (isDirectChild(childEditPart)) {" + NL + "\t\t\t";
391
  protected final String TEXT_370 = NL;
391
  protected final String TEXT_370 = " childFigure = ((";
392
  protected final String TEXT_371 = NL + "\t\t\t";
392
  protected final String TEXT_371 = ") childEditPart).getFigure();" + NL + "\t\t\tchildNodesPane.remove(childFigure);" + NL + "\t\t\treturn;" + NL + "\t\t}";
393
  protected final String TEXT_372 = " filter = ";
393
  protected final String TEXT_372 = NL + "\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t}";
394
  protected final String TEXT_373 = ".createFeatureFilter(";
394
  protected final String TEXT_373 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeNotify() {" + NL + "\t\tfor (";
395
  protected final String TEXT_374 = ".eINSTANCE.get";
395
  protected final String TEXT_374 = " it = getChildren().iterator(); it.hasNext();) {" + NL + "\t\t\t";
396
  protected final String TEXT_375 = "());";
396
  protected final String TEXT_375 = " childEditPart = (";
397
  protected final String TEXT_376 = NL + "\t\t\tfilter = filter.or(";
397
  protected final String TEXT_376 = ") it.next();" + NL + "\t\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t\tIFigure labelFigure = ((";
398
  protected final String TEXT_377 = ".createFeatureFilter(";
398
  protected final String TEXT_377 = ") childEditPart).getFigure();" + NL + "\t\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\tsuper.removeNotify();" + NL + "\t}";
399
  protected final String TEXT_378 = ".eINSTANCE.get";
399
  protected final String TEXT_378 = 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";
400
  protected final String TEXT_379 = "()));";
400
  protected final String TEXT_379 = " node = getDiagramNode();" + NL + "\t\tif (node.getLayoutConstraint() == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tassert node.getLayoutConstraint() instanceof ";
401
  protected final String TEXT_380 = NL;
401
  protected final String TEXT_380 = ";" + NL + "\t\t";
402
  protected final String TEXT_381 = NL + "\t\t\t";
402
  protected final String TEXT_381 = " bounds = (";
403
  protected final String TEXT_382 = " filter = ";
403
  protected final String TEXT_382 = ") node.getLayoutConstraint();" + NL + "\t\t((";
404
  protected final String TEXT_383 = ".createFeatureFilter(";
404
  protected final String TEXT_383 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew ";
405
  protected final String TEXT_384 = ".eINSTANCE.get";
405
  protected final String TEXT_384 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
406
  protected final String TEXT_385 = "());";
406
  protected final String TEXT_385 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
407
  protected final String TEXT_386 = NL + "\t\t\tfilter = filter.or(";
407
  protected final String TEXT_386 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected ";
408
  protected final String TEXT_387 = ".createFeatureFilter(";
408
  protected final String TEXT_387 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
409
  protected final String TEXT_388 = ".eINSTANCE.get";
409
  protected final String TEXT_388 = " getSourceConnectionAnchor(";
410
  protected final String TEXT_389 = "()));";
410
  protected final String TEXT_389 = " connection) {" + NL + "\t\treturn new ";
411
  protected final String TEXT_390 = NL;
411
  protected final String TEXT_390 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
412
  protected final String TEXT_391 = NL + "\t\t\t";
412
  protected final String TEXT_391 = " getSourceConnectionAnchor(";
413
  protected final String TEXT_392 = " filter = ";
413
  protected final String TEXT_392 = " request) {" + NL + "\t\treturn new ";
414
  protected final String TEXT_393 = ".createFeatureFilter(";
414
  protected final String TEXT_393 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
415
  protected final String TEXT_394 = ".eINSTANCE.get";
415
  protected final String TEXT_394 = "  getTargetConnectionAnchor(";
416
  protected final String TEXT_395 = "());";
416
  protected final String TEXT_395 = " connection) {" + NL + "\t\treturn new ";
417
  protected final String TEXT_396 = NL + "\t\t\tfilter = filter.or(";
417
  protected final String TEXT_396 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
418
  protected final String TEXT_397 = ".createFeatureFilter(";
418
  protected final String TEXT_397 = "  getTargetConnectionAnchor(";
419
  protected final String TEXT_398 = ".eINSTANCE.get";
419
  protected final String TEXT_398 = " request) {" + NL + "\t\treturn new ";
420
  protected final String TEXT_399 = "()));";
420
  protected final String TEXT_399 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {";
421
  protected final String TEXT_400 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);";
421
  protected final String TEXT_400 = 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);";
422
  protected final String TEXT_401 = NL + "\t\t\t";
422
  protected final String TEXT_401 = NL + "\t\tinstallNotationModelRefresher();";
423
  protected final String TEXT_402 = " filter = getConstrainedChildLinksFilter();";
423
  protected final String TEXT_402 = NL + "\t\tinstallLinkNotationModelRefresher();";
424
  protected final String TEXT_403 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());";
424
  protected final String TEXT_403 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {";
425
  protected final String TEXT_404 = NL + "\t\t\t";
425
  protected final String TEXT_404 = NL + "\t\tuninstallLinkNotationModelRefresher();";
426
  protected final String TEXT_405 = " filter = createUncontainedLinksFilter();";
426
  protected final String TEXT_405 = NL + "\t\tuninstallNotationModelRefresher();";
427
  protected final String TEXT_406 = NL + "\t\t\t";
427
  protected final String TEXT_406 = NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}";
428
  protected final String TEXT_407 = " filter = ";
428
  protected final String TEXT_407 = NL;
429
  protected final String TEXT_408 = ".NOT_TOUCH;";
429
  protected final String TEXT_408 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installNotationModelRefresher() {" + NL + "\t\t";
430
  protected final String TEXT_409 = NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t \t * @generated" + NL + "\t \t */" + NL + "\t\tprotected ";
430
  protected final String TEXT_409 = " refresher = getNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
431
  protected final String TEXT_410 = " getCreateNotationalElementCommand(";
431
  protected final String TEXT_410 = " domainModelEditDomain = ";
432
  protected final String TEXT_411 = " descriptor) {" + NL + "\t\t\t";
432
  protected final String TEXT_411 = ".getEditingDomain(";
433
  protected final String TEXT_412 = " linkDescriptor = (";
433
  protected final String TEXT_412 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallNotationModelRefresher() {" + NL + "\t\tgetNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
434
  protected final String TEXT_413 = ") descriptor;" + NL + "\t\t\t";
434
  protected final String TEXT_413 = " notationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
435
  protected final String TEXT_414 = " sourceView = getViewService().findView(linkDescriptor.getSource());" + NL + "\t\t\t";
435
  protected final String TEXT_414 = " getNotationModelRefresher() {" + NL + "\t\tif (notationModelRefresher == null) {" + NL + "\t\t\tnotationModelRefresher = new NotationModelRefresher();" + NL + "\t\t}" + NL + "\t\treturn notationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class NotationModelRefresher extends ";
436
  protected final String TEXT_415 = " targetView = getViewService().findView(linkDescriptor.getDestination());" + NL + "\t\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t";
436
  protected final String TEXT_415 = " {";
437
  protected final String TEXT_416 = " createdEdge = ";
437
  protected final String TEXT_416 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Children of this element are selected based on constraint declared in ";
438
  protected final String TEXT_417 = ".eINSTANCE.createEdge();" + NL + "\t\t\tswitch (linkDescriptor.getVisualID()) {";
438
  protected final String TEXT_417 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
439
  protected final String TEXT_418 = NL + "\t\t\tcase ";
439
  protected final String TEXT_418 = " getConstrainedChildrenFilter() {" + NL + "\t\t\treturn ";
440
  protected final String TEXT_419 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() instanceof ";
440
  protected final String TEXT_419 = ".NOT_TOUCH;" + NL + "\t\t}";
441
  protected final String TEXT_420 = ") {" + NL + "\t\t\t\t\tcreatedEdge.setElement(linkDescriptor.getElement());" + NL + "\t\t\t\t\t";
441
  protected final String TEXT_420 = NL + NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
442
  protected final String TEXT_421 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
442
  protected final String TEXT_421 = " createFilter() {";
443
  protected final String TEXT_422 = NL + "\t\t\tcase ";
443
  protected final String TEXT_422 = NL + "\t\t\t";
444
  protected final String TEXT_423 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() == null) {" + NL + "\t\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t\t";
444
  protected final String TEXT_423 = " filter = ";
445
  protected final String TEXT_424 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
445
  protected final String TEXT_424 = ".createFeatureFilter(";
446
  protected final String TEXT_425 = NL + "\t\t\t}" + NL + "\t\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn new ";
446
  protected final String TEXT_425 = ".eINSTANCE.get";
447
  protected final String TEXT_426 = "(getHost().getDiagram(), createdEdge, sourceView, targetView);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
447
  protected final String TEXT_426 = "());";
448
  protected final String TEXT_427 = " getSemanticChildLinks() {";
448
  protected final String TEXT_427 = NL + "\t\t\tfilter = filter.or(";
449
  protected final String TEXT_428 = NL;
449
  protected final String TEXT_428 = ".createFeatureFilter(";
450
  protected final String TEXT_429 = "\t";
450
  protected final String TEXT_429 = ".eINSTANCE.get";
451
  protected final String TEXT_430 = " result = new ";
451
  protected final String TEXT_430 = "()));";
452
  protected final String TEXT_431 = "();";
452
  protected final String TEXT_431 = NL + "\t\t\tfilter = filter.and(";
453
  protected final String TEXT_432 = NL + "\t";
453
  protected final String TEXT_432 = ".createNotifierFilter(";
454
  protected final String TEXT_433 = " modelObject = ";
454
  protected final String TEXT_433 = ".getElement()));";
455
  protected final String TEXT_434 = ".getElement();" + NL + "\t";
455
  protected final String TEXT_434 = NL + "\t\t\t";
456
  protected final String TEXT_435 = " nextValue;";
456
  protected final String TEXT_435 = " filter = ";
457
  protected final String TEXT_436 = NL + "\tint linkVID;";
457
  protected final String TEXT_436 = ".createNotifierFilter(";
458
  protected final String TEXT_437 = NL + "\tfor(";
458
  protected final String TEXT_437 = ".getElement());";
459
  protected final String TEXT_438 = " it = ";
459
  protected final String TEXT_438 = NL + "\t\t\tfilter = getConstrainedChildrenFilter().or(filter);";
460
  protected final String TEXT_439 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
460
  protected final String TEXT_439 = NL + "\t\t\t";
461
  protected final String TEXT_440 = ") it.next();";
461
  protected final String TEXT_440 = " filter = getConstrainedChildrenFilter();";
462
  protected final String TEXT_441 = NL + "\tnextValue = (";
462
  protected final String TEXT_441 = NL + "\t\t\t";
463
  protected final String TEXT_442 = ")";
463
  protected final String TEXT_442 = " filter = ";
464
  protected final String TEXT_443 = ";";
464
  protected final String TEXT_443 = ".NOT_TOUCH;";
465
  protected final String TEXT_444 = NL + "\tlinkVID = ";
465
  protected final String TEXT_444 = NL + "\t\t\treturn filter;";
466
  protected final String TEXT_445 = ".INSTANCE.getLinkWithClassVisualID(nextValue);";
466
  protected final String TEXT_445 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
467
  protected final String TEXT_446 = NL + "\tswitch (linkVID) {";
467
  protected final String TEXT_446 = " getCreateNotationalElementCommand(";
468
  protected final String TEXT_447 = NL + "\tcase ";
468
  protected final String TEXT_447 = " descriptor) {" + NL + "\t\t\t";
469
  protected final String TEXT_448 = ".VISUAL_ID: {";
469
  protected final String TEXT_448 = " domainElement = descriptor.getElement();" + NL + "\t\t\tint nodeVisualID = descriptor.getVisualID();" + NL + "\t\t\tswitch (nodeVisualID) {";
470
  protected final String TEXT_449 = NL + "\tif (";
470
  protected final String TEXT_449 = NL + "\t\t\tcase ";
471
  protected final String TEXT_450 = ".VISUAL_ID == linkVID) {";
471
  protected final String TEXT_450 = ".VISUAL_ID:" + NL + "\t\t\t\tif (domainElement instanceof ";
472
  protected final String TEXT_451 = NL + "\t\t";
472
  protected final String TEXT_451 = ") {" + NL + "\t\t\t\t\treturn new Create";
473
  protected final String TEXT_452 = " source = (";
473
  protected final String TEXT_452 = "NotationCommand(getHost(), domainElement";
474
  protected final String TEXT_453 = ")";
474
  protected final String TEXT_453 = ", new Rectangle(0, 0, 0, 0)";
475
  protected final String TEXT_454 = ";";
475
  protected final String TEXT_454 = ");" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn null;";
476
  protected final String TEXT_455 = NL + "\t\t";
476
  protected final String TEXT_455 = NL + "\t\t\tdefault:" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
477
  protected final String TEXT_456 = " source = ";
477
  protected final String TEXT_456 = " getSemanticChildNodes() {";
478
  protected final String TEXT_457 = ".getElement();";
478
  protected final String TEXT_457 = NL;
479
  protected final String TEXT_458 = NL + "\t\t";
479
  protected final String TEXT_458 = NL + "\treturn ";
480
  protected final String TEXT_459 = " target = (";
480
  protected final String TEXT_459 = ".EMPTY_LIST;";
481
  protected final String TEXT_460 = ")";
481
  protected final String TEXT_460 = NL + "\t";
482
  protected final String TEXT_461 = ";";
482
  protected final String TEXT_461 = " result = new ";
483
  protected final String TEXT_462 = NL + "\t\t";
483
  protected final String TEXT_462 = "();";
484
  protected final String TEXT_463 = " target = ";
484
  protected final String TEXT_463 = NL + "\t";
485
  protected final String TEXT_464 = ".getElement();";
485
  protected final String TEXT_464 = " viewObject = ";
486
  protected final String TEXT_465 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new ";
486
  protected final String TEXT_465 = ";" + NL + "\t";
487
  protected final String TEXT_466 = "(source, target, nextValue, linkVID));" + NL + "\t\t}";
487
  protected final String TEXT_466 = " modelObject = viewObject.getElement();" + NL + "\t";
488
  protected final String TEXT_467 = NL + "\t\tbreak;" + NL + "\t}";
488
  protected final String TEXT_467 = " nextValue;" + NL + "\tint nodeVID;";
489
  protected final String TEXT_468 = NL + "\t}";
489
  protected final String TEXT_468 = NL + "\tfor(";
490
  protected final String TEXT_469 = NL + "\t}";
490
  protected final String TEXT_469 = " it = ";
491
  protected final String TEXT_470 = NL + "\t}";
491
  protected final String TEXT_470 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
492
  protected final String TEXT_471 = NL + "\tfor(";
492
  protected final String TEXT_471 = ") it.next();";
493
  protected final String TEXT_472 = " it = ";
493
  protected final String TEXT_472 = NL + "\tnextValue = (";
494
  protected final String TEXT_473 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
494
  protected final String TEXT_473 = ")";
495
  protected final String TEXT_474 = ") it.next();";
495
  protected final String TEXT_474 = ";";
496
  protected final String TEXT_475 = NL + "\tnextValue = (";
496
  protected final String TEXT_475 = NL + "\tnodeVID = ";
497
  protected final String TEXT_476 = ")";
497
  protected final String TEXT_476 = ".INSTANCE.getNodeVisualID(viewObject, nextValue);";
498
  protected final String TEXT_477 = ";";
498
  protected final String TEXT_477 = NL + "\tswitch (nodeVID) {";
499
  protected final String TEXT_478 = NL + "\tif (nextValue != null) {";
499
  protected final String TEXT_478 = NL + "\tcase ";
500
  protected final String TEXT_479 = NL + "\t\tresult.add(new ";
500
  protected final String TEXT_479 = ".VISUAL_ID: {";
501
  protected final String TEXT_480 = "(modelObject, nextValue, null, ";
501
  protected final String TEXT_480 = NL + "\tif (";
502
  protected final String TEXT_481 = ".VISUAL_ID));";
502
  protected final String TEXT_481 = ".VISUAL_ID == nodeVID) {";
503
  protected final String TEXT_482 = NL + "\t}";
503
  protected final String TEXT_482 = NL + "\t\tresult.add(new ";
504
  protected final String TEXT_483 = NL + "\t}";
504
  protected final String TEXT_483 = "(nextValue, nodeVID));";
505
  protected final String TEXT_484 = NL + "\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
505
  protected final String TEXT_484 = NL + "\t\tbreak;" + NL + "\t\t}";
506
  protected final String TEXT_485 = " getNotationalChildLinks() {" + NL + "\t\t\t";
506
  protected final String TEXT_485 = NL + "\t\t}";
507
  protected final String TEXT_486 = " result = new ";
507
  protected final String TEXT_486 = NL + "\t}";
508
  protected final String TEXT_487 = "();" + NL + "\t\t\t";
508
  protected final String TEXT_487 = NL + "\t}";
509
  protected final String TEXT_488 = " allLinks = ";
509
  protected final String TEXT_488 = NL + "\treturn result;";
510
  protected final String TEXT_489 = ".getEdges();" + NL + "\t\t\tfor(";
510
  protected final String TEXT_489 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational element should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
511
  protected final String TEXT_490 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\t";
511
  protected final String TEXT_490 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
512
  protected final String TEXT_491 = " next = (";
512
  protected final String TEXT_491 = " descriptor) {" + NL + "\t\t\treturn ";
513
  protected final String TEXT_492 = ") it.next();";
513
  protected final String TEXT_492 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
514
  protected final String TEXT_493 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
514
  protected final String TEXT_493 = " getHost() {" + NL + "\t\t\treturn ";
515
  protected final String TEXT_494 = " source = next.getSource();" + NL + "\t\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
515
  protected final String TEXT_494 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshNotationModel() {" + NL + "\t\t";
516
  protected final String TEXT_495 = " target = next.getTarget();" + NL + "\t\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}";
516
  protected final String TEXT_495 = " childRefresher = getNotationModelRefresher();" + NL + "\t\tif (!childRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
517
  protected final String TEXT_496 = NL + "\t\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\t\tif (next.getSource() == ";
517
  protected final String TEXT_496 = " command = childRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
518
  protected final String TEXT_497 = ") {" + NL + "\t\t\t\t\t\tint linkVID = ";
518
  protected final String TEXT_497 = " domainModelEditDomain = ";
519
  protected final String TEXT_498 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
519
  protected final String TEXT_498 = ".getEditingDomain(";
520
  protected final String TEXT_499 = NL + "\t\t\t\t\t\tcase ";
520
  protected final String TEXT_499 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
521
  protected final String TEXT_500 = ".VISUAL_ID:";
521
  protected final String TEXT_500 = "(domainModelEditDomain, command));" + NL + "\t}" + NL;
522
  protected final String TEXT_501 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}";
522
  protected final String TEXT_501 = NL;
523
  protected final String TEXT_502 = NL + "\t\t\t\t} else {";
523
  protected final String TEXT_502 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void installLinkNotationModelRefresher() {" + NL + "\t\tLinkNotationModelRefresher refresher = getLinkNotationModelRefresher();" + NL + "\t\tif (refresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
524
  protected final String TEXT_503 = NL + "\t\t\t\t}";
524
  protected final String TEXT_503 = " domainModelEditDomain = ";
525
  protected final String TEXT_504 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null) {";
525
  protected final String TEXT_504 = ".getEditingDomain(";
526
  protected final String TEXT_505 = NL + "\t\t\t\t\tif (next.getElement().eContainer() == ";
526
  protected final String TEXT_505 = ".getElement());" + NL + "\t\trefresher.install(domainModelEditDomain);" + NL + "\t\trefreshLinkNotationModel();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void uninstallLinkNotationModelRefresher() {" + NL + "\t\tgetLinkNotationModelRefresher().uninstall();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher linkNotationModelRefresher;" + NL + "" + NL + "\t/**" + NL + "\t * Service to find a notational element that corresponds to the given underlying domain element. " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
527
  protected final String TEXT_506 = ".getElement()) {" + NL + "\t\t\t\t\t\tint linkVID = ";
527
  protected final String TEXT_506 = " viewService;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
528
  protected final String TEXT_507 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
528
  protected final String TEXT_507 = " getViewService() {" + NL + "\t\tif (viewService == null) {" + NL + "\t\t\tviewService = new ";
529
  protected final String TEXT_508 = NL + "\t\t\t\t\t\tcase ";
529
  protected final String TEXT_508 = "(getViewer());" + NL + "\t\t}" + NL + "\t\treturn viewService;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate LinkNotationModelRefresher getLinkNotationModelRefresher() {" + NL + "\t\tif (linkNotationModelRefresher == null) {" + NL + "\t\t\tlinkNotationModelRefresher = new LinkNotationModelRefresher(getViewService());" + NL + "\t\t}" + NL + "\t\treturn linkNotationModelRefresher;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class LinkNotationModelRefresher extends ";
530
  protected final String TEXT_509 = ".VISUAL_ID:";
530
  protected final String TEXT_509 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic LinkNotationModelRefresher(";
531
  protected final String TEXT_510 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
531
  protected final String TEXT_510 = " viewService) {" + NL + "\t\t\tsuper(viewService);" + NL + "\t\t}";
532
  protected final String TEXT_511 = NL + "\t\t\t}" + NL + "\t\t\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
532
  protected final String TEXT_511 = NL + NL + "\t\t/**" + NL + "\t\t * NB: Child links of this element are selected based on constraint declared in ";
533
  protected final String TEXT_512 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
533
  protected final String TEXT_512 = ". " + NL + "\t\t * Since no assumptions may be made concerning the runtime behavior of the constraint, <b>any</b> non-touch notification may result in " + NL + "\t\t * notational model having to be updated." + NL + "\t\t * <p/>User is encouraged to change implementation of this method to provide an optimization if it is safe to assume that not all notifications" + NL + "\t\t * result in such an update." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
534
  protected final String TEXT_513 = " descriptor) {" + NL + "\t\t\treturn ";
534
  protected final String TEXT_513 = " getConstrainedChildLinksFilter() {" + NL + "\t\t\treturn ";
535
  protected final String TEXT_514 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
535
  protected final String TEXT_514 = ".NOT_TOUCH;" + NL + "\t\t}";
536
  protected final String TEXT_515 = " getHost() {" + NL + "\t\t\treturn ";
536
  protected final String TEXT_515 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly result in uncontained links. " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
537
  protected final String TEXT_516 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t";
537
  protected final String TEXT_516 = " createUncontainedLinksFilter() {" + NL + "\t\t\treturn ";
538
  protected final String TEXT_517 = " linkRefresher = getLinkNotationModelRefresher();" + NL + "\t\tif (!linkRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
538
  protected final String TEXT_517 = ".createEventTypeFilter(";
539
  protected final String TEXT_518 = " command = linkRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
539
  protected final String TEXT_518 = ".SET).or(" + NL + "\t\t\t\t";
540
  protected final String TEXT_519 = " domainModelEditDomain = ";
540
  protected final String TEXT_519 = ".createEventTypeFilter(";
541
  protected final String TEXT_520 = ".getEditingDomain(";
541
  protected final String TEXT_520 = ".UNSET).or(" + NL + "\t\t\t\t";
542
  protected final String TEXT_521 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
542
  protected final String TEXT_521 = ".createEventTypeFilter(";
543
  protected final String TEXT_522 = "(domainModelEditDomain, command));" + NL + "\t}";
543
  protected final String TEXT_522 = ".REMOVE).or(" + NL + "\t\t\t\t";
544
  protected final String TEXT_523 = NL;
544
  protected final String TEXT_523 = ".createEventTypeFilter(";
545
  protected final String TEXT_524 = NL;
545
  protected final String TEXT_524 = ".REMOVE_MANY)" + NL + "\t\t\t)));" + NL + "\t\t}";
546
  protected final String TEXT_525 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
546
  protected final String TEXT_525 = NL + "\t\t/**" + NL + "\t\t * Creates a notification filter which filters notifications that may possibly affect the notational model" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
547
  protected final String TEXT_526 = " domainModelRefresher = new ";
547
  protected final String TEXT_526 = " createFilter() {";
548
  protected final String TEXT_527 = "(this);" + NL;
548
  protected final String TEXT_527 = NL;
549
  protected final String TEXT_528 = NL;
549
  protected final String TEXT_528 = NL + "\t\t\t";
550
  protected final String TEXT_529 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addRefresher(";
550
  protected final String TEXT_529 = " filter = ";
551
  protected final String TEXT_530 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeRefresher(";
551
  protected final String TEXT_530 = ".createFeatureFilter(";
552
  protected final String TEXT_531 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompositeRefresher getCompositeRefresher(";
552
  protected final String TEXT_531 = ".eINSTANCE.get";
553
  protected final String TEXT_532 = " 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;
553
  protected final String TEXT_532 = "());";
554
  protected final String TEXT_533 = NL;
554
  protected final String TEXT_533 = NL + "\t\t\tfilter = filter.or(";
555
  protected final String TEXT_534 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {";
555
  protected final String TEXT_534 = ".createFeatureFilter(";
556
  protected final String TEXT_535 = NL + "\t\t";
556
  protected final String TEXT_535 = ".eINSTANCE.get";
557
  protected final String TEXT_536 = " style =" + NL + "\t\t\t(";
557
  protected final String TEXT_536 = "()));";
558
  protected final String TEXT_537 = ") ";
558
  protected final String TEXT_537 = NL;
559
  protected final String TEXT_538 = ".getStyle(" + NL + "\t\t\t\t";
559
  protected final String TEXT_538 = NL + "\t\t\t";
560
  protected final String TEXT_539 = ".eINSTANCE.getFontStyle());" + NL + "\t\t";
560
  protected final String TEXT_539 = " filter = ";
561
  protected final String TEXT_540 = " 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 = ";
561
  protected final String TEXT_540 = ".createFeatureFilter(";
562
  protected final String TEXT_541 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= ";
562
  protected final String TEXT_541 = ".eINSTANCE.get";
563
  protected final String TEXT_542 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= ";
563
  protected final String TEXT_542 = "());";
564
  protected final String TEXT_543 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t";
564
  protected final String TEXT_543 = NL + "\t\t\tfilter = filter.or(";
565
  protected final String TEXT_544 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t";
565
  protected final String TEXT_544 = ".createFeatureFilter(";
566
  protected final String TEXT_545 = " 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 ";
566
  protected final String TEXT_545 = ".eINSTANCE.get";
567
  protected final String TEXT_546 = "(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}";
567
  protected final String TEXT_546 = "()));";
568
  protected final String TEXT_547 = "\t" + NL + "\t}";
568
  protected final String TEXT_547 = NL;
569
  protected final String TEXT_548 = 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 ";
569
  protected final String TEXT_548 = NL + "\t\t\t";
570
  protected final String TEXT_549 = " createdFont;";
570
  protected final String TEXT_549 = " filter = ";
571
  protected final String TEXT_550 = "\t" + NL;
571
  protected final String TEXT_550 = ".createFeatureFilter(";
572
  protected final String TEXT_551 = NL;
572
  protected final String TEXT_551 = ".eINSTANCE.get";
573
  protected final String TEXT_552 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t";
573
  protected final String TEXT_552 = "());";
574
  protected final String TEXT_553 = " style = (";
574
  protected final String TEXT_553 = NL + "\t\t\tfilter = filter.or(";
575
  protected final String TEXT_554 = ")  ";
575
  protected final String TEXT_554 = ".createFeatureFilter(";
576
  protected final String TEXT_555 = ".getStyle(";
576
  protected final String TEXT_555 = ".eINSTANCE.get";
577
  protected final String TEXT_556 = ".eINSTANCE.getLineStyle());" + NL + "\t\t";
577
  protected final String TEXT_556 = "()));";
578
  protected final String TEXT_557 = " 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";
578
  protected final String TEXT_557 = NL;
579
  protected final String TEXT_558 = " 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 ";
579
  protected final String TEXT_558 = NL + "\t\t\t";
580
  protected final String TEXT_559 = "(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 ";
580
  protected final String TEXT_559 = " filter = ";
581
  protected final String TEXT_560 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t";
581
  protected final String TEXT_560 = ".createFeatureFilter(";
582
  protected final String TEXT_561 = " style = (";
582
  protected final String TEXT_561 = ".eINSTANCE.get";
583
  protected final String TEXT_562 = ")  ";
583
  protected final String TEXT_562 = "());";
584
  protected final String TEXT_563 = ".getStyle(";
584
  protected final String TEXT_563 = NL + "\t\t\tfilter = filter.or(";
585
  protected final String TEXT_564 = ".eINSTANCE.getFillStyle());" + NL + "\t\t";
585
  protected final String TEXT_564 = ".createFeatureFilter(";
586
  protected final String TEXT_565 = " 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";
586
  protected final String TEXT_565 = ".eINSTANCE.get";
587
  protected final String TEXT_566 = " 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 ";
587
  protected final String TEXT_566 = "()));";
588
  protected final String TEXT_567 = "(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 ";
588
  protected final String TEXT_567 = NL + "\t\t\tfilter = getConstrainedChildLinksFilter().or(filter);";
589
  protected final String TEXT_568 = " createdBackgroundColor;" + NL;
589
  protected final String TEXT_568 = NL + "\t\t\t";
590
  protected final String TEXT_569 = NL;
590
  protected final String TEXT_569 = " filter = getConstrainedChildLinksFilter();";
591
  protected final String TEXT_570 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
591
  protected final String TEXT_570 = NL + "\t\t\tfilter = filter.or(createUncontainedLinksFilter());";
592
  protected final String TEXT_571 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(";
592
  protected final String TEXT_571 = NL + "\t\t\t";
593
  protected final String TEXT_572 = " feature, ";
593
  protected final String TEXT_572 = " filter = createUncontainedLinksFilter();";
594
  protected final String TEXT_573 = " 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 ";
594
  protected final String TEXT_573 = NL + "\t\t\t";
595
  protected final String TEXT_574 = "();";
595
  protected final String TEXT_574 = " filter = ";
596
  protected final String TEXT_575 = NL;
596
  protected final String TEXT_575 = ".NOT_TOUCH;";
597
  protected final String TEXT_576 = "\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(";
597
  protected final String TEXT_576 = NL + "\t\t\treturn filter;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t \t * @generated" + NL + "\t \t */" + NL + "\t\tprotected ";
598
  protected final String TEXT_577 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
598
  protected final String TEXT_577 = " getCreateNotationalElementCommand(";
599
  protected final String TEXT_578 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);";
599
  protected final String TEXT_578 = " descriptor) {" + NL + "\t\t\t";
600
  protected final String TEXT_579 = NL;
600
  protected final String TEXT_579 = " linkDescriptor = (";
601
  protected final String TEXT_580 = "\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(";
601
  protected final String TEXT_580 = ") descriptor;" + NL + "\t\t\t";
602
  protected final String TEXT_581 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
602
  protected final String TEXT_581 = " sourceView = getViewService().findView(linkDescriptor.getSource());" + NL + "\t\t\t";
603
  protected final String TEXT_582 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
603
  protected final String TEXT_582 = " targetView = getViewService().findView(linkDescriptor.getDestination());" + NL + "\t\t\tif (sourceView == null || targetView == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\t";
604
  protected final String TEXT_583 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
604
  protected final String TEXT_583 = " createdEdge = ";
605
  protected final String TEXT_584 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
605
  protected final String TEXT_584 = ".eINSTANCE.createEdge();" + NL + "\t\t\tswitch (linkDescriptor.getVisualID()) {";
606
  protected final String TEXT_585 = ".eINSTANCE.getLocation_Y(), boundsRefresher);";
606
  protected final String TEXT_585 = NL + "\t\t\tcase ";
607
  protected final String TEXT_586 = NL;
607
  protected final String TEXT_586 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() instanceof ";
608
  protected final String TEXT_587 = "\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(";
608
  protected final String TEXT_587 = ") {" + NL + "\t\t\t\t\tcreatedEdge.setElement(linkDescriptor.getElement());" + NL + "\t\t\t\t\t";
609
  protected final String TEXT_588 = ".eINSTANCE.getView_Visible(), visibilityRefresher);";
609
  protected final String TEXT_588 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
610
  protected final String TEXT_589 = NL;
610
  protected final String TEXT_589 = NL + "\t\t\tcase ";
611
  protected final String TEXT_590 = "\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(";
611
  protected final String TEXT_590 = ".VISUAL_ID:" + NL + "\t\t\t\tif (linkDescriptor.getElement() == null) {" + NL + "\t\t\t\t\tcreatedEdge.setElement(null);" + NL + "\t\t\t\t\t";
612
  protected final String TEXT_591 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);";
612
  protected final String TEXT_591 = ".decorateView(createdEdge);" + NL + "\t\t\t\t}" + NL + "\t\t\t\tbreak;";
613
  protected final String TEXT_592 = NL;
613
  protected final String TEXT_592 = NL + "\t\t\t}" + NL + "\t\t\tif (createdEdge.getType() == null) {" + NL + "\t\t\t\treturn null;" + NL + "\t\t\t}" + NL + "\t\t\treturn new ";
614
  protected final String TEXT_593 = "\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(";
614
  protected final String TEXT_593 = "(getHost().getDiagram(), createdEdge, sourceView, targetView);" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
615
  protected final String TEXT_594 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);";
615
  protected final String TEXT_594 = " getSemanticChildLinks() {";
616
  protected final String TEXT_595 = NL;
616
  protected final String TEXT_595 = NL;
617
  protected final String TEXT_596 = "\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(";
617
  protected final String TEXT_596 = "\t";
618
  protected final String TEXT_597 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
618
  protected final String TEXT_597 = " result = new ";
619
  protected final String TEXT_598 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
619
  protected final String TEXT_598 = "();";
620
  protected final String TEXT_599 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
620
  protected final String TEXT_599 = NL + "\t";
621
  protected final String TEXT_600 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t";
621
  protected final String TEXT_600 = " modelObject = ";
622
  protected final String TEXT_601 = NL;
622
  protected final String TEXT_601 = ".getElement();" + NL + "\t";
623
  protected final String TEXT_602 = "\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(";
623
  protected final String TEXT_602 = " nextValue;";
624
  protected final String TEXT_603 = ".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(";
624
  protected final String TEXT_603 = NL + "\tint linkVID;";
625
  protected final String TEXT_604 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL;
625
  protected final String TEXT_604 = NL + "\tfor(";
626
  protected final String TEXT_605 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect";
626
  protected final String TEXT_605 = " it = ";
627
  protected final String TEXT_606 = "SourceCommand extends ";
627
  protected final String TEXT_606 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
628
  protected final String TEXT_607 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
628
  protected final String TEXT_607 = ") it.next();";
629
  protected final String TEXT_608 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
629
  protected final String TEXT_608 = NL + "\tnextValue = (";
630
  protected final String TEXT_609 = " newSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
630
  protected final String TEXT_609 = ")";
631
  protected final String TEXT_610 = " oldSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
631
  protected final String TEXT_610 = ";";
632
  protected final String TEXT_611 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
632
  protected final String TEXT_611 = NL + "\tlinkVID = ";
633
  protected final String TEXT_612 = "SourceCommand(";
633
  protected final String TEXT_612 = ".INSTANCE.getLinkWithClassVisualID(nextValue);";
634
  protected final String TEXT_613 = " request) {" + NL + "\t\t\tthis((";
634
  protected final String TEXT_613 = NL + "\tswitch (linkVID) {";
635
  protected final String TEXT_614 = ")request.getConnectionEditPart().getModel(), (";
635
  protected final String TEXT_614 = NL + "\tcase ";
636
  protected final String TEXT_615 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
636
  protected final String TEXT_615 = ".VISUAL_ID: {";
637
  protected final String TEXT_616 = "SourceCommand(";
637
  protected final String TEXT_616 = NL + "\tif (";
638
  protected final String TEXT_617 = " edge, ";
638
  protected final String TEXT_617 = ".VISUAL_ID == linkVID) {";
639
  protected final String TEXT_618 = " newSource) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newSource = newSource;" + NL + "\t\t\tthis.oldSource = edge.getSource();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + 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\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {";
639
  protected final String TEXT_618 = NL + "\t\t";
640
  protected final String TEXT_619 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal ";
640
  protected final String TEXT_619 = " source = (";
641
  protected final String TEXT_620 = " domainModelEditDomain = ";
641
  protected final String TEXT_620 = ")";
642
  protected final String TEXT_621 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t";
642
  protected final String TEXT_621 = ";";
643
  protected final String TEXT_622 = " command = new ";
643
  protected final String TEXT_622 = NL + "\t\t";
644
  protected final String TEXT_623 = "() {" + NL + "\t\t\t\tprivate ";
644
  protected final String TEXT_623 = " source = ";
645
  protected final String TEXT_624 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew ";
645
  protected final String TEXT_624 = ".getElement();";
646
  protected final String TEXT_625 = "(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();";
646
  protected final String TEXT_625 = NL + "\t\t";
647
  protected final String TEXT_626 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;";
647
  protected final String TEXT_626 = " target = (";
648
  protected final String TEXT_627 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {";
648
  protected final String TEXT_627 = ")";
649
  protected final String TEXT_628 = NL + "\t\t\treturn false;";
649
  protected final String TEXT_628 = ";";
650
  protected final String TEXT_629 = NL + "\t\t\t";
650
  protected final String TEXT_629 = NL + "\t\t";
651
  protected final String TEXT_630 = " container = (";
651
  protected final String TEXT_630 = " target = ";
652
  protected final String TEXT_631 = ")getRelationshipContainer(newSource.getElement(), ";
652
  protected final String TEXT_631 = ".getElement();";
653
  protected final String TEXT_632 = ".eINSTANCE.get";
653
  protected final String TEXT_632 = NL + "\t\tif (source != null && target != null) {" + NL + "\t\t\tresult.add(new ";
654
  protected final String TEXT_633 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
654
  protected final String TEXT_633 = "(source, target, nextValue, linkVID));" + NL + "\t\t}";
655
  protected final String TEXT_634 = NL;
655
  protected final String TEXT_634 = NL + "\t\tbreak;" + NL + "\t}";
656
  protected final String TEXT_635 = NL + "\t\tif (";
656
  protected final String TEXT_635 = NL + "\t}";
657
  protected final String TEXT_636 = " != null) {" + NL + "\t\t\t";
657
  protected final String TEXT_636 = NL + "\t}";
658
  protected final String TEXT_637 = NL + "\t\t}";
658
  protected final String TEXT_637 = NL + "\t}";
659
  protected final String TEXT_638 = NL + "\t\tif (";
659
  protected final String TEXT_638 = NL + "\tfor(";
660
  protected final String TEXT_639 = ".size() >= ";
660
  protected final String TEXT_639 = " it = ";
661
  protected final String TEXT_640 = ".eINSTANCE.get";
661
  protected final String TEXT_640 = ".iterator(); it.hasNext(); ) {" + NL + "\t\tnextValue = (";
662
  protected final String TEXT_641 = ".getUpperBound()) {" + NL + "\t\t\t";
662
  protected final String TEXT_641 = ") it.next();";
663
  protected final String TEXT_642 = NL + "\t\t}";
663
  protected final String TEXT_642 = NL + "\tnextValue = (";
664
  protected final String TEXT_643 = NL;
664
  protected final String TEXT_643 = ")";
665
  protected final String TEXT_644 = NL + "\t\tif (";
665
  protected final String TEXT_644 = ";";
666
  protected final String TEXT_645 = " != null) {" + NL + "\t\t\t";
666
  protected final String TEXT_645 = NL + "\tif (nextValue != null) {";
667
  protected final String TEXT_646 = NL + "\t\t}";
667
  protected final String TEXT_646 = NL + "\t\tresult.add(new ";
668
  protected final String TEXT_647 = NL + "\t\tif (";
668
  protected final String TEXT_647 = "(modelObject, nextValue, null, ";
669
  protected final String TEXT_648 = ".size() >= ";
669
  protected final String TEXT_648 = ".VISUAL_ID));";
670
  protected final String TEXT_649 = ".eINSTANCE.get";
670
  protected final String TEXT_649 = NL + "\t}";
671
  protected final String TEXT_650 = ".getUpperBound()) {" + NL + "\t\t\t";
671
  protected final String TEXT_650 = NL + "\t}";
672
  protected final String TEXT_651 = NL + "\t\t}";
672
  protected final String TEXT_651 = NL + "\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
673
  protected final String TEXT_652 = NL;
673
  protected final String TEXT_652 = " getNotationalChildLinks() {" + NL + "\t\t\t";
674
  protected final String TEXT_653 = NL + "\t\t\tif(!";
674
  protected final String TEXT_653 = " result = new ";
675
  protected final String TEXT_654 = ".canCreateLink(";
675
  protected final String TEXT_654 = "();" + NL + "\t\t\t";
676
  protected final String TEXT_655 = ", ";
676
  protected final String TEXT_655 = " allLinks = ";
677
  protected final String TEXT_656 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
677
  protected final String TEXT_656 = ".getEdges();" + NL + "\t\t\tfor(";
678
  protected final String TEXT_657 = NL + "\t\t\treturn true;";
678
  protected final String TEXT_657 = " it = allLinks.iterator(); it.hasNext(); ) {" + NL + "\t\t\t\t";
679
  protected final String TEXT_658 = NL;
679
  protected final String TEXT_658 = " next = (";
680
  protected final String TEXT_659 = NL + "\t\tif (";
680
  protected final String TEXT_659 = ") it.next();";
681
  protected final String TEXT_660 = " != null) {" + NL + "\t\t\t";
681
  protected final String TEXT_660 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null && next.getElement().eResource() == null) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
682
  protected final String TEXT_661 = NL + "\t\t}";
682
  protected final String TEXT_661 = " source = next.getSource();" + NL + "\t\t\t\tif (source == null || (source.isSetElement() && source.getElement() != null && source.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}" + NL + "\t\t\t\t";
683
  protected final String TEXT_662 = NL + "\t\tif (";
683
  protected final String TEXT_662 = " target = next.getTarget();" + NL + "\t\t\t\tif (target == null || (target.isSetElement() && target.getElement() != null && target.getElement().eResource() == null)) {" + NL + "\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\tcontinue;" + NL + "\t\t\t\t}";
684
  protected final String TEXT_663 = ".size() >= ";
684
  protected final String TEXT_663 = NL + "\t\t\t\tif (!next.isSetElement() || next.getElement() == null) {" + NL + "\t\t\t\t\tif (next.getSource() == ";
685
  protected final String TEXT_664 = ".eINSTANCE.get";
685
  protected final String TEXT_664 = ") {" + NL + "\t\t\t\t\t\tint linkVID = ";
686
  protected final String TEXT_665 = ".getUpperBound()) {" + NL + "\t\t\t";
686
  protected final String TEXT_665 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
687
  protected final String TEXT_666 = NL + "\t\t}";
687
  protected final String TEXT_666 = NL + "\t\t\t\t\t\tcase ";
688
  protected final String TEXT_667 = NL;
688
  protected final String TEXT_667 = ".VISUAL_ID:";
689
  protected final String TEXT_668 = NL + "\t\t\tif(!";
689
  protected final String TEXT_668 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}";
690
  protected final String TEXT_669 = ".canCreateLink(";
690
  protected final String TEXT_669 = NL + "\t\t\t\t} else {";
691
  protected final String TEXT_670 = ", ";
691
  protected final String TEXT_670 = NL + "\t\t\t\t}";
692
  protected final String TEXT_671 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
692
  protected final String TEXT_671 = NL + "\t\t\t\tif (next.isSetElement() && next.getElement() != null) {";
693
  protected final String TEXT_672 = NL + "\t\t\treturn true;";
693
  protected final String TEXT_672 = NL + "\t\t\t\t\tif (next.getElement().eContainer() == ";
694
  protected final String TEXT_673 = NL + "\t\t\treturn false;";
694
  protected final String TEXT_673 = ".getElement()) {" + NL + "\t\t\t\t\t\tint linkVID = ";
695
  protected final String TEXT_674 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
695
  protected final String TEXT_674 = ".getVisualID(next);" + NL + "\t\t\t\t\t\tswitch (linkVID) {";
696
  protected final String TEXT_675 = " createReconnectCommand() {" + NL + "\t\t\t";
696
  protected final String TEXT_675 = NL + "\t\t\t\t\t\tcase ";
697
  protected final String TEXT_676 = " editingDomain = ";
697
  protected final String TEXT_676 = ".VISUAL_ID:";
698
  protected final String TEXT_677 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t";
698
  protected final String TEXT_677 = NL + "\t\t\t\t\t\t\tresult.add(next);" + NL + "\t\t\t\t\t\t\tbreak;" + NL + "\t\t\t\t\t\t}" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}";
699
  protected final String TEXT_678 = " result = new ";
699
  protected final String TEXT_678 = NL + "\t\t\t}" + NL + "\t\t\treturn result;" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * Returns whether a notational edge should be created for the given domain element. " + NL + "\t\t * The generated code always returns ";
700
  protected final String TEXT_679 = "();" + NL + "\t\t\tresult.append(new ";
700
  protected final String TEXT_679 = ". " + NL + "\t\t * User can change implementation of this method to handle a more sophisticated logic." + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean shouldCreateView(";
701
  protected final String TEXT_680 = "(edge, newSource));";
701
  protected final String TEXT_680 = " descriptor) {" + NL + "\t\t\treturn ";
702
  protected final String TEXT_681 = NL + "\t\t\t";
702
  protected final String TEXT_681 = ";" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected ";
703
  protected final String TEXT_682 = " container = getRelationshipContainer(newSource.getElement(), ";
703
  protected final String TEXT_682 = " getHost() {" + NL + "\t\t\treturn ";
704
  protected final String TEXT_683 = ".eINSTANCE.get";
704
  protected final String TEXT_683 = ";" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshLinkNotationModel() {" + NL + "\t\t";
705
  protected final String TEXT_684 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn ";
705
  protected final String TEXT_684 = " linkRefresher = getLinkNotationModelRefresher();" + NL + "\t\tif (!linkRefresher.isInstalled()) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
706
  protected final String TEXT_685 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\t";
706
  protected final String TEXT_685 = " command = linkRefresher.buildRefreshNotationModelCommand();" + NL + "\t\tif (command == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t";
707
  protected final String TEXT_686 = " oldContainer = edge.getElement().eContainer();" + NL + "\t\t\tif (oldContainer == null) {" + NL + "\t\t\t\treturn ";
707
  protected final String TEXT_686 = " domainModelEditDomain = ";
708
  protected final String TEXT_687 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tif (oldContainer != container) {";
708
  protected final String TEXT_687 = ".getEditingDomain(";
709
  protected final String TEXT_688 = NL + "\t\t\t\tresult.append(";
709
  protected final String TEXT_688 = ".getElement());" + NL + "\t\tgetViewer().getEditDomain().getCommandStack().execute(new ";
710
  protected final String TEXT_689 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), edge.getElement()));";
710
  protected final String TEXT_689 = "(domainModelEditDomain, command));" + NL + "\t}";
711
  protected final String TEXT_690 = NL + "\t\t\t\tresult.append(";
711
  protected final String TEXT_690 = NL;
712
  protected final String TEXT_691 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), ";
712
  protected final String TEXT_691 = NL;
713
  protected final String TEXT_692 = ".UNSET_VALUE));";
713
  protected final String TEXT_692 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
714
  protected final String TEXT_693 = NL + "\t\t\t\tresult.append(";
714
  protected final String TEXT_693 = " domainModelRefresher = new ";
715
  protected final String TEXT_694 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, ";
715
  protected final String TEXT_694 = "(this);" + NL;
716
  protected final String TEXT_695 = ".eINSTANCE.get";
716
  protected final String TEXT_695 = NL;
717
  protected final String TEXT_696 = "(), edge.getElement()));";
717
  protected final String TEXT_696 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void addRefresher(";
718
  protected final String TEXT_697 = NL + "\t\t\t\tresult.append(";
718
  protected final String TEXT_697 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void removeRefresher(";
719
  protected final String TEXT_698 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), ";
719
  protected final String TEXT_698 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate CompositeRefresher getCompositeRefresher(";
720
  protected final String TEXT_699 = ".eINSTANCE.get";
720
  protected final String TEXT_699 = " 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;
721
  protected final String TEXT_700 = "()," + NL + "\t\t\t\t\tedge.getElement()));";
721
  protected final String TEXT_700 = NL;
722
  protected final String TEXT_701 = NL + "\t\t\t\tresult.append(";
722
  protected final String TEXT_701 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {";
723
  protected final String TEXT_702 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), ";
723
  protected final String TEXT_702 = NL + "\t\t";
724
  protected final String TEXT_703 = ".eINSTANCE.get";
724
  protected final String TEXT_703 = " style =" + NL + "\t\t\t(";
725
  protected final String TEXT_704 = "()," + NL + "\t\t\t\t\t";
725
  protected final String TEXT_704 = ") ";
726
  protected final String TEXT_705 = ".UNSET_VALUE));";
726
  protected final String TEXT_705 = ".getStyle(" + NL + "\t\t\t\t";
727
  protected final String TEXT_706 = NL + "\t\t\t\tresult.append(";
727
  protected final String TEXT_706 = ".eINSTANCE.getFontStyle());" + NL + "\t\t";
728
  protected final String TEXT_707 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, ";
728
  protected final String TEXT_707 = " 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 = ";
729
  protected final String TEXT_708 = ".eINSTANCE.get";
729
  protected final String TEXT_708 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= ";
730
  protected final String TEXT_709 = "(), edge.getElement()));";
730
  protected final String TEXT_709 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= ";
731
  protected final String TEXT_710 = NL + "\t\t\t}";
731
  protected final String TEXT_710 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t";
732
  protected final String TEXT_711 = NL + "\t\t\tresult.append(";
732
  protected final String TEXT_711 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t";
733
  protected final String TEXT_712 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
733
  protected final String TEXT_712 = " 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 ";
734
  protected final String TEXT_713 = ".eINSTANCE.get";
734
  protected final String TEXT_713 = "(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}";
735
  protected final String TEXT_714 = "()," + NL + "\t\t\t\toldSource.getElement()));" + NL + "\t\t\tresult.append(";
735
  protected final String TEXT_714 = "\t" + NL + "\t}";
736
  protected final String TEXT_715 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
736
  protected final String TEXT_715 = 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 ";
737
  protected final String TEXT_716 = ".eINSTANCE.get";
737
  protected final String TEXT_716 = " createdFont;";
738
  protected final String TEXT_717 = "()," + NL + "\t\t\t\tnewSource.getElement()));";
738
  protected final String TEXT_717 = "\t" + NL;
739
  protected final String TEXT_718 = NL + "\t\t\tresult.append(";
739
  protected final String TEXT_718 = NL;
740
  protected final String TEXT_719 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
740
  protected final String TEXT_719 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t";
741
  protected final String TEXT_720 = ".eINSTANCE.get";
741
  protected final String TEXT_720 = " style = (";
742
  protected final String TEXT_721 = "()," + NL + "\t\t\t\tnewSource.getElement()));";
742
  protected final String TEXT_721 = ")  ";
743
  protected final String TEXT_722 = NL + "\t\t\tresult.append(";
743
  protected final String TEXT_722 = ".getStyle(";
744
  protected final String TEXT_723 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), ";
744
  protected final String TEXT_723 = ".eINSTANCE.getLineStyle());" + NL + "\t\t";
745
  protected final String TEXT_724 = ".eINSTANCE.get";
745
  protected final String TEXT_724 = " 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";
746
  protected final String TEXT_725 = "(), edge.getTarget().getElement()));" + NL + "\t\t\tresult.append(";
746
  protected final String TEXT_725 = " 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 ";
747
  protected final String TEXT_726 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), ";
747
  protected final String TEXT_726 = "(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 ";
748
  protected final String TEXT_727 = ".eINSTANCE.get";
748
  protected final String TEXT_727 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t";
749
  protected final String TEXT_728 = "(), edge.getTarget().getElement()));";
749
  protected final String TEXT_728 = " style = (";
750
  protected final String TEXT_729 = NL + "\t\t\tresult.append(";
750
  protected final String TEXT_729 = ")  ";
751
  protected final String TEXT_730 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), ";
751
  protected final String TEXT_730 = ".getStyle(";
752
  protected final String TEXT_731 = ".eINSTANCE.get";
752
  protected final String TEXT_731 = ".eINSTANCE.getFillStyle());" + NL + "\t\t";
753
  protected final String TEXT_732 = "(), ";
753
  protected final String TEXT_732 = " 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";
754
  protected final String TEXT_733 = ".UNSET_VALUE));" + NL + "\t\t\tresult.append(";
754
  protected final String TEXT_733 = " 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 ";
755
  protected final String TEXT_734 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), ";
755
  protected final String TEXT_734 = "(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 ";
756
  protected final String TEXT_735 = ".eINSTANCE.get";
756
  protected final String TEXT_735 = " createdBackgroundColor;" + NL;
757
  protected final String TEXT_736 = "(), edge.getTarget().getElement()));";
757
  protected final String TEXT_736 = NL;
758
  protected final String TEXT_737 = NL + "\t\t\treturn result;" + NL + "\t\t}" + NL;
758
  protected final String TEXT_737 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
759
  protected final String TEXT_738 = NL;
759
  protected final String TEXT_738 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher(";
760
  protected final String TEXT_739 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the 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 ";
760
  protected final String TEXT_739 = " feature, ";
761
  protected final String TEXT_740 = " getRelationshipContainer(";
761
  protected final String TEXT_740 = " 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 ";
762
  protected final String TEXT_741 = " element, ";
762
  protected final String TEXT_741 = "();";
763
  protected final String TEXT_742 = " 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}";
763
  protected final String TEXT_742 = NL;
764
  protected final String TEXT_743 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */";
764
  protected final String TEXT_743 = "\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(";
765
  protected final String TEXT_744 = NL;
765
  protected final String TEXT_744 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
766
  protected final String TEXT_745 = NL + "\t\t\tprivate ";
766
  protected final String TEXT_745 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);";
767
  protected final String TEXT_746 = " createDomainModelRemoveCommand(";
767
  protected final String TEXT_746 = NL;
768
  protected final String TEXT_747 = " editingDomain) {";
768
  protected final String TEXT_747 = "\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(";
769
  protected final String TEXT_748 = NL + "\t\t\t\t";
769
  protected final String TEXT_748 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
770
  protected final String TEXT_749 = " result = new ";
770
  protected final String TEXT_749 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
771
  protected final String TEXT_750 = "();";
771
  protected final String TEXT_750 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
772
  protected final String TEXT_751 = NL + "\t\t\t\tresult.append(";
772
  protected final String TEXT_751 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
773
  protected final String TEXT_752 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
773
  protected final String TEXT_752 = ".eINSTANCE.getLocation_Y(), boundsRefresher);";
774
  protected final String TEXT_753 = ".getElement().eContainer(), ";
774
  protected final String TEXT_753 = NL;
775
  protected final String TEXT_754 = ".getElement().eContainmentFeature(), ";
775
  protected final String TEXT_754 = "\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(";
776
  protected final String TEXT_755 = ".getElement()));";
776
  protected final String TEXT_755 = ".eINSTANCE.getView_Visible(), visibilityRefresher);";
777
  protected final String TEXT_756 = NL + "\t\t\t\tresult.append(";
777
  protected final String TEXT_756 = NL;
778
  protected final String TEXT_757 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
778
  protected final String TEXT_757 = "\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(";
779
  protected final String TEXT_758 = ".getElement().eContainer(), ";
779
  protected final String TEXT_758 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);";
780
  protected final String TEXT_759 = ".getElement().eContainmentFeature(), ";
780
  protected final String TEXT_759 = NL;
781
  protected final String TEXT_760 = ".UNSET_VALUE));";
781
  protected final String TEXT_760 = "\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(";
782
  protected final String TEXT_761 = NL + "\t\t\t\treturn ";
782
  protected final String TEXT_761 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);";
783
  protected final String TEXT_762 = ".INSTANCE;";
783
  protected final String TEXT_762 = NL;
784
  protected final String TEXT_763 = NL + "\t\t\t\tresult.append(";
784
  protected final String TEXT_763 = "\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(";
785
  protected final String TEXT_764 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
785
  protected final String TEXT_764 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
786
  protected final String TEXT_765 = ".getElement().eContainer(), ";
786
  protected final String TEXT_765 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
787
  protected final String TEXT_766 = ".eINSTANCE.get";
787
  protected final String TEXT_766 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put(";
788
  protected final String TEXT_767 = "()," + NL + "\t\t\t\t\t";
788
  protected final String TEXT_767 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t";
789
  protected final String TEXT_768 = ".getElement()));";
789
  protected final String TEXT_768 = NL;
790
  protected final String TEXT_769 = NL + "\t\t\t\tresult.append(";
790
  protected final String TEXT_769 = "\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(";
791
  protected final String TEXT_770 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
791
  protected final String TEXT_770 = ".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(";
792
  protected final String TEXT_771 = ".getElement().eContainer(), ";
792
  protected final String TEXT_771 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL;
793
  protected final String TEXT_772 = ".eINSTANCE.get";
793
  protected final String TEXT_772 = NL;
794
  protected final String TEXT_773 = "()," + NL + "\t\t\t\t\t";
794
  protected final String TEXT_773 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
795
  protected final String TEXT_774 = ".UNSET_VALUE));";
795
  protected final String TEXT_774 = "static ";
796
  protected final String TEXT_775 = NL + "\t\t\t\tresult.append(";
796
  protected final String TEXT_775 = "class Create";
797
  protected final String TEXT_776 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
797
  protected final String TEXT_776 = "NotationCommand extends ";
798
  protected final String TEXT_777 = ".getElement(), ";
798
  protected final String TEXT_777 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate Create";
799
  protected final String TEXT_778 = ".eINSTANCE.get";
799
  protected final String TEXT_778 = "NotationCommand(";
800
  protected final String TEXT_779 = "(), ";
800
  protected final String TEXT_779 = " parent, " + NL + "\t\t\t\t";
801
  protected final String TEXT_780 = ".getSource().getElement()));";
801
  protected final String TEXT_780 = " domainElement";
802
  protected final String TEXT_781 = NL + "\t\t\t\tresult.append(";
802
  protected final String TEXT_781 = ", ";
803
  protected final String TEXT_782 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
803
  protected final String TEXT_782 = " constraint";
804
  protected final String TEXT_783 = ".getElement(), ";
804
  protected final String TEXT_783 = ") {" + NL + "\t\t\tsuper(parent);" + NL + "\t\t\tNode createdNode = ";
805
  protected final String TEXT_784 = ".eINSTANCE.get";
805
  protected final String TEXT_784 = ".eINSTANCE.createNode();" + NL + "\t\t\tsetCreatedView(createdNode);" + NL + "\t\t\tcreatedNode.setElement(domainElement);" + NL + "\t\t\t";
806
  protected final String TEXT_785 = "(), ";
806
  protected final String TEXT_785 = ".decorateView(createdNode);";
807
  protected final String TEXT_786 = ".UNSET_VALUE));";
807
  protected final String TEXT_786 = NL + "\t\t\t";
808
  protected final String TEXT_787 = NL + "\t\t\t\tresult.append(";
808
  protected final String TEXT_787 = " bounds = ";
809
  protected final String TEXT_788 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
809
  protected final String TEXT_788 = ".eINSTANCE.createBounds();" + NL + "\t\t\tcreatedNode.setLayoutConstraint(bounds);" + NL + "\t\t\tbounds.setX(constraint.x);" + NL + "\t\t\tbounds.setY(constraint.y);";
810
  protected final String TEXT_789 = ".getElement(), ";
810
  protected final String TEXT_789 = NL + "\t\t\tbounds.setWidth(Math.max(constraint.width, ";
811
  protected final String TEXT_790 = ".eINSTANCE.get";
811
  protected final String TEXT_790 = "));" + NL + "\t\t\tbounds.setHeight(Math.max(constraint.height, ";
812
  protected final String TEXT_791 = "(), ";
812
  protected final String TEXT_791 = "));";
813
  protected final String TEXT_792 = ".getTarget().getElement()));";
813
  protected final String TEXT_792 = NL + "\t\t}" + NL + "\t}" + NL;
814
  protected final String TEXT_793 = NL + "\t\t\t\tresult.append(";
814
  protected final String TEXT_793 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate ";
815
  protected final String TEXT_794 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
815
  protected final String TEXT_794 = "static ";
816
  protected final String TEXT_795 = ".getElement(), ";
816
  protected final String TEXT_795 = "class Create";
817
  protected final String TEXT_796 = ".eINSTANCE.get";
817
  protected final String TEXT_796 = "Command extends ";
818
  protected final String TEXT_797 = "(), ";
818
  protected final String TEXT_797 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final Create";
819
  protected final String TEXT_798 = ".UNSET_VALUE));";
819
  protected final String TEXT_798 = "NotationCommand notationAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
820
  protected final String TEXT_799 = NL + "\t\t\t\treturn result;";
820
  protected final String TEXT_799 = "Command(";
821
  protected final String TEXT_800 = NL + "\t\t\t\treturn ";
821
  protected final String TEXT_800 = " parent, ";
822
  protected final String TEXT_801 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
822
  protected final String TEXT_801 = " request";
823
  protected final String TEXT_802 = ".getSource().getElement(), ";
823
  protected final String TEXT_802 = ", ";
824
  protected final String TEXT_803 = ".eINSTANCE.get";
824
  protected final String TEXT_803 = " constraint";
825
  protected final String TEXT_804 = "(), ";
825
  protected final String TEXT_804 = ") {" + NL + "\t\t\t";
826
  protected final String TEXT_805 = ".getTarget().getElement());";
826
  protected final String TEXT_805 = " domainModelEditDomain = ";
827
  protected final String TEXT_806 = NL + "\t\t\t\treturn ";
827
  protected final String TEXT_806 = ".getEditingDomain(parent.getDiagram().getElement());";
828
  protected final String TEXT_807 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
828
  protected final String TEXT_807 = NL + "\t\t\t";
829
  protected final String TEXT_808 = ".getSource().getElement(), ";
829
  protected final String TEXT_808 = " createdDomainElement = ";
830
  protected final String TEXT_809 = ".eINSTANCE.get";
830
  protected final String TEXT_809 = ".eINSTANCE.create(" + NL + "\t\t\t\t";
831
  protected final String TEXT_810 = "(), ";
831
  protected final String TEXT_810 = ".eINSTANCE.get";
832
  protected final String TEXT_811 = ".UNSET_VALUE);";
832
  protected final String TEXT_811 = "());";
833
  protected final String TEXT_812 = NL + "\t\t\t}";
833
  protected final String TEXT_812 = NL + "\t\t\t";
834
  protected final String TEXT_813 = NL + "\t}" + NL;
834
  protected final String TEXT_813 = " createdDomainElement = ";
835
  protected final String TEXT_814 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create";
835
  protected final String TEXT_814 = ".eINSTANCE.create";
836
  protected final String TEXT_815 = "StartCommand extends ";
836
  protected final String TEXT_815 = "();";
837
  protected final String TEXT_816 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
837
  protected final String TEXT_816 = NL + "\t\t\t";
838
  protected final String TEXT_817 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
838
  protected final String TEXT_817 = NL + "\t\t\t";
839
  protected final String TEXT_818 = "StartCommand(";
839
  protected final String TEXT_818 = ".";
840
  protected final String TEXT_819 = " requestEx) {" + NL + "\t\t\t//Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart()." + NL + "\t\t\tsource = (";
840
  protected final String TEXT_819 = ".initializeElement(";
841
  protected final String TEXT_820 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {" + NL + "\t\t\tif (source == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
841
  protected final String TEXT_820 = "(";
842
  protected final String TEXT_821 = NL + "\t\t\treturn false;";
842
  protected final String TEXT_821 = ") ";
843
  protected final String TEXT_822 = NL + "\t\t\t";
843
  protected final String TEXT_822 = "createdDomainElement);";
844
  protected final String TEXT_823 = " container = (";
844
  protected final String TEXT_823 = NL + "\t\t\t";
845
  protected final String TEXT_824 = ")getRelationshipContainer(source.getElement(), ";
845
  protected final String TEXT_824 = " compoundCommand = new ";
846
  protected final String TEXT_825 = ".eINSTANCE.get";
846
  protected final String TEXT_825 = "();" + NL + "\t\t\tcompoundCommand.append(";
847
  protected final String TEXT_826 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
847
  protected final String TEXT_826 = ".create(domainModelEditDomain, ";
848
  protected final String TEXT_827 = NL;
848
  protected final String TEXT_827 = ", " + NL + "\t\t\t\t";
849
  protected final String TEXT_828 = NL + "\t\tif (";
849
  protected final String TEXT_828 = ".eINSTANCE.get";
850
  protected final String TEXT_829 = " != null) {" + NL + "\t\t\t";
850
  protected final String TEXT_829 = "(), createdDomainElement));" + NL + "\t\t\tcompoundCommand.append(";
851
  protected final String TEXT_830 = NL + "\t\t}";
851
  protected final String TEXT_830 = ".create(domainModelEditDomain, ";
852
  protected final String TEXT_831 = NL + "\t\tif (";
852
  protected final String TEXT_831 = ", " + NL + "\t\t\t\t";
853
  protected final String TEXT_832 = ".size() >= ";
853
  protected final String TEXT_832 = ".eINSTANCE.get";
854
  protected final String TEXT_833 = ".eINSTANCE.get";
854
  protected final String TEXT_833 = "(), createdDomainElement));" + NL + "\t\t\tthis.domainModelAddCommand = compoundCommand;";
855
  protected final String TEXT_834 = ".getUpperBound()) {" + NL + "\t\t\t";
855
  protected final String TEXT_834 = NL + "\t\t\tthis.domainModelAddCommand = ";
856
  protected final String TEXT_835 = NL + "\t\t}";
856
  protected final String TEXT_835 = ".create(domainModelEditDomain, ";
857
  protected final String TEXT_836 = NL;
857
  protected final String TEXT_836 = ", " + NL + "\t\t\t\t";
858
  protected final String TEXT_837 = NL + "\t\tif (";
858
  protected final String TEXT_837 = ".eINSTANCE.get";
859
  protected final String TEXT_838 = " != null) {" + NL + "\t\t\t";
859
  protected final String TEXT_838 = "(), createdDomainElement);";
860
  protected final String TEXT_839 = NL + "\t\t}";
860
  protected final String TEXT_839 = NL + "\t\t\tthis.notationAddCommand = new Create";
861
  protected final String TEXT_840 = NL + "\t\tif (";
861
  protected final String TEXT_840 = "NotationCommand(parent, ";
862
  protected final String TEXT_841 = ".size() >= ";
862
  protected final String TEXT_841 = "(";
863
  protected final String TEXT_842 = ".eINSTANCE.get";
863
  protected final String TEXT_842 = ") ";
864
  protected final String TEXT_843 = ".getUpperBound()) {" + NL + "\t\t\t";
864
  protected final String TEXT_843 = "createdDomainElement";
865
  protected final String TEXT_844 = NL + "\t\t}";
865
  protected final String TEXT_844 = ", constraint";
866
  protected final String TEXT_845 = NL;
866
  protected final String TEXT_845 = ");" + NL + "\t\t\trequest.setCreatedObject(notationAddCommand.getCreatedView());" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canExecute() && notationAddCommand != null && notationAddCommand.canExecute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn domainModelAddCommand != null" + NL + "\t\t\t\t\t&& domainModelAddCommand.canUndo() && notationAddCommand != null && notationAddCommand.canUndo();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tnotationAddCommand.execute();" + NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tnotationAddCommand.undo();" + NL + "\t\t\tdomainModelAddCommand.undo();" + 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}";
867
  protected final String TEXT_846 = NL + "\t\t\tif(!";
867
  protected final String TEXT_846 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect";
868
  protected final String TEXT_847 = ".canCreateLink(";
868
  protected final String TEXT_847 = "SourceCommand extends ";
869
  protected final String TEXT_848 = ", ";
869
  protected final String TEXT_848 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
870
  protected final String TEXT_849 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
870
  protected final String TEXT_849 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
871
  protected final String TEXT_850 = NL + "\t\t\treturn true;";
871
  protected final String TEXT_850 = " newSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
872
  protected final String TEXT_851 = NL;
872
  protected final String TEXT_851 = " oldSource;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
873
  protected final String TEXT_852 = NL + "\t\tif (";
873
  protected final String TEXT_852 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
874
  protected final String TEXT_853 = " != null) {" + NL + "\t\t\t";
874
  protected final String TEXT_853 = "SourceCommand(";
875
  protected final String TEXT_854 = NL + "\t\t}";
875
  protected final String TEXT_854 = " request) {" + NL + "\t\t\tthis((";
876
  protected final String TEXT_855 = NL + "\t\tif (";
876
  protected final String TEXT_855 = ")request.getConnectionEditPart().getModel(), (";
877
  protected final String TEXT_856 = ".size() >= ";
877
  protected final String TEXT_856 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
878
  protected final String TEXT_857 = ".eINSTANCE.get";
878
  protected final String TEXT_857 = "SourceCommand(";
879
  protected final String TEXT_858 = ".getUpperBound()) {" + NL + "\t\t\t";
879
  protected final String TEXT_858 = " edge, ";
880
  protected final String TEXT_859 = NL + "\t\t}";
880
  protected final String TEXT_859 = " newSource) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newSource = newSource;" + NL + "\t\t\tthis.oldSource = edge.getSource();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + 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\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {";
881
  protected final String TEXT_860 = NL;
881
  protected final String TEXT_860 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal ";
882
  protected final String TEXT_861 = NL + "\t\t\tif(!";
882
  protected final String TEXT_861 = " domainModelEditDomain = ";
883
  protected final String TEXT_862 = ".canCreateLink(";
883
  protected final String TEXT_862 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t";
884
  protected final String TEXT_863 = ", ";
884
  protected final String TEXT_863 = " command = new ";
885
  protected final String TEXT_864 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
885
  protected final String TEXT_864 = "() {" + NL + "\t\t\t\tprivate ";
886
  protected final String TEXT_865 = NL + "\t\t\treturn true;";
886
  protected final String TEXT_865 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew ";
887
  protected final String TEXT_866 = NL + "\t\t\treturn false;";
887
  protected final String TEXT_866 = "(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();";
888
  protected final String TEXT_867 = NL + "\t\t}";
888
  protected final String TEXT_867 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;";
889
  protected final String TEXT_868 = NL;
889
  protected final String TEXT_868 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {";
890
  protected final String TEXT_869 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the 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 ";
890
  protected final String TEXT_869 = NL + "\t\t\treturn false;";
891
  protected final String TEXT_870 = " getRelationshipContainer(";
891
  protected final String TEXT_870 = NL + "\t\t\t";
892
  protected final String TEXT_871 = " element, ";
892
  protected final String TEXT_871 = " container = (";
893
  protected final String TEXT_872 = " 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}";
893
  protected final String TEXT_872 = ")getRelationshipContainer(newSource.getElement(), ";
894
  protected final String TEXT_873 = NL + NL + "\t}";
894
  protected final String TEXT_873 = ".eINSTANCE.get";
895
  protected final String TEXT_874 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect";
895
  protected final String TEXT_874 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
896
  protected final String TEXT_875 = "TargetCommand extends ";
896
  protected final String TEXT_875 = NL;
897
  protected final String TEXT_876 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
897
  protected final String TEXT_876 = NL + "\t\tif (";
898
  protected final String TEXT_877 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
898
  protected final String TEXT_877 = " != null) {" + NL + "\t\t\t";
899
  protected final String TEXT_878 = " newTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
899
  protected final String TEXT_878 = NL + "\t\t}";
900
  protected final String TEXT_879 = " oldTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
900
  protected final String TEXT_879 = NL + "\t\tif (";
901
  protected final String TEXT_880 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
901
  protected final String TEXT_880 = ".size() >= ";
902
  protected final String TEXT_881 = "TargetCommand(";
902
  protected final String TEXT_881 = ".eINSTANCE.get";
903
  protected final String TEXT_882 = " request) {" + NL + "\t\t\tthis((";
903
  protected final String TEXT_882 = ".getUpperBound()) {" + NL + "\t\t\t";
904
  protected final String TEXT_883 = ")request.getConnectionEditPart().getModel(), (";
904
  protected final String TEXT_883 = NL + "\t\t}";
905
  protected final String TEXT_884 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
905
  protected final String TEXT_884 = NL;
906
  protected final String TEXT_885 = "TargetCommand(";
906
  protected final String TEXT_885 = NL + "\t\tif (";
907
  protected final String TEXT_886 = " edge, ";
907
  protected final String TEXT_886 = " != null) {" + NL + "\t\t\t";
908
  protected final String TEXT_887 = " newTarget) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newTarget = newTarget;" + NL + "\t\t\tthis.oldTarget = edge.getTarget();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + 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\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {";
908
  protected final String TEXT_887 = NL + "\t\t}";
909
  protected final String TEXT_888 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal ";
909
  protected final String TEXT_888 = NL + "\t\tif (";
910
  protected final String TEXT_889 = " domainModelEditDomain = ";
910
  protected final String TEXT_889 = ".size() >= ";
911
  protected final String TEXT_890 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t";
911
  protected final String TEXT_890 = ".eINSTANCE.get";
912
  protected final String TEXT_891 = " command = new ";
912
  protected final String TEXT_891 = ".getUpperBound()) {" + NL + "\t\t\t";
913
  protected final String TEXT_892 = "() {" + NL + "\t\t\t\tprivate ";
913
  protected final String TEXT_892 = NL + "\t\t}";
914
  protected final String TEXT_893 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew ";
914
  protected final String TEXT_893 = NL;
915
  protected final String TEXT_894 = "(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();";
915
  protected final String TEXT_894 = NL + "\t\t\tif(!";
916
  protected final String TEXT_895 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;";
916
  protected final String TEXT_895 = ".canCreateLink(";
917
  protected final String TEXT_896 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {";
917
  protected final String TEXT_896 = ", ";
918
  protected final String TEXT_897 = NL;
918
  protected final String TEXT_897 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
919
  protected final String TEXT_898 = NL + "\t\t\tif(!";
919
  protected final String TEXT_898 = NL + "\t\t\treturn true;";
920
  protected final String TEXT_899 = ".canCreateLink(";
920
  protected final String TEXT_899 = NL;
921
  protected final String TEXT_900 = ", ";
921
  protected final String TEXT_900 = NL + "\t\tif (";
922
  protected final String TEXT_901 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
922
  protected final String TEXT_901 = " != null) {" + NL + "\t\t\t";
923
  protected final String TEXT_902 = NL + "\t\t\treturn true;";
923
  protected final String TEXT_902 = NL + "\t\t}";
924
  protected final String TEXT_903 = NL;
924
  protected final String TEXT_903 = NL + "\t\tif (";
925
  protected final String TEXT_904 = NL + "\t\t\tif(!";
925
  protected final String TEXT_904 = ".size() >= ";
926
  protected final String TEXT_905 = ".canCreateLink(";
926
  protected final String TEXT_905 = ".eINSTANCE.get";
927
  protected final String TEXT_906 = ", ";
927
  protected final String TEXT_906 = ".getUpperBound()) {" + NL + "\t\t\t";
928
  protected final String TEXT_907 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
928
  protected final String TEXT_907 = NL + "\t\t}";
929
  protected final String TEXT_908 = NL + "\t\t\treturn true;";
929
  protected final String TEXT_908 = NL;
930
  protected final String TEXT_909 = NL + "\t\t\treturn false;";
930
  protected final String TEXT_909 = NL + "\t\t\tif(!";
931
  protected final String TEXT_910 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
931
  protected final String TEXT_910 = ".canCreateLink(";
932
  protected final String TEXT_911 = " createReconnectCommand() {" + NL + "\t\t\t";
932
  protected final String TEXT_911 = ", ";
933
  protected final String TEXT_912 = " editingDomain = ";
933
  protected final String TEXT_912 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
934
  protected final String TEXT_913 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t";
934
  protected final String TEXT_913 = NL + "\t\t\treturn true;";
935
  protected final String TEXT_914 = " result = new ";
935
  protected final String TEXT_914 = NL + "\t\t\treturn false;";
936
  protected final String TEXT_915 = "();" + NL + "\t\t\tresult.append(new ";
936
  protected final String TEXT_915 = NL + "\t\t}" + NL + "" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
937
  protected final String TEXT_916 = "(edge, newTarget));";
937
  protected final String TEXT_916 = " createReconnectCommand() {" + NL + "\t\t\t";
938
  protected final String TEXT_917 = NL + "\t\t\tresult.append(";
938
  protected final String TEXT_917 = " editingDomain = ";
939
  protected final String TEXT_918 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
939
  protected final String TEXT_918 = ".getEditingDomain(oldSource.getDiagram().getElement());" + NL + "\t\t\t";
940
  protected final String TEXT_919 = ".eINSTANCE.get";
940
  protected final String TEXT_919 = " result = new ";
941
  protected final String TEXT_920 = "()," + NL + "\t\t\t\toldTarget.getElement()));" + NL + "\t\t\tresult.append(";
941
  protected final String TEXT_920 = "();" + NL + "\t\t\tresult.append(new ";
942
  protected final String TEXT_921 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
942
  protected final String TEXT_921 = "(edge, newSource));";
943
  protected final String TEXT_922 = ".eINSTANCE.get";
943
  protected final String TEXT_922 = NL + "\t\t\t";
944
  protected final String TEXT_923 = "()," + NL + "\t\t\t\tnewTarget.getElement()));";
944
  protected final String TEXT_923 = " container = getRelationshipContainer(newSource.getElement(), ";
945
  protected final String TEXT_924 = NL + "\t\t\tresult.append(";
945
  protected final String TEXT_924 = ".eINSTANCE.get";
946
  protected final String TEXT_925 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
946
  protected final String TEXT_925 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn ";
947
  protected final String TEXT_926 = ".eINSTANCE.get";
947
  protected final String TEXT_926 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\t";
948
  protected final String TEXT_927 = "()," + NL + "\t\t\t\tnewTarget.getElement()));";
948
  protected final String TEXT_927 = " oldContainer = edge.getElement().eContainer();" + NL + "\t\t\tif (oldContainer == null) {" + NL + "\t\t\t\treturn ";
949
  protected final String TEXT_928 = NL + "\t\t\tresult.append(";
949
  protected final String TEXT_928 = ".INSTANCE;" + NL + "\t\t\t}" + NL + "\t\t\tif (oldContainer != container) {";
950
  protected final String TEXT_929 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), ";
950
  protected final String TEXT_929 = NL + "\t\t\t\tresult.append(";
951
  protected final String TEXT_930 = ".eINSTANCE.get";
951
  protected final String TEXT_930 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), edge.getElement()));";
952
  protected final String TEXT_931 = "(), oldTarget.getElement()));" + NL + "\t\t\tresult.append(";
952
  protected final String TEXT_931 = NL + "\t\t\t\tresult.append(";
953
  protected final String TEXT_932 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), ";
953
  protected final String TEXT_932 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), edge.getElement().eContainmentFeature(), ";
954
  protected final String TEXT_933 = ".eINSTANCE.get";
954
  protected final String TEXT_933 = ".UNSET_VALUE));";
955
  protected final String TEXT_934 = "(), newTarget.getElement()));";
955
  protected final String TEXT_934 = NL + "\t\t\t\tresult.append(";
956
  protected final String TEXT_935 = NL + "\t\t\tresult.append(";
956
  protected final String TEXT_935 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, ";
957
  protected final String TEXT_936 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), ";
957
  protected final String TEXT_936 = ".eINSTANCE.get";
958
  protected final String TEXT_937 = ".eINSTANCE.get";
958
  protected final String TEXT_937 = "(), edge.getElement()));";
959
  protected final String TEXT_938 = "(), newTarget.getElement()));";
959
  protected final String TEXT_938 = NL + "\t\t\t\tresult.append(";
960
  protected final String TEXT_939 = NL + "\t\t\treturn result;" + NL + "\t\t}";
960
  protected final String TEXT_939 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), ";
961
  protected final String TEXT_940 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */";
961
  protected final String TEXT_940 = ".eINSTANCE.get";
962
  protected final String TEXT_941 = NL;
962
  protected final String TEXT_941 = "()," + NL + "\t\t\t\t\tedge.getElement()));";
963
  protected final String TEXT_942 = NL + "\t\t\tprivate ";
963
  protected final String TEXT_942 = NL + "\t\t\t\tresult.append(";
964
  protected final String TEXT_943 = " createDomainModelRemoveCommand(";
964
  protected final String TEXT_943 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tedge.getElement().eContainer(), ";
965
  protected final String TEXT_944 = " editingDomain) {";
965
  protected final String TEXT_944 = ".eINSTANCE.get";
966
  protected final String TEXT_945 = NL + "\t\t\t\t";
966
  protected final String TEXT_945 = "()," + NL + "\t\t\t\t\t";
967
  protected final String TEXT_946 = " result = new ";
967
  protected final String TEXT_946 = ".UNSET_VALUE));";
968
  protected final String TEXT_947 = "();";
968
  protected final String TEXT_947 = NL + "\t\t\t\tresult.append(";
969
  protected final String TEXT_948 = NL + "\t\t\t\tresult.append(";
969
  protected final String TEXT_948 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\tcontainer, ";
970
  protected final String TEXT_949 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
970
  protected final String TEXT_949 = ".eINSTANCE.get";
971
  protected final String TEXT_950 = ".getElement().eContainer(), ";
971
  protected final String TEXT_950 = "(), edge.getElement()));";
972
  protected final String TEXT_951 = ".getElement().eContainmentFeature(), ";
972
  protected final String TEXT_951 = NL + "\t\t\t}";
973
  protected final String TEXT_952 = ".getElement()));";
973
  protected final String TEXT_952 = NL + "\t\t\tresult.append(";
974
  protected final String TEXT_953 = NL + "\t\t\t\tresult.append(";
974
  protected final String TEXT_953 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
975
  protected final String TEXT_954 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
975
  protected final String TEXT_954 = ".eINSTANCE.get";
976
  protected final String TEXT_955 = ".getElement().eContainer(), ";
976
  protected final String TEXT_955 = "()," + NL + "\t\t\t\toldSource.getElement()));" + NL + "\t\t\tresult.append(";
977
  protected final String TEXT_956 = ".getElement().eContainmentFeature(), ";
977
  protected final String TEXT_956 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
978
  protected final String TEXT_957 = ".UNSET_VALUE));";
978
  protected final String TEXT_957 = ".eINSTANCE.get";
979
  protected final String TEXT_958 = NL + "\t\t\t\treturn ";
979
  protected final String TEXT_958 = "()," + NL + "\t\t\t\tnewSource.getElement()));";
980
  protected final String TEXT_959 = ".INSTANCE;";
980
  protected final String TEXT_959 = NL + "\t\t\tresult.append(";
981
  protected final String TEXT_960 = NL + "\t\t\t\tresult.append(";
981
  protected final String TEXT_960 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
982
  protected final String TEXT_961 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
982
  protected final String TEXT_961 = ".eINSTANCE.get";
983
  protected final String TEXT_962 = ".getElement().eContainer(), ";
983
  protected final String TEXT_962 = "()," + NL + "\t\t\t\tnewSource.getElement()));";
984
  protected final String TEXT_963 = ".eINSTANCE.get";
984
  protected final String TEXT_963 = NL + "\t\t\tresult.append(";
985
  protected final String TEXT_964 = "()," + NL + "\t\t\t\t\t";
985
  protected final String TEXT_964 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), ";
986
  protected final String TEXT_965 = ".getElement()));";
986
  protected final String TEXT_965 = ".eINSTANCE.get";
987
  protected final String TEXT_966 = NL + "\t\t\t\tresult.append(";
987
  protected final String TEXT_966 = "(), edge.getTarget().getElement()));" + NL + "\t\t\tresult.append(";
988
  protected final String TEXT_967 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
988
  protected final String TEXT_967 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), ";
989
  protected final String TEXT_968 = ".getElement().eContainer(), ";
989
  protected final String TEXT_968 = ".eINSTANCE.get";
990
  protected final String TEXT_969 = ".eINSTANCE.get";
990
  protected final String TEXT_969 = "(), edge.getTarget().getElement()));";
991
  protected final String TEXT_970 = "()," + NL + "\t\t\t\t\t";
991
  protected final String TEXT_970 = NL + "\t\t\tresult.append(";
992
  protected final String TEXT_971 = ".UNSET_VALUE));";
992
  protected final String TEXT_971 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\toldSource.getElement(), ";
993
  protected final String TEXT_972 = NL + "\t\t\t\tresult.append(";
993
  protected final String TEXT_972 = ".eINSTANCE.get";
994
  protected final String TEXT_973 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
994
  protected final String TEXT_973 = "(), ";
995
  protected final String TEXT_974 = ".getElement(), ";
995
  protected final String TEXT_974 = ".UNSET_VALUE));" + NL + "\t\t\tresult.append(";
996
  protected final String TEXT_975 = ".eINSTANCE.get";
996
  protected final String TEXT_975 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tnewSource.getElement(), ";
997
  protected final String TEXT_976 = "(), ";
997
  protected final String TEXT_976 = ".eINSTANCE.get";
998
  protected final String TEXT_977 = ".getSource().getElement()));";
998
  protected final String TEXT_977 = "(), edge.getTarget().getElement()));";
999
  protected final String TEXT_978 = NL + "\t\t\t\tresult.append(";
999
  protected final String TEXT_978 = NL + "\t\t\treturn result;" + NL + "\t\t}" + NL;
1000
  protected final String TEXT_979 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1000
  protected final String TEXT_979 = NL;
1001
  protected final String TEXT_980 = ".getElement(), ";
1001
  protected final String TEXT_980 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the 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 ";
1002
  protected final String TEXT_981 = ".eINSTANCE.get";
1002
  protected final String TEXT_981 = " getRelationshipContainer(";
1003
  protected final String TEXT_982 = "(), ";
1003
  protected final String TEXT_982 = " element, ";
1004
  protected final String TEXT_983 = ".UNSET_VALUE));";
1004
  protected final String TEXT_983 = " 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}";
1005
  protected final String TEXT_984 = NL + "\t\t\t\tresult.append(";
1005
  protected final String TEXT_984 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */";
1006
  protected final String TEXT_985 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1006
  protected final String TEXT_985 = NL;
1007
  protected final String TEXT_986 = ".getElement(), ";
1007
  protected final String TEXT_986 = NL + "\t\t\tprivate ";
1008
  protected final String TEXT_987 = ".eINSTANCE.get";
1008
  protected final String TEXT_987 = " createDomainModelRemoveCommand(";
1009
  protected final String TEXT_988 = "(), ";
1009
  protected final String TEXT_988 = " editingDomain) {";
1010
  protected final String TEXT_989 = ".getTarget().getElement()));";
1010
  protected final String TEXT_989 = NL + "\t\t\t\t";
1011
  protected final String TEXT_990 = NL + "\t\t\t\tresult.append(";
1011
  protected final String TEXT_990 = " result = new ";
1012
  protected final String TEXT_991 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1012
  protected final String TEXT_991 = "();";
1013
  protected final String TEXT_992 = ".getElement(), ";
1013
  protected final String TEXT_992 = NL + "\t\t\t\tresult.append(";
1014
  protected final String TEXT_993 = ".eINSTANCE.get";
1014
  protected final String TEXT_993 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1015
  protected final String TEXT_994 = "(), ";
1015
  protected final String TEXT_994 = ".getElement().eContainer(), ";
1016
  protected final String TEXT_995 = ".UNSET_VALUE));";
1016
  protected final String TEXT_995 = ".getElement().eContainmentFeature(), ";
1017
  protected final String TEXT_996 = NL + "\t\t\t\treturn result;";
1017
  protected final String TEXT_996 = ".getElement()));";
1018
  protected final String TEXT_997 = NL + "\t\t\t\treturn ";
1018
  protected final String TEXT_997 = NL + "\t\t\t\tresult.append(";
1019
  protected final String TEXT_998 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1019
  protected final String TEXT_998 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1020
  protected final String TEXT_999 = ".getSource().getElement(), ";
1020
  protected final String TEXT_999 = ".getElement().eContainer(), ";
1021
  protected final String TEXT_1000 = ".eINSTANCE.get";
1021
  protected final String TEXT_1000 = ".getElement().eContainmentFeature(), ";
1022
  protected final String TEXT_1001 = "(), ";
1022
  protected final String TEXT_1001 = ".UNSET_VALUE));";
1023
  protected final String TEXT_1002 = ".getTarget().getElement());";
1023
  protected final String TEXT_1002 = NL + "\t\t\t\treturn ";
1024
  protected final String TEXT_1003 = NL + "\t\t\t\treturn ";
1024
  protected final String TEXT_1003 = ".INSTANCE;";
1025
  protected final String TEXT_1004 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1025
  protected final String TEXT_1004 = NL + "\t\t\t\tresult.append(";
1026
  protected final String TEXT_1005 = ".getSource().getElement(), ";
1026
  protected final String TEXT_1005 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1027
  protected final String TEXT_1006 = ".eINSTANCE.get";
1027
  protected final String TEXT_1006 = ".getElement().eContainer(), ";
1028
  protected final String TEXT_1007 = "(), ";
1028
  protected final String TEXT_1007 = ".eINSTANCE.get";
1029
  protected final String TEXT_1008 = ".UNSET_VALUE);";
1029
  protected final String TEXT_1008 = "()," + NL + "\t\t\t\t\t";
1030
  protected final String TEXT_1009 = NL + "\t\t\t}";
1030
  protected final String TEXT_1009 = ".getElement()));";
1031
  protected final String TEXT_1010 = NL + "\t}" + NL;
1031
  protected final String TEXT_1010 = NL + "\t\t\t\tresult.append(";
1032
  protected final String TEXT_1011 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create";
1032
  protected final String TEXT_1011 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1033
  protected final String TEXT_1012 = "Command extends ";
1033
  protected final String TEXT_1012 = ".getElement().eContainer(), ";
1034
  protected final String TEXT_1013 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final ";
1034
  protected final String TEXT_1013 = ".eINSTANCE.get";
1035
  protected final String TEXT_1014 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final ";
1035
  protected final String TEXT_1014 = "()," + NL + "\t\t\t\t\t";
1036
  protected final String TEXT_1015 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final ";
1036
  protected final String TEXT_1015 = ".UNSET_VALUE));";
1037
  protected final String TEXT_1016 = " 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";
1037
  protected final String TEXT_1016 = NL + "\t\t\t\tresult.append(";
1038
  protected final String TEXT_1017 = "Command(";
1038
  protected final String TEXT_1017 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1039
  protected final String TEXT_1018 = " requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof ";
1039
  protected final String TEXT_1018 = ".getElement(), ";
1040
  protected final String TEXT_1019 = ") {" + NL + "\t\t\t\tsource = (";
1040
  protected final String TEXT_1019 = ".eINSTANCE.get";
1041
  protected final String TEXT_1020 = ")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 ";
1041
  protected final String TEXT_1020 = "(), ";
1042
  protected final String TEXT_1021 = ") {" + NL + "\t\t\t\ttarget = (";
1042
  protected final String TEXT_1021 = ".getSource().getElement()));";
1043
  protected final String TEXT_1022 = ")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 = ";
1043
  protected final String TEXT_1022 = NL + "\t\t\t\tresult.append(";
1044
  protected final String TEXT_1023 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = ";
1044
  protected final String TEXT_1023 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1045
  protected final String TEXT_1024 = ".eINSTANCE.createEdge();";
1045
  protected final String TEXT_1024 = ".getElement(), ";
1046
  protected final String TEXT_1025 = NL + "\t\t\t";
1046
  protected final String TEXT_1025 = ".eINSTANCE.get";
1047
  protected final String TEXT_1026 = " createdDomainElement = ";
1047
  protected final String TEXT_1026 = "(), ";
1048
  protected final String TEXT_1027 = ".eINSTANCE.create";
1048
  protected final String TEXT_1027 = ".UNSET_VALUE));";
1049
  protected final String TEXT_1028 = "();" + NL + "\t\t\tcreatedEdge.setElement(";
1049
  protected final String TEXT_1028 = NL + "\t\t\t\tresult.append(";
1050
  protected final String TEXT_1029 = "(";
1050
  protected final String TEXT_1029 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1051
  protected final String TEXT_1030 = ") ";
1051
  protected final String TEXT_1030 = ".getElement(), ";
1052
  protected final String TEXT_1031 = "createdDomainElement);" + NL + "\t\t\t";
1052
  protected final String TEXT_1031 = ".eINSTANCE.get";
1053
  protected final String TEXT_1032 = NL + "\t\t\t";
1053
  protected final String TEXT_1032 = "(), ";
1054
  protected final String TEXT_1033 = ".";
1054
  protected final String TEXT_1033 = ".getTarget().getElement()));";
1055
  protected final String TEXT_1034 = ".initializeElement(";
1055
  protected final String TEXT_1034 = NL + "\t\t\t\tresult.append(";
1056
  protected final String TEXT_1035 = "(";
1056
  protected final String TEXT_1035 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1057
  protected final String TEXT_1036 = ") ";
1057
  protected final String TEXT_1036 = ".getElement(), ";
1058
  protected final String TEXT_1037 = "createdDomainElement);";
1058
  protected final String TEXT_1037 = ".eINSTANCE.get";
1059
  protected final String TEXT_1038 = NL + "\t\t\tcreatedEdge.setElement(null);";
1059
  protected final String TEXT_1038 = "(), ";
1060
  protected final String TEXT_1039 = NL + "\t\t\t";
1060
  protected final String TEXT_1039 = ".UNSET_VALUE));";
1061
  protected final String TEXT_1040 = ".decorateView(createdEdge);" + NL + "\t\t\t";
1061
  protected final String TEXT_1040 = NL + "\t\t\t\treturn result;";
1062
  protected final String TEXT_1041 = " domainModelEditDomain = ";
1062
  protected final String TEXT_1041 = NL + "\t\t\t\treturn ";
1063
  protected final String TEXT_1042 = ".getEditingDomain(source.getDiagram().getElement());";
1063
  protected final String TEXT_1042 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1064
  protected final String TEXT_1043 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();";
1064
  protected final String TEXT_1043 = ".getSource().getElement(), ";
1065
  protected final String TEXT_1044 = NL + "\t\t\t";
1065
  protected final String TEXT_1044 = ".eINSTANCE.get";
1066
  protected final String TEXT_1045 = " container = getRelationshipContainer(source.getElement(), ";
1066
  protected final String TEXT_1045 = "(), ";
1067
  protected final String TEXT_1046 = ".eINSTANCE.get";
1067
  protected final String TEXT_1046 = ".getTarget().getElement());";
1068
  protected final String TEXT_1047 = "());" + 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(";
1068
  protected final String TEXT_1047 = NL + "\t\t\t\treturn ";
1069
  protected final String TEXT_1048 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, ";
1069
  protected final String TEXT_1048 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1070
  protected final String TEXT_1049 = ".eINSTANCE.get";
1070
  protected final String TEXT_1049 = ".getSource().getElement(), ";
1071
  protected final String TEXT_1050 = "(), createdDomainElement));";
1071
  protected final String TEXT_1050 = ".eINSTANCE.get";
1072
  protected final String TEXT_1051 = NL + "\t\t\taddLinkEndsCommand.append(";
1072
  protected final String TEXT_1051 = "(), ";
1073
  protected final String TEXT_1052 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, ";
1073
  protected final String TEXT_1052 = ".UNSET_VALUE);";
1074
  protected final String TEXT_1053 = ".eINSTANCE.get";
1074
  protected final String TEXT_1053 = NL + "\t\t\t}";
1075
  protected final String TEXT_1054 = "(), createdDomainElement));";
1075
  protected final String TEXT_1054 = NL + "\t}" + NL;
1076
  protected final String TEXT_1055 = NL;
1076
  protected final String TEXT_1055 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create";
1077
  protected final String TEXT_1056 = NL + "\t\tif (";
1077
  protected final String TEXT_1056 = "StartCommand extends ";
1078
  protected final String TEXT_1057 = " != null) {" + NL + "\t\t\t";
1078
  protected final String TEXT_1057 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
1079
  protected final String TEXT_1058 = NL + "\t\t}";
1079
  protected final String TEXT_1058 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create";
1080
  protected final String TEXT_1059 = NL + "\t\tif (";
1080
  protected final String TEXT_1059 = "StartCommand(";
1081
  protected final String TEXT_1060 = ".size() >= ";
1081
  protected final String TEXT_1060 = " requestEx) {" + NL + "\t\t\t//Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart()." + NL + "\t\t\tsource = (";
1082
  protected final String TEXT_1061 = ".eINSTANCE.get";
1082
  protected final String TEXT_1061 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {" + NL + "\t\t\tif (source == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1083
  protected final String TEXT_1062 = ".getUpperBound()) {" + NL + "\t\t\t";
1083
  protected final String TEXT_1062 = NL + "\t\t\treturn false;";
1084
  protected final String TEXT_1063 = NL + "\t\t}";
1084
  protected final String TEXT_1063 = NL + "\t\t\t";
1085
  protected final String TEXT_1064 = NL + "\t\t\taddLinkEndsCommand.append(";
1085
  protected final String TEXT_1064 = " container = (";
1086
  protected final String TEXT_1065 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, ";
1086
  protected final String TEXT_1065 = ")getRelationshipContainer(source.getElement(), ";
1087
  protected final String TEXT_1066 = ".eINSTANCE.get";
1087
  protected final String TEXT_1066 = ".eINSTANCE.get";
1088
  protected final String TEXT_1067 = "(), source.getElement()));";
1088
  protected final String TEXT_1067 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1089
  protected final String TEXT_1068 = NL;
1089
  protected final String TEXT_1068 = NL;
1090
  protected final String TEXT_1069 = NL + "\t\tif (";
1090
  protected final String TEXT_1069 = NL + "\t\tif (";
1091
  protected final String TEXT_1070 = " != null) {" + NL + "\t\t\t";
1091
  protected final String TEXT_1070 = " != null) {" + NL + "\t\t\t";
Lines 1095-1127 Link Here
1095
  protected final String TEXT_1074 = ".eINSTANCE.get";
1095
  protected final String TEXT_1074 = ".eINSTANCE.get";
1096
  protected final String TEXT_1075 = ".getUpperBound()) {" + NL + "\t\t\t";
1096
  protected final String TEXT_1075 = ".getUpperBound()) {" + NL + "\t\t\t";
1097
  protected final String TEXT_1076 = NL + "\t\t}";
1097
  protected final String TEXT_1076 = NL + "\t\t}";
1098
  protected final String TEXT_1077 = NL + "\t\t\taddLinkEndsCommand.append(";
1098
  protected final String TEXT_1077 = NL;
1099
  protected final String TEXT_1078 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, ";
1099
  protected final String TEXT_1078 = NL + "\t\tif (";
1100
  protected final String TEXT_1079 = ".eINSTANCE.get";
1100
  protected final String TEXT_1079 = " != null) {" + NL + "\t\t\t";
1101
  protected final String TEXT_1080 = "(), target.getElement()));";
1101
  protected final String TEXT_1080 = NL + "\t\t}";
1102
  protected final String TEXT_1081 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;";
1102
  protected final String TEXT_1081 = NL + "\t\tif (";
1103
  protected final String TEXT_1082 = NL + "\t\t\tdomainModelAddCommand = ";
1103
  protected final String TEXT_1082 = ".size() >= ";
1104
  protected final String TEXT_1083 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t";
1104
  protected final String TEXT_1083 = ".eINSTANCE.get";
1105
  protected final String TEXT_1084 = ".eINSTANCE.get";
1105
  protected final String TEXT_1084 = ".getUpperBound()) {" + NL + "\t\t\t";
1106
  protected final String TEXT_1085 = "(), target.getElement());";
1106
  protected final String TEXT_1085 = NL + "\t\t}";
1107
  protected final String TEXT_1086 = NL + "\t\t}" + NL;
1107
  protected final String TEXT_1086 = NL;
1108
  protected final String TEXT_1087 = NL;
1108
  protected final String TEXT_1087 = NL + "\t\t\tif(!";
1109
  protected final String TEXT_1088 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the 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 ";
1109
  protected final String TEXT_1088 = ".canCreateLink(";
1110
  protected final String TEXT_1089 = " getRelationshipContainer(";
1110
  protected final String TEXT_1089 = ", ";
1111
  protected final String TEXT_1090 = " element, ";
1111
  protected final String TEXT_1090 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1112
  protected final String TEXT_1091 = " 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}";
1112
  protected final String TEXT_1091 = NL + "\t\t\treturn true;";
1113
  protected final String TEXT_1092 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\tif (source == null || target == null || createdEdge == null || domainModelAddCommand == null || !domainModelAddCommand.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1113
  protected final String TEXT_1092 = NL;
1114
  protected final String TEXT_1093 = NL;
1114
  protected final String TEXT_1093 = NL + "\t\tif (";
1115
  protected final String TEXT_1094 = NL + "\t\t\tif(!";
1115
  protected final String TEXT_1094 = " != null) {" + NL + "\t\t\t";
1116
  protected final String TEXT_1095 = ".canCreateLink(";
1116
  protected final String TEXT_1095 = NL + "\t\t}";
1117
  protected final String TEXT_1096 = ", ";
1117
  protected final String TEXT_1096 = NL + "\t\tif (";
1118
  protected final String TEXT_1097 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1118
  protected final String TEXT_1097 = ".size() >= ";
1119
  protected final String TEXT_1098 = NL + "\t\t\treturn true;" + 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}";
1119
  protected final String TEXT_1098 = ".eINSTANCE.get";
1120
  protected final String TEXT_1099 = NL;
1120
  protected final String TEXT_1099 = ".getUpperBound()) {" + NL + "\t\t\t";
1121
  protected final String TEXT_1100 = NL;
1121
  protected final String TEXT_1100 = NL + "\t\t}";
1122
  protected final String TEXT_1101 = 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}";
1122
  protected final String TEXT_1101 = NL;
1123
  protected final String TEXT_1102 = NL + "}";
1123
  protected final String TEXT_1102 = NL + "\t\t\tif(!";
1124
  protected final String TEXT_1103 = NL;
1124
  protected final String TEXT_1103 = ".canCreateLink(";
1125
  protected final String TEXT_1104 = ", ";
1126
  protected final String TEXT_1105 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1127
  protected final String TEXT_1106 = NL + "\t\t\treturn true;";
1128
  protected final String TEXT_1107 = NL + "\t\t\treturn false;";
1129
  protected final String TEXT_1108 = NL + "\t\t}";
1130
  protected final String TEXT_1109 = NL;
1131
  protected final String TEXT_1110 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the 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 ";
1132
  protected final String TEXT_1111 = " getRelationshipContainer(";
1133
  protected final String TEXT_1112 = " element, ";
1134
  protected final String TEXT_1113 = " 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}";
1135
  protected final String TEXT_1114 = NL + NL + "\t}";
1136
  protected final String TEXT_1115 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Reconnect";
1137
  protected final String TEXT_1116 = "TargetCommand extends ";
1138
  protected final String TEXT_1117 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
1139
  protected final String TEXT_1118 = " edge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
1140
  protected final String TEXT_1119 = " newTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
1141
  protected final String TEXT_1120 = " oldTarget;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
1142
  protected final String TEXT_1121 = " reconnectCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
1143
  protected final String TEXT_1122 = "TargetCommand(";
1144
  protected final String TEXT_1123 = " request) {" + NL + "\t\t\tthis((";
1145
  protected final String TEXT_1124 = ")request.getConnectionEditPart().getModel(), (";
1146
  protected final String TEXT_1125 = ")request.getTarget().getModel());" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Reconnect";
1147
  protected final String TEXT_1126 = "TargetCommand(";
1148
  protected final String TEXT_1127 = " edge, ";
1149
  protected final String TEXT_1128 = " newTarget) {" + NL + "\t\t\tthis.edge = edge;" + NL + "\t\t\tthis.newTarget = newTarget;" + NL + "\t\t\tthis.oldTarget = edge.getTarget();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\treconnectCommand.execute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn reconnectCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\treconnectCommand.undo();" + 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\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {";
1150
  protected final String TEXT_1129 = NL + "\t\t\tfinal boolean[] resultHolder = new boolean[1];" + NL + "\t\t\t//To validate the reconnection against constraints, the current link should be deleted. Of course, we must then undo its deletion." + NL + "\t\t\tfinal ";
1151
  protected final String TEXT_1130 = " domainModelEditDomain = ";
1152
  protected final String TEXT_1131 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t";
1153
  protected final String TEXT_1132 = " command = new ";
1154
  protected final String TEXT_1133 = "() {" + NL + "\t\t\t\tprivate ";
1155
  protected final String TEXT_1134 = " deleteCommand = createDomainModelRemoveCommand(domainModelEditDomain);" + NL + "\t\t\t\tpublic boolean canExecute() {" + NL + "\t\t\t\t\treturn deleteCommand.canExecute();" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic boolean canUndo() {" + NL + "\t\t\t\t\treturn true;" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void redo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void undo() {" + NL + "\t\t\t\t}" + NL + "\t\t\t\tpublic void execute() {" + NL + "\t\t\t\t\tdeleteCommand.execute();" + NL + "\t\t\t\t\ttry {" + NL + "\t\t\t\t\t\tresultHolder[0] = canReconnect();" + NL + "\t\t\t\t\t} finally {" + NL + "\t\t\t\t\t\tdeleteCommand.undo();" + NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t};" + NL + "\t\t\tif (!command.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}" + NL + "\t\t\tnew ";
1156
  protected final String TEXT_1135 = "(domainModelEditDomain, command).execute();" + NL + "\t\t\tif (resultHolder[0]) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t}" + NL + "\t\t\treturn resultHolder[0] && reconnectCommand.canExecute();";
1157
  protected final String TEXT_1136 = NL + "\t\t\tif (canReconnect()) {" + NL + "\t\t\t\treconnectCommand = createReconnectCommand();" + NL + "\t\t\t\treturn reconnectCommand.canExecute();" + NL + "\t\t\t}" + NL + "\t\t\treturn false;";
1158
  protected final String TEXT_1137 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate boolean canReconnect() {";
1159
  protected final String TEXT_1138 = NL;
1160
  protected final String TEXT_1139 = NL + "\t\t\tif(!";
1161
  protected final String TEXT_1140 = ".canCreateLink(";
1162
  protected final String TEXT_1141 = ", ";
1163
  protected final String TEXT_1142 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1164
  protected final String TEXT_1143 = NL + "\t\t\treturn true;";
1165
  protected final String TEXT_1144 = NL;
1166
  protected final String TEXT_1145 = NL + "\t\t\tif(!";
1167
  protected final String TEXT_1146 = ".canCreateLink(";
1168
  protected final String TEXT_1147 = ", ";
1169
  protected final String TEXT_1148 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1170
  protected final String TEXT_1149 = NL + "\t\t\treturn true;";
1171
  protected final String TEXT_1150 = NL + "\t\t\treturn false;";
1172
  protected final String TEXT_1151 = NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate ";
1173
  protected final String TEXT_1152 = " createReconnectCommand() {" + NL + "\t\t\t";
1174
  protected final String TEXT_1153 = " editingDomain = ";
1175
  protected final String TEXT_1154 = ".getEditingDomain(oldTarget.getDiagram().getElement());" + NL + "\t\t\t";
1176
  protected final String TEXT_1155 = " result = new ";
1177
  protected final String TEXT_1156 = "();" + NL + "\t\t\tresult.append(new ";
1178
  protected final String TEXT_1157 = "(edge, newTarget));";
1179
  protected final String TEXT_1158 = NL + "\t\t\tresult.append(";
1180
  protected final String TEXT_1159 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
1181
  protected final String TEXT_1160 = ".eINSTANCE.get";
1182
  protected final String TEXT_1161 = "()," + NL + "\t\t\t\toldTarget.getElement()));" + NL + "\t\t\tresult.append(";
1183
  protected final String TEXT_1162 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
1184
  protected final String TEXT_1163 = ".eINSTANCE.get";
1185
  protected final String TEXT_1164 = "()," + NL + "\t\t\t\tnewTarget.getElement()));";
1186
  protected final String TEXT_1165 = NL + "\t\t\tresult.append(";
1187
  protected final String TEXT_1166 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getElement(), ";
1188
  protected final String TEXT_1167 = ".eINSTANCE.get";
1189
  protected final String TEXT_1168 = "()," + NL + "\t\t\t\tnewTarget.getElement()));";
1190
  protected final String TEXT_1169 = NL + "\t\t\tresult.append(";
1191
  protected final String TEXT_1170 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), ";
1192
  protected final String TEXT_1171 = ".eINSTANCE.get";
1193
  protected final String TEXT_1172 = "(), oldTarget.getElement()));" + NL + "\t\t\tresult.append(";
1194
  protected final String TEXT_1173 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), ";
1195
  protected final String TEXT_1174 = ".eINSTANCE.get";
1196
  protected final String TEXT_1175 = "(), newTarget.getElement()));";
1197
  protected final String TEXT_1176 = NL + "\t\t\tresult.append(";
1198
  protected final String TEXT_1177 = ".create(" + NL + "\t\t\t\teditingDomain," + NL + "\t\t\t\tedge.getSource().getElement(), ";
1199
  protected final String TEXT_1178 = ".eINSTANCE.get";
1200
  protected final String TEXT_1179 = "(), newTarget.getElement()));";
1201
  protected final String TEXT_1180 = NL + "\t\t\treturn result;" + NL + "\t\t}";
1202
  protected final String TEXT_1181 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */";
1203
  protected final String TEXT_1182 = NL;
1204
  protected final String TEXT_1183 = NL + "\t\t\tprivate ";
1205
  protected final String TEXT_1184 = " createDomainModelRemoveCommand(";
1206
  protected final String TEXT_1185 = " editingDomain) {";
1207
  protected final String TEXT_1186 = NL + "\t\t\t\t";
1208
  protected final String TEXT_1187 = " result = new ";
1209
  protected final String TEXT_1188 = "();";
1210
  protected final String TEXT_1189 = NL + "\t\t\t\tresult.append(";
1211
  protected final String TEXT_1190 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1212
  protected final String TEXT_1191 = ".getElement().eContainer(), ";
1213
  protected final String TEXT_1192 = ".getElement().eContainmentFeature(), ";
1214
  protected final String TEXT_1193 = ".getElement()));";
1215
  protected final String TEXT_1194 = NL + "\t\t\t\tresult.append(";
1216
  protected final String TEXT_1195 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1217
  protected final String TEXT_1196 = ".getElement().eContainer(), ";
1218
  protected final String TEXT_1197 = ".getElement().eContainmentFeature(), ";
1219
  protected final String TEXT_1198 = ".UNSET_VALUE));";
1220
  protected final String TEXT_1199 = NL + "\t\t\t\treturn ";
1221
  protected final String TEXT_1200 = ".INSTANCE;";
1222
  protected final String TEXT_1201 = NL + "\t\t\t\tresult.append(";
1223
  protected final String TEXT_1202 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1224
  protected final String TEXT_1203 = ".getElement().eContainer(), ";
1225
  protected final String TEXT_1204 = ".eINSTANCE.get";
1226
  protected final String TEXT_1205 = "()," + NL + "\t\t\t\t\t";
1227
  protected final String TEXT_1206 = ".getElement()));";
1228
  protected final String TEXT_1207 = NL + "\t\t\t\tresult.append(";
1229
  protected final String TEXT_1208 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1230
  protected final String TEXT_1209 = ".getElement().eContainer(), ";
1231
  protected final String TEXT_1210 = ".eINSTANCE.get";
1232
  protected final String TEXT_1211 = "()," + NL + "\t\t\t\t\t";
1233
  protected final String TEXT_1212 = ".UNSET_VALUE));";
1234
  protected final String TEXT_1213 = NL + "\t\t\t\tresult.append(";
1235
  protected final String TEXT_1214 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1236
  protected final String TEXT_1215 = ".getElement(), ";
1237
  protected final String TEXT_1216 = ".eINSTANCE.get";
1238
  protected final String TEXT_1217 = "(), ";
1239
  protected final String TEXT_1218 = ".getSource().getElement()));";
1240
  protected final String TEXT_1219 = NL + "\t\t\t\tresult.append(";
1241
  protected final String TEXT_1220 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1242
  protected final String TEXT_1221 = ".getElement(), ";
1243
  protected final String TEXT_1222 = ".eINSTANCE.get";
1244
  protected final String TEXT_1223 = "(), ";
1245
  protected final String TEXT_1224 = ".UNSET_VALUE));";
1246
  protected final String TEXT_1225 = NL + "\t\t\t\tresult.append(";
1247
  protected final String TEXT_1226 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1248
  protected final String TEXT_1227 = ".getElement(), ";
1249
  protected final String TEXT_1228 = ".eINSTANCE.get";
1250
  protected final String TEXT_1229 = "(), ";
1251
  protected final String TEXT_1230 = ".getTarget().getElement()));";
1252
  protected final String TEXT_1231 = NL + "\t\t\t\tresult.append(";
1253
  protected final String TEXT_1232 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1254
  protected final String TEXT_1233 = ".getElement(), ";
1255
  protected final String TEXT_1234 = ".eINSTANCE.get";
1256
  protected final String TEXT_1235 = "(), ";
1257
  protected final String TEXT_1236 = ".UNSET_VALUE));";
1258
  protected final String TEXT_1237 = NL + "\t\t\t\treturn result;";
1259
  protected final String TEXT_1238 = NL + "\t\t\t\treturn ";
1260
  protected final String TEXT_1239 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1261
  protected final String TEXT_1240 = ".getSource().getElement(), ";
1262
  protected final String TEXT_1241 = ".eINSTANCE.get";
1263
  protected final String TEXT_1242 = "(), ";
1264
  protected final String TEXT_1243 = ".getTarget().getElement());";
1265
  protected final String TEXT_1244 = NL + "\t\t\t\treturn ";
1266
  protected final String TEXT_1245 = ".create(" + NL + "\t\t\t\t\teditingDomain," + NL + "\t\t\t\t\t";
1267
  protected final String TEXT_1246 = ".getSource().getElement(), ";
1268
  protected final String TEXT_1247 = ".eINSTANCE.get";
1269
  protected final String TEXT_1248 = "(), ";
1270
  protected final String TEXT_1249 = ".UNSET_VALUE);";
1271
  protected final String TEXT_1250 = NL + "\t\t\t}";
1272
  protected final String TEXT_1251 = NL + "\t}" + NL;
1273
  protected final String TEXT_1252 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create";
1274
  protected final String TEXT_1253 = "Command extends ";
1275
  protected final String TEXT_1254 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final ";
1276
  protected final String TEXT_1255 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final ";
1277
  protected final String TEXT_1256 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final ";
1278
  protected final String TEXT_1257 = " 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";
1279
  protected final String TEXT_1258 = "Command(";
1280
  protected final String TEXT_1259 = " requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof ";
1281
  protected final String TEXT_1260 = ") {" + NL + "\t\t\t\tsource = (";
1282
  protected final String TEXT_1261 = ")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 ";
1283
  protected final String TEXT_1262 = ") {" + NL + "\t\t\t\ttarget = (";
1284
  protected final String TEXT_1263 = ")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 = ";
1285
  protected final String TEXT_1264 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = ";
1286
  protected final String TEXT_1265 = ".eINSTANCE.createEdge();";
1287
  protected final String TEXT_1266 = NL + "\t\t\t";
1288
  protected final String TEXT_1267 = " createdDomainElement = ";
1289
  protected final String TEXT_1268 = ".eINSTANCE.create";
1290
  protected final String TEXT_1269 = "();" + NL + "\t\t\tcreatedEdge.setElement(";
1291
  protected final String TEXT_1270 = "(";
1292
  protected final String TEXT_1271 = ") ";
1293
  protected final String TEXT_1272 = "createdDomainElement);" + NL + "\t\t\t";
1294
  protected final String TEXT_1273 = NL + "\t\t\t";
1295
  protected final String TEXT_1274 = ".";
1296
  protected final String TEXT_1275 = ".initializeElement(";
1297
  protected final String TEXT_1276 = "(";
1298
  protected final String TEXT_1277 = ") ";
1299
  protected final String TEXT_1278 = "createdDomainElement);";
1300
  protected final String TEXT_1279 = NL + "\t\t\tcreatedEdge.setElement(null);";
1301
  protected final String TEXT_1280 = NL + "\t\t\t";
1302
  protected final String TEXT_1281 = ".decorateView(createdEdge);" + NL + "\t\t\t";
1303
  protected final String TEXT_1282 = " domainModelEditDomain = ";
1304
  protected final String TEXT_1283 = ".getEditingDomain(source.getDiagram().getElement());";
1305
  protected final String TEXT_1284 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();";
1306
  protected final String TEXT_1285 = NL + "\t\t\t";
1307
  protected final String TEXT_1286 = " container = getRelationshipContainer(source.getElement(), ";
1308
  protected final String TEXT_1287 = ".eINSTANCE.get";
1309
  protected final String TEXT_1288 = "());" + 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(";
1310
  protected final String TEXT_1289 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, ";
1311
  protected final String TEXT_1290 = ".eINSTANCE.get";
1312
  protected final String TEXT_1291 = "(), createdDomainElement));";
1313
  protected final String TEXT_1292 = NL + "\t\t\taddLinkEndsCommand.append(";
1314
  protected final String TEXT_1293 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, ";
1315
  protected final String TEXT_1294 = ".eINSTANCE.get";
1316
  protected final String TEXT_1295 = "(), createdDomainElement));";
1317
  protected final String TEXT_1296 = NL;
1318
  protected final String TEXT_1297 = NL + "\t\tif (";
1319
  protected final String TEXT_1298 = " != null) {" + NL + "\t\t\t";
1320
  protected final String TEXT_1299 = NL + "\t\t}";
1321
  protected final String TEXT_1300 = NL + "\t\tif (";
1322
  protected final String TEXT_1301 = ".size() >= ";
1323
  protected final String TEXT_1302 = ".eINSTANCE.get";
1324
  protected final String TEXT_1303 = ".getUpperBound()) {" + NL + "\t\t\t";
1325
  protected final String TEXT_1304 = NL + "\t\t}";
1326
  protected final String TEXT_1305 = NL + "\t\t\taddLinkEndsCommand.append(";
1327
  protected final String TEXT_1306 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, ";
1328
  protected final String TEXT_1307 = ".eINSTANCE.get";
1329
  protected final String TEXT_1308 = "(), source.getElement()));";
1330
  protected final String TEXT_1309 = NL;
1331
  protected final String TEXT_1310 = NL + "\t\tif (";
1332
  protected final String TEXT_1311 = " != null) {" + NL + "\t\t\t";
1333
  protected final String TEXT_1312 = NL + "\t\t}";
1334
  protected final String TEXT_1313 = NL + "\t\tif (";
1335
  protected final String TEXT_1314 = ".size() >= ";
1336
  protected final String TEXT_1315 = ".eINSTANCE.get";
1337
  protected final String TEXT_1316 = ".getUpperBound()) {" + NL + "\t\t\t";
1338
  protected final String TEXT_1317 = NL + "\t\t}";
1339
  protected final String TEXT_1318 = NL + "\t\t\taddLinkEndsCommand.append(";
1340
  protected final String TEXT_1319 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, ";
1341
  protected final String TEXT_1320 = ".eINSTANCE.get";
1342
  protected final String TEXT_1321 = "(), target.getElement()));";
1343
  protected final String TEXT_1322 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;";
1344
  protected final String TEXT_1323 = NL + "\t\t\tdomainModelAddCommand = ";
1345
  protected final String TEXT_1324 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t";
1346
  protected final String TEXT_1325 = ".eINSTANCE.get";
1347
  protected final String TEXT_1326 = "(), target.getElement());";
1348
  protected final String TEXT_1327 = NL + "\t\t}" + NL;
1349
  protected final String TEXT_1328 = NL;
1350
  protected final String TEXT_1329 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the 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 ";
1351
  protected final String TEXT_1330 = " getRelationshipContainer(";
1352
  protected final String TEXT_1331 = " element, ";
1353
  protected final String TEXT_1332 = " 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}";
1354
  protected final String TEXT_1333 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\tif (source == null || target == null || createdEdge == null || domainModelAddCommand == null || !domainModelAddCommand.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1355
  protected final String TEXT_1334 = NL;
1356
  protected final String TEXT_1335 = NL + "\t\t\tif(!";
1357
  protected final String TEXT_1336 = ".canCreateLink(";
1358
  protected final String TEXT_1337 = ", ";
1359
  protected final String TEXT_1338 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}";
1360
  protected final String TEXT_1339 = NL + "\t\t\treturn true;" + 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}";
1361
  protected final String TEXT_1340 = NL;
1362
  protected final String TEXT_1341 = NL;
1363
  protected final String TEXT_1342 = 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}";
1364
  protected final String TEXT_1343 = NL + "}";
1365
  protected final String TEXT_1344 = NL;
1125
1366
1126
  public String generate(Object argument)
1367
  public String generate(Object argument)
1127
  {
1368
  {
Lines 1293-1298 Link Here
1293
		}
1534
		}
1294
	}
1535
	}
1295
1536
1537
	public boolean hasBothChildrenAndCompartments() {
1538
		return !genNode.getCompartments().isEmpty() && !genNode.getChildNodes().isEmpty();
1539
	}
1540
1296
	public boolean containsLinks() {
1541
	public boolean containsLinks() {
1297
		return containsFeatureModelFacetLinks() || containsTypeModelFacetLinks();
1542
		return containsFeatureModelFacetLinks() || containsTypeModelFacetLinks();
1298
	}
1543
	}
Lines 1398-1443 Link Here
1398
    stringBuffer.append(TEXT_31);
1643
    stringBuffer.append(TEXT_31);
1399
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1644
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1400
    stringBuffer.append(TEXT_32);
1645
    stringBuffer.append(TEXT_32);
1401
    stringBuffer.append(genNode.getEditPartClassName());
1646
    
1647
	if (myHelper.hasBothChildrenAndCompartments()) {
1648
1402
    stringBuffer.append(TEXT_33);
1649
    stringBuffer.append(TEXT_33);
1403
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1650
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1404
    stringBuffer.append(TEXT_34);
1651
    stringBuffer.append(TEXT_34);
1405
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
1652
    
1653
	}
1654
1406
    stringBuffer.append(TEXT_35);
1655
    stringBuffer.append(TEXT_35);
1656
    stringBuffer.append(genNode.getEditPartClassName());
1407
    stringBuffer.append(TEXT_36);
1657
    stringBuffer.append(TEXT_36);
1408
    stringBuffer.append(TEXT_37);
1409
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1658
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1659
    stringBuffer.append(TEXT_37);
1660
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
1410
    stringBuffer.append(TEXT_38);
1661
    stringBuffer.append(TEXT_38);
1411
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1412
    stringBuffer.append(TEXT_39);
1662
    stringBuffer.append(TEXT_39);
1413
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1414
    stringBuffer.append(TEXT_40);
1663
    stringBuffer.append(TEXT_40);
1415
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1664
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1416
    stringBuffer.append(TEXT_41);
1665
    stringBuffer.append(TEXT_41);
1666
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1417
    stringBuffer.append(TEXT_42);
1667
    stringBuffer.append(TEXT_42);
1668
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1418
    stringBuffer.append(TEXT_43);
1669
    stringBuffer.append(TEXT_43);
1419
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1670
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1420
    stringBuffer.append(TEXT_44);
1671
    stringBuffer.append(TEXT_44);
1421
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy"));
1422
    stringBuffer.append(TEXT_45);
1672
    stringBuffer.append(TEXT_45);
1423
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1424
    stringBuffer.append(TEXT_46);
1673
    stringBuffer.append(TEXT_46);
1425
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest"));
1674
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1426
    stringBuffer.append(TEXT_47);
1675
    stringBuffer.append(TEXT_47);
1427
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1676
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ComponentEditPolicy"));
1428
    stringBuffer.append(TEXT_48);
1677
    stringBuffer.append(TEXT_48);
1429
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1678
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1430
    stringBuffer.append(TEXT_49);
1679
    stringBuffer.append(TEXT_49);
1431
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1680
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.GroupRequest"));
1432
    stringBuffer.append(TEXT_50);
1681
    stringBuffer.append(TEXT_50);
1433
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1682
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1434
    stringBuffer.append(TEXT_51);
1683
    stringBuffer.append(TEXT_51);
1435
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1684
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1436
    stringBuffer.append(TEXT_52);
1685
    stringBuffer.append(TEXT_52);
1437
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1686
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1438
    stringBuffer.append(TEXT_53);
1687
    stringBuffer.append(TEXT_53);
1439
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1688
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1440
    stringBuffer.append(TEXT_54);
1689
    stringBuffer.append(TEXT_54);
1690
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1691
    stringBuffer.append(TEXT_55);
1692
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1693
    stringBuffer.append(TEXT_56);
1694
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
1695
    stringBuffer.append(TEXT_57);
1441
    
1696
    
1442
{
1697
{
1443
TypeModelFacet facet = genNode.getModelFacet();
1698
TypeModelFacet facet = genNode.getModelFacet();
Lines 1445-1687 Link Here
1445
GenFeature containmentFeature = facet.getContainmentMetaFeature();
1700
GenFeature containmentFeature = facet.getContainmentMetaFeature();
1446
if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
1701
if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
1447
1702
1448
    stringBuffer.append(TEXT_55);
1703
    stringBuffer.append(TEXT_58);
1449
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1704
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1450
    stringBuffer.append(TEXT_56);
1705
    stringBuffer.append(TEXT_59);
1451
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1706
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1452
    stringBuffer.append(TEXT_57);
1707
    stringBuffer.append(TEXT_60);
1453
    
1708
    
1454
	if (containmentFeature.getEcoreFeature().isMany()) {
1709
	if (containmentFeature.getEcoreFeature().isMany()) {
1455
1710
1456
    stringBuffer.append(TEXT_58);
1711
    stringBuffer.append(TEXT_61);
1457
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1712
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1458
    stringBuffer.append(TEXT_59);
1713
    stringBuffer.append(TEXT_62);
1459
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1714
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1460
    stringBuffer.append(TEXT_60);
1715
    stringBuffer.append(TEXT_63);
1461
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1716
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1462
    stringBuffer.append(TEXT_61);
1717
    stringBuffer.append(TEXT_64);
1463
    
1718
    
1464
	} else {
1719
	} else {
1465
1720
1466
    stringBuffer.append(TEXT_62);
1721
    stringBuffer.append(TEXT_65);
1467
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1722
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1468
    stringBuffer.append(TEXT_63);
1723
    stringBuffer.append(TEXT_66);
1469
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1724
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1470
    stringBuffer.append(TEXT_64);
1725
    stringBuffer.append(TEXT_67);
1471
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1726
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1472
    stringBuffer.append(TEXT_65);
1727
    stringBuffer.append(TEXT_68);
1473
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1728
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1474
    stringBuffer.append(TEXT_66);
1729
    stringBuffer.append(TEXT_69);
1475
    
1730
    
1476
	}
1731
	}
1477
1732
1478
    
1733
    
1479
	if (childFeature.getEcoreFeature().isMany()) {
1734
	if (childFeature.getEcoreFeature().isMany()) {
1480
1735
1481
    stringBuffer.append(TEXT_67);
1736
    stringBuffer.append(TEXT_70);
1482
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1737
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1483
    stringBuffer.append(TEXT_68);
1738
    stringBuffer.append(TEXT_71);
1484
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1739
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1485
    stringBuffer.append(TEXT_69);
1740
    stringBuffer.append(TEXT_72);
1486
    stringBuffer.append(childFeature.getFeatureAccessorName());
1741
    stringBuffer.append(childFeature.getFeatureAccessorName());
1487
    stringBuffer.append(TEXT_70);
1742
    stringBuffer.append(TEXT_73);
1488
    
1743
    
1489
	} else {
1744
	} else {
1490
1745
1491
    stringBuffer.append(TEXT_71);
1746
    stringBuffer.append(TEXT_74);
1492
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1747
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1493
    stringBuffer.append(TEXT_72);
1748
    stringBuffer.append(TEXT_75);
1494
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1749
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1495
    stringBuffer.append(TEXT_73);
1750
    stringBuffer.append(TEXT_76);
1496
    stringBuffer.append(childFeature.getFeatureAccessorName());
1751
    stringBuffer.append(childFeature.getFeatureAccessorName());
1497
    stringBuffer.append(TEXT_74);
1752
    stringBuffer.append(TEXT_77);
1498
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1753
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1499
    stringBuffer.append(TEXT_75);
1754
    stringBuffer.append(TEXT_78);
1500
    
1755
    
1501
	}
1756
	}
1502
1757
1503
    stringBuffer.append(TEXT_76);
1758
    stringBuffer.append(TEXT_79);
1504
    
1759
    
1505
} else {
1760
} else {
1506
	if (containmentFeature.getEcoreFeature().isMany()) {
1761
	if (containmentFeature.getEcoreFeature().isMany()) {
1507
1762
1508
    stringBuffer.append(TEXT_77);
1763
    stringBuffer.append(TEXT_80);
1509
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1764
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
1510
    stringBuffer.append(TEXT_78);
1765
    stringBuffer.append(TEXT_81);
1511
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1766
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1512
    stringBuffer.append(TEXT_79);
1767
    stringBuffer.append(TEXT_82);
1513
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1768
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1514
    stringBuffer.append(TEXT_80);
1769
    stringBuffer.append(TEXT_83);
1515
    
1770
    
1516
	} else {
1771
	} else {
1517
1772
1518
    stringBuffer.append(TEXT_81);
1773
    stringBuffer.append(TEXT_84);
1519
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1774
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1520
    stringBuffer.append(TEXT_82);
1775
    stringBuffer.append(TEXT_85);
1521
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1776
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
1522
    stringBuffer.append(TEXT_83);
1777
    stringBuffer.append(TEXT_86);
1523
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1778
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
1524
    stringBuffer.append(TEXT_84);
1779
    stringBuffer.append(TEXT_87);
1525
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1780
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
1526
    stringBuffer.append(TEXT_85);
1781
    stringBuffer.append(TEXT_88);
1527
    
1782
    
1528
	}
1783
	}
1529
}
1784
}
1530
1785
1531
    stringBuffer.append(TEXT_86);
1786
    stringBuffer.append(TEXT_89);
1532
    
1787
    
1533
}	/*restrict local vars used in component edit policy*/
1788
}	/*restrict local vars used in component edit policy*/
1534
1789
1535
    stringBuffer.append(TEXT_87);
1790
    
1536
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1791
String layoutEditPolicyBaseClass;
1537
    stringBuffer.append(TEXT_88);
1792
if (!genNode.getChildNodes().isEmpty() && isXYLayout) {
1538
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy"));
1793
	layoutEditPolicyBaseClass = "org.eclipse.gef.editpolicies.XYLayoutEditPolicy";
1539
    stringBuffer.append(TEXT_89);
1794
} else {
1540
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1795
	layoutEditPolicyBaseClass = "org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy";
1796
}
1797
1541
    stringBuffer.append(TEXT_90);
1798
    stringBuffer.append(TEXT_90);
1542
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateRequest"));
1799
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1543
    stringBuffer.append(TEXT_91);
1800
    stringBuffer.append(TEXT_91);
1544
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1801
    stringBuffer.append(importManager.getImportedName(layoutEditPolicyBaseClass));
1545
    stringBuffer.append(TEXT_92);
1802
    stringBuffer.append(TEXT_92);
1546
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1803
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1547
    stringBuffer.append(TEXT_93);
1804
    stringBuffer.append(TEXT_93);
1548
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
1805
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateRequest"));
1549
    stringBuffer.append(TEXT_94);
1806
    stringBuffer.append(TEXT_94);
1550
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1807
    
1808
if (palette != null && !genNode.getChildNodes().isEmpty()) {
1809
1551
    stringBuffer.append(TEXT_95);
1810
    stringBuffer.append(TEXT_95);
1552
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1811
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
1553
    stringBuffer.append(TEXT_96);
1812
    stringBuffer.append(TEXT_96);
1554
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1813
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
1555
    stringBuffer.append(TEXT_97);
1814
    stringBuffer.append(TEXT_97);
1556
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1815
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
1557
    stringBuffer.append(TEXT_98);
1816
    stringBuffer.append(TEXT_98);
1558
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1817
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1559
    stringBuffer.append(TEXT_99);
1818
    stringBuffer.append(TEXT_99);
1560
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ResizableEditPolicy"));
1819
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1561
    stringBuffer.append(TEXT_100);
1820
    stringBuffer.append(TEXT_100);
1562
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1821
    
1822
	for(Iterator it = genNode.getChildNodes().iterator(); it.hasNext(); ) {
1823
		GenChildNode next = (GenChildNode)it.next();
1824
1563
    stringBuffer.append(TEXT_101);
1825
    stringBuffer.append(TEXT_101);
1564
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
1826
    stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName()));
1565
    stringBuffer.append(TEXT_102);
1827
    stringBuffer.append(TEXT_102);
1566
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants"));
1828
    stringBuffer.append(next.getDomainMetaClass().getName());
1829
    stringBuffer.append(next.getVisualID());
1567
    stringBuffer.append(TEXT_103);
1830
    stringBuffer.append(TEXT_103);
1568
    stringBuffer.append(genNode.getEditPartClassName());
1831
    if (isXYLayout) {
1569
    stringBuffer.append(TEXT_104);
1832
    stringBuffer.append(TEXT_104);
1570
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1833
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1571
    stringBuffer.append(TEXT_105);
1834
    stringBuffer.append(TEXT_105);
1572
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy"));
1835
    }
1573
    stringBuffer.append(TEXT_106);
1836
    stringBuffer.append(TEXT_106);
1574
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1837
    
1838
	}
1839
1575
    stringBuffer.append(TEXT_107);
1840
    stringBuffer.append(TEXT_107);
1576
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
1841
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1577
    stringBuffer.append(TEXT_108);
1842
    stringBuffer.append(TEXT_108);
1843
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1844
    stringBuffer.append(TEXT_109);
1578
    
1845
    
1579
if (!myHelper.hasIncomingLinks()) {
1846
}
1580
1847
1581
    stringBuffer.append(TEXT_109);
1582
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1583
    stringBuffer.append(TEXT_110);
1848
    stringBuffer.append(TEXT_110);
1849
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1850
    stringBuffer.append(TEXT_111);
1584
    
1851
    
1585
} else {
1852
if (!genNode.getChildNodes().isEmpty() && isXYLayout) {
1586
1853
1587
    stringBuffer.append(TEXT_111);
1588
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
1589
    stringBuffer.append(TEXT_112);
1854
    stringBuffer.append(TEXT_112);
1590
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1855
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1591
    stringBuffer.append(TEXT_113);
1856
    stringBuffer.append(TEXT_113);
1592
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1857
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ChangeBoundsRequest"));
1593
    stringBuffer.append(TEXT_114);
1858
    stringBuffer.append(TEXT_114);
1594
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1859
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1595
    stringBuffer.append(TEXT_115);
1860
    stringBuffer.append(TEXT_115);
1596
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1861
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1597
    stringBuffer.append(TEXT_116);
1862
    stringBuffer.append(TEXT_116);
1598
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1599
    stringBuffer.append(TEXT_117);
1863
    stringBuffer.append(TEXT_117);
1600
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
1601
    stringBuffer.append(TEXT_118);
1864
    stringBuffer.append(TEXT_118);
1602
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1865
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
1603
    stringBuffer.append(TEXT_119);
1866
    stringBuffer.append(TEXT_119);
1604
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1867
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
1605
    stringBuffer.append(TEXT_120);
1868
    stringBuffer.append(TEXT_120);
1606
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1869
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1607
    stringBuffer.append(TEXT_121);
1870
    stringBuffer.append(TEXT_121);
1608
    
1871
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
1609
	for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1610
		GenLink genLink = (GenLink)it.next();
1611
		if (!genLink.isViewDirectionAlignedWithModel() || genLink.getModelFacet() == null) {
1612
			continue;
1613
		}
1614
		GenClass incomingClass;
1615
		String reconnectCommandNameInfix;
1616
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
1617
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
1618
			incomingClass = modelFacet.getTargetMetaFeature().getTypeGenClass();
1619
			reconnectCommandNameInfix = modelFacet.getMetaClass().getName();
1620
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
1621
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
1622
			incomingClass = metaFeature.getTypeGenClass();
1623
			reconnectCommandNameInfix = metaFeature.getFeatureAccessorName();
1624
		} else {
1625
			continue;
1626
		}
1627
		if (!incomingClass.getEcoreClass().isSuperTypeOf(genNode.getModelFacet().getMetaClass().getEcoreClass())) {
1628
			continue;
1629
		}
1630
1631
    stringBuffer.append(TEXT_122);
1872
    stringBuffer.append(TEXT_122);
1632
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
1873
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
1633
    stringBuffer.append(TEXT_123);
1874
    stringBuffer.append(TEXT_123);
1634
    stringBuffer.append(reconnectCommandNameInfix);
1875
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
1635
    stringBuffer.append(genLink.getVisualID());
1636
    stringBuffer.append(TEXT_124);
1876
    stringBuffer.append(TEXT_124);
1637
    
1877
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
1638
	}
1639
1640
    stringBuffer.append(TEXT_125);
1878
    stringBuffer.append(TEXT_125);
1641
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1879
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
1642
    stringBuffer.append(TEXT_126);
1880
    stringBuffer.append(TEXT_126);
1643
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1881
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
1644
    stringBuffer.append(TEXT_127);
1882
    stringBuffer.append(TEXT_127);
1645
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1883
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1646
    stringBuffer.append(TEXT_128);
1884
    stringBuffer.append(TEXT_128);
1647
    
1885
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1648
}
1649
1650
    stringBuffer.append(TEXT_129);
1886
    stringBuffer.append(TEXT_129);
1651
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1887
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1652
    stringBuffer.append(TEXT_130);
1888
    stringBuffer.append(TEXT_130);
1653
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
1889
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
1654
    stringBuffer.append(TEXT_131);
1890
    stringBuffer.append(TEXT_131);
1655
    
1891
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1656
if (!myHelper.hasOutgoingLinks()) {
1657
1658
    stringBuffer.append(TEXT_132);
1892
    stringBuffer.append(TEXT_132);
1659
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1893
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
1660
    stringBuffer.append(TEXT_133);
1894
    stringBuffer.append(TEXT_133);
1661
    
1895
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension"));
1662
} else {
1663
1664
    stringBuffer.append(TEXT_134);
1896
    stringBuffer.append(TEXT_134);
1665
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
1897
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
1666
    stringBuffer.append(TEXT_135);
1898
    stringBuffer.append(TEXT_135);
1667
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1899
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
1668
    stringBuffer.append(TEXT_136);
1900
    stringBuffer.append(TEXT_136);
1669
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1901
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1670
    stringBuffer.append(TEXT_137);
1902
    stringBuffer.append(TEXT_137);
1671
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1903
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1672
    stringBuffer.append(TEXT_138);
1904
    stringBuffer.append(TEXT_138);
1673
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1905
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1674
    stringBuffer.append(TEXT_139);
1906
    stringBuffer.append(TEXT_139);
1675
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1907
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1676
    stringBuffer.append(TEXT_140);
1908
    stringBuffer.append(TEXT_140);
1677
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
1909
    
1910
} else {
1911
1678
    stringBuffer.append(TEXT_141);
1912
    stringBuffer.append(TEXT_141);
1679
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1913
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1680
    stringBuffer.append(TEXT_142);
1914
    stringBuffer.append(TEXT_142);
1681
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1915
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Point"));
1682
    stringBuffer.append(TEXT_143);
1916
    stringBuffer.append(TEXT_143);
1683
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1917
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1684
    stringBuffer.append(TEXT_144);
1918
    stringBuffer.append(TEXT_144);
1919
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1920
    stringBuffer.append(TEXT_145);
1921
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1922
    stringBuffer.append(TEXT_146);
1923
    
1924
}
1925
1926
    stringBuffer.append(TEXT_147);
1927
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1928
    stringBuffer.append(TEXT_148);
1929
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1930
    stringBuffer.append(TEXT_149);
1931
    
1932
if (!genNode.getChildNodes().isEmpty()) {
1933
1934
    stringBuffer.append(TEXT_150);
1935
    
1936
}
1937
1938
    stringBuffer.append(TEXT_151);
1939
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.ResizableEditPolicy"));
1940
    stringBuffer.append(TEXT_152);
1941
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1942
    stringBuffer.append(TEXT_153);
1943
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
1944
    stringBuffer.append(TEXT_154);
1945
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants"));
1946
    stringBuffer.append(TEXT_155);
1947
    stringBuffer.append(genNode.getEditPartClassName());
1948
    stringBuffer.append(TEXT_156);
1949
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPolicy"));
1950
    stringBuffer.append(TEXT_157);
1951
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy"));
1952
    stringBuffer.append(TEXT_158);
1953
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1954
    stringBuffer.append(TEXT_159);
1955
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
1956
    stringBuffer.append(TEXT_160);
1957
    
1958
if (!myHelper.hasIncomingLinks()) {
1959
1960
    stringBuffer.append(TEXT_161);
1961
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1962
    stringBuffer.append(TEXT_162);
1963
    
1964
} else {
1965
1966
    stringBuffer.append(TEXT_163);
1967
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
1968
    stringBuffer.append(TEXT_164);
1969
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1970
    stringBuffer.append(TEXT_165);
1971
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1972
    stringBuffer.append(TEXT_166);
1973
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1974
    stringBuffer.append(TEXT_167);
1975
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
1976
    stringBuffer.append(TEXT_168);
1977
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1978
    stringBuffer.append(TEXT_169);
1979
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
1980
    stringBuffer.append(TEXT_170);
1981
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1982
    stringBuffer.append(TEXT_171);
1983
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
1984
    stringBuffer.append(TEXT_172);
1985
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
1986
    stringBuffer.append(TEXT_173);
1987
    
1988
	for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1989
		GenLink genLink = (GenLink)it.next();
1990
		if (!genLink.isViewDirectionAlignedWithModel() || genLink.getModelFacet() == null) {
1991
			continue;
1992
		}
1993
		GenClass incomingClass;
1994
		String reconnectCommandNameInfix;
1995
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
1996
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
1997
			incomingClass = modelFacet.getTargetMetaFeature().getTypeGenClass();
1998
			reconnectCommandNameInfix = modelFacet.getMetaClass().getName();
1999
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
2000
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
2001
			incomingClass = metaFeature.getTypeGenClass();
2002
			reconnectCommandNameInfix = metaFeature.getFeatureAccessorName();
2003
		} else {
2004
			continue;
2005
		}
2006
		if (!incomingClass.getEcoreClass().isSuperTypeOf(genNode.getModelFacet().getMetaClass().getEcoreClass())) {
2007
			continue;
2008
		}
2009
2010
    stringBuffer.append(TEXT_174);
2011
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
2012
    stringBuffer.append(TEXT_175);
2013
    stringBuffer.append(reconnectCommandNameInfix);
2014
    stringBuffer.append(genLink.getVisualID());
2015
    stringBuffer.append(TEXT_176);
2016
    
2017
	}
2018
2019
    stringBuffer.append(TEXT_177);
2020
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2021
    stringBuffer.append(TEXT_178);
2022
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
2023
    stringBuffer.append(TEXT_179);
2024
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2025
    stringBuffer.append(TEXT_180);
2026
    
2027
}
2028
2029
    stringBuffer.append(TEXT_181);
2030
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
2031
    stringBuffer.append(TEXT_182);
2032
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
2033
    stringBuffer.append(TEXT_183);
2034
    
2035
if (!myHelper.hasOutgoingLinks()) {
2036
2037
    stringBuffer.append(TEXT_184);
2038
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2039
    stringBuffer.append(TEXT_185);
2040
    
2041
} else {
2042
2043
    stringBuffer.append(TEXT_186);
2044
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
2045
    stringBuffer.append(TEXT_187);
2046
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
2047
    stringBuffer.append(TEXT_188);
2048
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2049
    stringBuffer.append(TEXT_189);
2050
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
2051
    stringBuffer.append(TEXT_190);
2052
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
2053
    stringBuffer.append(TEXT_191);
2054
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2055
    stringBuffer.append(TEXT_192);
2056
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName()));
2057
    stringBuffer.append(TEXT_193);
2058
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2059
    stringBuffer.append(TEXT_194);
2060
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
2061
    stringBuffer.append(TEXT_195);
2062
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2063
    stringBuffer.append(TEXT_196);
1685
    
2064
    
1686
	for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
2065
	for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1687
		GenLink genLink = (GenLink)it.next();
2066
		GenLink genLink = (GenLink)it.next();
Lines 1707-1748 Link Here
1707
			continue;
2086
			continue;
1708
		}
2087
		}
1709
2088
1710
    stringBuffer.append(TEXT_145);
2089
    stringBuffer.append(TEXT_197);
1711
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
2090
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
1712
    stringBuffer.append(TEXT_146);
2091
    stringBuffer.append(TEXT_198);
1713
    stringBuffer.append(reconnectCommandNameInfix);
2092
    stringBuffer.append(reconnectCommandNameInfix);
1714
    stringBuffer.append(genLink.getVisualID());
2093
    stringBuffer.append(genLink.getVisualID());
1715
    stringBuffer.append(TEXT_147);
2094
    stringBuffer.append(TEXT_199);
1716
    
2095
    
1717
	}
2096
	}
1718
2097
1719
    stringBuffer.append(TEXT_148);
2098
    stringBuffer.append(TEXT_200);
1720
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2099
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1721
    stringBuffer.append(TEXT_149);
2100
    stringBuffer.append(TEXT_201);
1722
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
2101
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1723
    stringBuffer.append(TEXT_150);
2102
    stringBuffer.append(TEXT_202);
1724
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2103
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1725
    stringBuffer.append(TEXT_151);
2104
    stringBuffer.append(TEXT_203);
1726
    
2105
    
1727
}
2106
}
1728
2107
1729
    stringBuffer.append(TEXT_152);
2108
    stringBuffer.append(TEXT_204);
1730
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
2109
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1731
    stringBuffer.append(TEXT_153);
2110
    stringBuffer.append(TEXT_205);
1732
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest"));
2111
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest"));
1733
    stringBuffer.append(TEXT_154);
2112
    stringBuffer.append(TEXT_206);
1734
    if (palette != null && myHelper.hasOutgoingLinks()) {
2113
    if (palette != null && myHelper.hasOutgoingLinks()) {
1735
    stringBuffer.append(TEXT_155);
2114
    stringBuffer.append(TEXT_207);
1736
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
2115
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
1737
    stringBuffer.append(TEXT_156);
2116
    stringBuffer.append(TEXT_208);
1738
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
2117
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
1739
    stringBuffer.append(TEXT_157);
2118
    stringBuffer.append(TEXT_209);
1740
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
2119
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
1741
    stringBuffer.append(TEXT_158);
2120
    stringBuffer.append(TEXT_210);
1742
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
2121
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1743
    stringBuffer.append(TEXT_159);
2122
    stringBuffer.append(TEXT_211);
1744
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
2123
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1745
    stringBuffer.append(TEXT_160);
2124
    stringBuffer.append(TEXT_212);
1746
    
2125
    
1747
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
2126
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1748
	GenLink genLink = (GenLink)it.next();
2127
	GenLink genLink = (GenLink)it.next();
Lines 1768-1809 Link Here
1768
		continue;
2147
		continue;
1769
	}
2148
	}
1770
2149
1771
    stringBuffer.append(TEXT_161);
2150
    stringBuffer.append(TEXT_213);
1772
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
2151
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
1773
    stringBuffer.append(TEXT_162);
2152
    stringBuffer.append(TEXT_214);
1774
    stringBuffer.append(createCommandNameInfix);
2153
    stringBuffer.append(createCommandNameInfix);
1775
    stringBuffer.append(genLink.getVisualID());
2154
    stringBuffer.append(genLink.getVisualID());
1776
    stringBuffer.append(TEXT_163);
2155
    stringBuffer.append(TEXT_215);
1777
    
2156
    
1778
}
2157
}
1779
2158
1780
    stringBuffer.append(TEXT_164);
2159
    stringBuffer.append(TEXT_216);
1781
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
2160
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1782
    stringBuffer.append(TEXT_165);
2161
    stringBuffer.append(TEXT_217);
1783
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
2162
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1784
    stringBuffer.append(TEXT_166);
2163
    stringBuffer.append(TEXT_218);
1785
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2164
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1786
    stringBuffer.append(TEXT_167);
2165
    stringBuffer.append(TEXT_219);
1787
    }/*when there's palette*/
2166
    }/*when there's palette*/
1788
    stringBuffer.append(TEXT_168);
2167
    stringBuffer.append(TEXT_220);
1789
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
2168
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.Command"));
1790
    stringBuffer.append(TEXT_169);
2169
    stringBuffer.append(TEXT_221);
1791
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest"));
2170
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.CreateConnectionRequest"));
1792
    stringBuffer.append(TEXT_170);
2171
    stringBuffer.append(TEXT_222);
1793
    if (palette != null && myHelper.hasIncomingLinks()) {
2172
    if (palette != null && myHelper.hasIncomingLinks()) {
1794
    stringBuffer.append(TEXT_171);
2173
    stringBuffer.append(TEXT_223);
1795
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2174
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1796
    stringBuffer.append(TEXT_172);
2175
    stringBuffer.append(TEXT_224);
1797
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
2176
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
1798
    stringBuffer.append(TEXT_173);
2177
    stringBuffer.append(TEXT_225);
1799
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
2178
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
1800
    stringBuffer.append(TEXT_174);
2179
    stringBuffer.append(TEXT_226);
1801
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
2180
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
1802
    stringBuffer.append(TEXT_175);
2181
    stringBuffer.append(TEXT_227);
1803
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
2182
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1804
    stringBuffer.append(TEXT_176);
2183
    stringBuffer.append(TEXT_228);
1805
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
2184
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
1806
    stringBuffer.append(TEXT_177);
2185
    stringBuffer.append(TEXT_229);
1807
    
2186
    
1808
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
2187
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
1809
	GenLink genLink = (GenLink)it.next();
2188
	GenLink genLink = (GenLink)it.next();
Lines 1827-1975 Link Here
1827
		continue;
2206
		continue;
1828
	}
2207
	}
1829
2208
1830
    stringBuffer.append(TEXT_178);
2209
    stringBuffer.append(TEXT_230);
1831
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
2210
    stringBuffer.append(importManager.getImportedName(genLink.getEditPartQualifiedClassName()));
1832
    stringBuffer.append(TEXT_179);
2211
    stringBuffer.append(TEXT_231);
1833
    stringBuffer.append(createCommandNameInfix);
2212
    stringBuffer.append(createCommandNameInfix);
1834
    stringBuffer.append(genLink.getVisualID());
2213
    stringBuffer.append(genLink.getVisualID());
1835
    stringBuffer.append(TEXT_180);
2214
    stringBuffer.append(TEXT_232);
1836
    
2215
    
1837
}
2216
}
1838
2217
1839
    stringBuffer.append(TEXT_181);
2218
    stringBuffer.append(TEXT_233);
1840
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2219
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1841
    stringBuffer.append(TEXT_182);
2220
    stringBuffer.append(TEXT_234);
1842
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
2221
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
1843
    stringBuffer.append(TEXT_183);
2222
    stringBuffer.append(TEXT_235);
1844
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2223
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
1845
    stringBuffer.append(TEXT_184);
2224
    stringBuffer.append(TEXT_236);
1846
    }/*when there's palette*/
2225
    }/*when there's palette*/
1847
    stringBuffer.append(TEXT_185);
2226
    stringBuffer.append(TEXT_237);
1848
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
2227
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.commands.UnexecutableCommand"));
1849
    stringBuffer.append(TEXT_186);
2228
    stringBuffer.append(TEXT_238);
2229
    
2230
if (!genNode.getChildNodes().isEmpty()) {
2231
2232
    stringBuffer.append(TEXT_239);
2233
    
2234
}
2235
1850
    
2236
    
1851
if (myHelper.containsLinks()) {
2237
if (myHelper.containsLinks()) {
1852
2238
1853
    stringBuffer.append(TEXT_187);
2239
    stringBuffer.append(TEXT_240);
1854
    
2240
    
1855
}
2241
}
1856
2242
1857
    stringBuffer.append(TEXT_188);
2243
    stringBuffer.append(TEXT_241);
1858
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2244
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1859
    stringBuffer.append(TEXT_189);
2245
    stringBuffer.append(TEXT_242);
1860
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2246
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1861
    stringBuffer.append(TEXT_190);
2247
    stringBuffer.append(TEXT_243);
1862
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
2248
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
1863
    stringBuffer.append(TEXT_191);
2249
    stringBuffer.append(TEXT_244);
1864
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.StackLayout"));
2250
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.StackLayout"));
1865
    stringBuffer.append(TEXT_192);
2251
    stringBuffer.append(TEXT_245);
1866
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1867
    stringBuffer.append(TEXT_193);
1868
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1869
    stringBuffer.append(TEXT_194);
1870
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2252
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1871
    stringBuffer.append(TEXT_195);
2253
    stringBuffer.append(TEXT_246);
1872
    
2254
    
1873
String figureQualifiedClassName = null;
2255
	if (myHelper.hasBothChildrenAndCompartments()) {
1874
Viewmap viewmap = genNode.getViewmap();
2256
1875
if (viewmap instanceof FigureViewmap) {
2257
    stringBuffer.append(TEXT_247);
1876
	figureQualifiedClassName = ((FigureViewmap) viewmap).getFigureQualifiedClassName();
2258
    
2259
	}
2260
2261
    stringBuffer.append(TEXT_248);
2262
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2263
    stringBuffer.append(TEXT_249);
2264
    
2265
	if (!genNode.getCompartments().isEmpty() && !genNode.getChildNodes().isEmpty()) {
2266
2267
    stringBuffer.append(TEXT_250);
2268
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2269
    stringBuffer.append(TEXT_251);
2270
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2271
    stringBuffer.append(TEXT_252);
2272
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.RectangleFigure"));
2273
    stringBuffer.append(TEXT_253);
2274
    
2275
	}
2276
2277
    stringBuffer.append(TEXT_254);
2278
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2279
    stringBuffer.append(TEXT_255);
2280
    
2281
String figureQualifiedClassName = null;
2282
Viewmap viewmap = genNode.getViewmap();
2283
if (viewmap instanceof FigureViewmap) {
2284
	figureQualifiedClassName = ((FigureViewmap) viewmap).getFigureQualifiedClassName();
1877
	if (figureQualifiedClassName == null || figureQualifiedClassName.trim().length() == 0) {
2285
	if (figureQualifiedClassName == null || figureQualifiedClassName.trim().length() == 0) {
1878
		figureQualifiedClassName = "org.eclipse.draw2d.RectangleFigure";
2286
		figureQualifiedClassName = "org.eclipse.draw2d.RectangleFigure";
1879
	}
2287
	}
1880
2288
1881
    stringBuffer.append(TEXT_196);
2289
    stringBuffer.append(TEXT_256);
1882
    stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
2290
    stringBuffer.append(importManager.getImportedName(figureQualifiedClassName));
1883
    stringBuffer.append(TEXT_197);
2291
    stringBuffer.append(TEXT_257);
1884
    if (isXYLayout) {
2292
    if (isXYLayout) {
1885
    stringBuffer.append(TEXT_198);
2293
    stringBuffer.append(TEXT_258);
1886
    } /* use flow layout*/ 
2294
    } /* use flow layout*/ 
1887
    stringBuffer.append(TEXT_199);
2295
    stringBuffer.append(TEXT_259);
1888
    } else if (viewmap instanceof SnippetViewmap) {
2296
    } else if (viewmap instanceof SnippetViewmap) {
1889
    stringBuffer.append(TEXT_200);
2297
    stringBuffer.append(TEXT_260);
1890
    stringBuffer.append(((SnippetViewmap) viewmap).getBody());
2298
    stringBuffer.append(((SnippetViewmap) viewmap).getBody());
1891
    stringBuffer.append(TEXT_201);
2299
    stringBuffer.append(TEXT_261);
1892
    } else if (viewmap instanceof InnerClassViewmap) {
2300
    } else if (viewmap instanceof InnerClassViewmap) {
1893
 	figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();
2301
 	figureQualifiedClassName = ((InnerClassViewmap) viewmap).getClassName();
1894
2302
1895
    stringBuffer.append(TEXT_202);
2303
    stringBuffer.append(TEXT_262);
1896
    stringBuffer.append(figureQualifiedClassName);
2304
    stringBuffer.append(figureQualifiedClassName);
1897
    stringBuffer.append(TEXT_203);
2305
    stringBuffer.append(TEXT_263);
1898
    stringBuffer.append(figureQualifiedClassName);
2306
    stringBuffer.append(figureQualifiedClassName);
1899
    stringBuffer.append(TEXT_204);
2307
    stringBuffer.append(TEXT_264);
1900
    if (!genNode.getChildNodes().isEmpty() && isXYLayout) { /*otherwise, leave to figure's default value*/
2308
    if (!genNode.getChildNodes().isEmpty() && isXYLayout) { /*otherwise, leave to figure's default value*/
1901
    stringBuffer.append(TEXT_205);
2309
    stringBuffer.append(TEXT_265);
1902
    }
2310
    }
1903
    stringBuffer.append(TEXT_206);
2311
    stringBuffer.append(TEXT_266);
1904
    }
2312
    }
1905
    stringBuffer.append(TEXT_207);
2313
    stringBuffer.append(TEXT_267);
1906
    if (figureQualifiedClassName != null) {
2314
    if (figureQualifiedClassName != null) {
1907
    stringBuffer.append(TEXT_208);
2315
    stringBuffer.append(TEXT_268);
1908
    stringBuffer.append(figureQualifiedClassName);
2316
    stringBuffer.append(figureQualifiedClassName);
1909
    stringBuffer.append(TEXT_209);
2317
    stringBuffer.append(TEXT_269);
1910
    stringBuffer.append(figureQualifiedClassName);
2318
    stringBuffer.append(figureQualifiedClassName);
1911
    stringBuffer.append(TEXT_210);
2319
    stringBuffer.append(TEXT_270);
1912
    }
2320
    }
1913
    stringBuffer.append(TEXT_211);
2321
    stringBuffer.append(TEXT_271);
1914
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2322
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1915
    stringBuffer.append(TEXT_212);
2323
    stringBuffer.append(TEXT_272);
1916
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2324
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1917
    stringBuffer.append(TEXT_213);
2325
    stringBuffer.append(TEXT_273);
1918
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2326
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
1919
    stringBuffer.append(TEXT_214);
2327
    stringBuffer.append(TEXT_274);
1920
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation"));
2328
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation"));
1921
    stringBuffer.append(TEXT_215);
2329
    stringBuffer.append(TEXT_275);
1922
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
2330
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
1923
    stringBuffer.append(TEXT_216);
2331
    stringBuffer.append(TEXT_276);
1924
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
2332
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure"));
1925
    stringBuffer.append(TEXT_217);
2333
    stringBuffer.append(TEXT_277);
1926
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout"));
2334
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout"));
1927
    stringBuffer.append(TEXT_218);
2335
    stringBuffer.append(TEXT_278);
1928
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure"));
2336
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure"));
1929
    stringBuffer.append(TEXT_219);
2337
    stringBuffer.append(TEXT_279);
1930
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure"));
2338
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure"));
1931
    stringBuffer.append(TEXT_220);
2339
    stringBuffer.append(TEXT_280);
1932
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
2340
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName()));
1933
    stringBuffer.append(TEXT_221);
2341
    stringBuffer.append(TEXT_281);
1934
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants"));
2342
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants"));
1935
    stringBuffer.append(TEXT_222);
2343
    stringBuffer.append(TEXT_282);
1936
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout"));
2344
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout"));
1937
    stringBuffer.append(TEXT_223);
2345
    stringBuffer.append(TEXT_283);
1938
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2346
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1939
    stringBuffer.append(TEXT_224);
2347
    stringBuffer.append(TEXT_284);
1940
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2348
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1941
    stringBuffer.append(TEXT_225);
2349
    stringBuffer.append(TEXT_285);
1942
    
2350
    
1943
if (!isXYLayout) {
2351
if (!isXYLayout) {
1944
	String layoutClassName = importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout");
2352
	String layoutClassName = importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout");
1945
2353
1946
    stringBuffer.append(TEXT_226);
2354
    stringBuffer.append(TEXT_286);
1947
    stringBuffer.append(layoutClassName);
2355
    stringBuffer.append(layoutClassName);
1948
    stringBuffer.append(TEXT_227);
2356
    stringBuffer.append(TEXT_287);
1949
    stringBuffer.append(layoutClassName);
2357
    stringBuffer.append(layoutClassName);
1950
    stringBuffer.append(TEXT_228);
2358
    stringBuffer.append(TEXT_288);
1951
    } else {
2359
    } else {
1952
    stringBuffer.append(TEXT_229);
2360
    stringBuffer.append(TEXT_289);
1953
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout"));
2361
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout"));
1954
    stringBuffer.append(TEXT_230);
2362
    stringBuffer.append(TEXT_290);
1955
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2363
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1956
    stringBuffer.append(TEXT_231);
2364
    stringBuffer.append(TEXT_291);
1957
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
2365
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
1958
    stringBuffer.append(TEXT_232);
2366
    stringBuffer.append(TEXT_292);
1959
    }
2367
    }
1960
    stringBuffer.append(TEXT_233);
2368
    stringBuffer.append(TEXT_293);
1961
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2369
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
1962
    stringBuffer.append(TEXT_234);
2370
    stringBuffer.append(TEXT_294);
1963
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
2371
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
1964
    stringBuffer.append(TEXT_235);
2372
    stringBuffer.append(TEXT_295);
1965
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
2373
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
1966
    stringBuffer.append(TEXT_236);
2374
    stringBuffer.append(TEXT_296);
1967
    
2375
    
1968
	if (myHelper.hasFixedChildren()) {
2376
	if (myHelper.hasFixedChildren()) {
1969
2377
1970
    stringBuffer.append(TEXT_237);
2378
    stringBuffer.append(TEXT_297);
1971
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2379
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
1972
    stringBuffer.append(TEXT_238);
2380
    stringBuffer.append(TEXT_298);
1973
    
2381
    
1974
for (Iterator it = myHelper.getInnerFixedLabels(); it.hasNext(); ) {
2382
for (Iterator it = myHelper.getInnerFixedLabels(); it.hasNext(); ) {
1975
	GenNodeLabel genLabel = (GenNodeLabel) it.next();
2383
	GenNodeLabel genLabel = (GenNodeLabel) it.next();
Lines 1977-1991 Link Here
1977
	final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) genLabel.getViewmap();
2385
	final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) genLabel.getViewmap();
1978
	final String childSetterName = childViewmap.getSetterName() == null ? "setLabel" : childViewmap.getSetterName();
2386
	final String childSetterName = childViewmap.getSetterName() == null ? "setLabel" : childViewmap.getSetterName();
1979
2387
1980
    stringBuffer.append(TEXT_239);
2388
    stringBuffer.append(TEXT_299);
1981
    stringBuffer.append(labelEditPart);
2389
    stringBuffer.append(labelEditPart);
1982
    stringBuffer.append(TEXT_240);
2390
    stringBuffer.append(TEXT_300);
1983
    stringBuffer.append(labelEditPart);
2391
    stringBuffer.append(labelEditPart);
1984
    stringBuffer.append(TEXT_241);
2392
    stringBuffer.append(TEXT_301);
1985
    stringBuffer.append(childSetterName);
2393
    stringBuffer.append(childSetterName);
1986
    stringBuffer.append(TEXT_242);
2394
    stringBuffer.append(TEXT_302);
1987
    stringBuffer.append(childViewmap.getGetterName());
2395
    stringBuffer.append(childViewmap.getGetterName());
1988
    stringBuffer.append(TEXT_243);
2396
    stringBuffer.append(TEXT_303);
1989
    
2397
    
1990
}
2398
}
1991
2399
Lines 1994-2012 Link Here
1994
	final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) next.getViewmap();
2402
	final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) next.getViewmap();
1995
	String compartmentEditPartFQN = importManager.getImportedName(next.getEditPartQualifiedClassName());
2403
	String compartmentEditPartFQN = importManager.getImportedName(next.getEditPartQualifiedClassName());
1996
2404
1997
    stringBuffer.append(TEXT_244);
2405
    stringBuffer.append(TEXT_304);
1998
    stringBuffer.append(compartmentEditPartFQN);
2406
    stringBuffer.append(compartmentEditPartFQN);
1999
    stringBuffer.append(TEXT_245);
2407
    stringBuffer.append(TEXT_305);
2000
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2408
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2001
    stringBuffer.append(TEXT_246);
2409
    stringBuffer.append(TEXT_306);
2002
    stringBuffer.append(childViewmap.getGetterName());
2410
    stringBuffer.append(childViewmap.getGetterName());
2003
    stringBuffer.append(TEXT_247);
2411
    stringBuffer.append(TEXT_307);
2004
    stringBuffer.append(compartmentEditPartFQN);
2412
    stringBuffer.append(compartmentEditPartFQN);
2005
    stringBuffer.append(TEXT_248);
2413
    stringBuffer.append(TEXT_308);
2006
    	
2414
    	
2007
} // for pinned compartments
2415
} // for pinned compartments
2008
2416
2009
    stringBuffer.append(TEXT_249);
2417
    stringBuffer.append(TEXT_309);
2010
    
2418
    
2011
//XXX: ignore labels assuming that they never may be removed
2419
//XXX: ignore labels assuming that they never may be removed
2012
for (Iterator it = myHelper.getPinnedCompartments(); it.hasNext(); ) {
2420
for (Iterator it = myHelper.getPinnedCompartments(); it.hasNext(); ) {
Lines 2014-2038 Link Here
2014
	final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) next.getViewmap();
2422
	final ParentAssignedViewmap childViewmap = (ParentAssignedViewmap) next.getViewmap();
2015
	String compartmentEditPartFQN = importManager.getImportedName(next.getEditPartQualifiedClassName());
2423
	String compartmentEditPartFQN = importManager.getImportedName(next.getEditPartQualifiedClassName());
2016
2424
2017
    stringBuffer.append(TEXT_250);
2425
    stringBuffer.append(TEXT_310);
2018
    stringBuffer.append(compartmentEditPartFQN);
2426
    stringBuffer.append(compartmentEditPartFQN);
2019
    stringBuffer.append(TEXT_251);
2427
    stringBuffer.append(TEXT_311);
2020
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2428
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2021
    stringBuffer.append(TEXT_252);
2429
    stringBuffer.append(TEXT_312);
2022
    stringBuffer.append(childViewmap.getGetterName());
2430
    stringBuffer.append(childViewmap.getGetterName());
2023
    stringBuffer.append(TEXT_253);
2431
    stringBuffer.append(TEXT_313);
2024
    stringBuffer.append(compartmentEditPartFQN);
2432
    stringBuffer.append(compartmentEditPartFQN);
2025
    stringBuffer.append(TEXT_254);
2433
    stringBuffer.append(TEXT_314);
2026
    
2434
    
2027
} // for pinned compartments
2435
} // for pinned compartments
2028
2436
2029
    stringBuffer.append(TEXT_255);
2437
    stringBuffer.append(TEXT_315);
2030
    
2438
    
2031
} // if myHelper.hasFixedChildren()
2439
} // if myHelper.hasFixedChildren()
2032
2440
2033
    stringBuffer.append(TEXT_256);
2441
    stringBuffer.append(TEXT_316);
2034
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2442
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2035
    stringBuffer.append(TEXT_257);
2443
    stringBuffer.append(TEXT_317);
2036
    
2444
    
2037
		GenNodeLabel firstEditableLabel = null;
2445
		GenNodeLabel firstEditableLabel = null;
2038
		for (Iterator it = myHelper.getAllInnerLabels(); it.hasNext(); ) {
2446
		for (Iterator it = myHelper.getAllInnerLabels(); it.hasNext(); ) {
Lines 2044-2088 Link Here
2044
		}
2452
		}
2045
		if (firstEditableLabel != null) {
2453
		if (firstEditableLabel != null) {
2046
2454
2047
    stringBuffer.append(TEXT_258);
2455
    stringBuffer.append(TEXT_318);
2048
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2456
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2049
    stringBuffer.append(TEXT_259);
2457
    stringBuffer.append(TEXT_319);
2050
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2458
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2051
    stringBuffer.append(TEXT_260);
2459
    stringBuffer.append(TEXT_320);
2052
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2460
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2053
    stringBuffer.append(TEXT_261);
2461
    stringBuffer.append(TEXT_321);
2054
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2462
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2055
    stringBuffer.append(TEXT_262);
2463
    stringBuffer.append(TEXT_322);
2056
    stringBuffer.append(importManager.getImportedName(firstEditableLabel.getEditPartQualifiedClassName()));
2464
    stringBuffer.append(importManager.getImportedName(firstEditableLabel.getEditPartQualifiedClassName()));
2057
    stringBuffer.append(TEXT_263);
2465
    stringBuffer.append(TEXT_323);
2058
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2466
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2059
    stringBuffer.append(TEXT_264);
2467
    stringBuffer.append(TEXT_324);
2060
    
2468
    
2061
		}
2469
		}
2062
2470
2063
    stringBuffer.append(TEXT_265);
2471
    stringBuffer.append(TEXT_325);
2064
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
2472
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
2065
    stringBuffer.append(TEXT_266);
2473
    stringBuffer.append(TEXT_326);
2066
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants"));
2474
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants"));
2067
    stringBuffer.append(TEXT_267);
2475
    stringBuffer.append(TEXT_327);
2068
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2476
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2069
    stringBuffer.append(TEXT_268);
2477
    stringBuffer.append(TEXT_328);
2070
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
2478
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
2071
    stringBuffer.append(TEXT_269);
2479
    stringBuffer.append(TEXT_329);
2072
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
2480
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
2073
    stringBuffer.append(TEXT_270);
2481
    stringBuffer.append(TEXT_330);
2074
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2482
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2075
    stringBuffer.append(TEXT_271);
2483
    stringBuffer.append(TEXT_331);
2076
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
2484
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest"));
2077
    stringBuffer.append(TEXT_272);
2485
    stringBuffer.append(TEXT_332);
2078
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2486
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2079
    stringBuffer.append(TEXT_273);
2487
    stringBuffer.append(TEXT_333);
2080
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2488
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2081
    stringBuffer.append(TEXT_274);
2489
    stringBuffer.append(TEXT_334);
2082
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2490
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2083
    stringBuffer.append(TEXT_275);
2491
    stringBuffer.append(TEXT_335);
2084
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2492
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2085
    stringBuffer.append(TEXT_276);
2493
    stringBuffer.append(TEXT_336);
2086
    
2494
    
2087
		for (Iterator it = myHelper.getAllInnerLabels(); it.hasNext(); ) {
2495
		for (Iterator it = myHelper.getAllInnerLabels(); it.hasNext(); ) {
2088
			GenNodeLabel genLabel = (GenNodeLabel) it.next();
2496
			GenNodeLabel genLabel = (GenNodeLabel) it.next();
Lines 2090-2415 Link Here
2090
				continue;
2498
				continue;
2091
			}
2499
			}
2092
2500
2093
    stringBuffer.append(TEXT_277);
2501
    stringBuffer.append(TEXT_337);
2094
    stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
2502
    stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName()));
2095
    stringBuffer.append(TEXT_278);
2503
    stringBuffer.append(TEXT_338);
2096
    
2504
    
2097
		}
2505
		}
2098
2506
2099
    stringBuffer.append(TEXT_279);
2507
    stringBuffer.append(TEXT_339);
2100
    
2508
    
2101
if (myHelper.hasExternalLabels()) {
2509
if (myHelper.hasExternalLabels()) {
2102
2510
2103
    stringBuffer.append(TEXT_280);
2511
    stringBuffer.append(TEXT_340);
2104
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2512
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2105
    stringBuffer.append(TEXT_281);
2513
    stringBuffer.append(TEXT_341);
2106
    
2514
    
2107
	for (Iterator externalLabels = myHelper.getExternalLabels(); externalLabels.hasNext();) {
2515
	for (Iterator externalLabels = myHelper.getExternalLabels(); externalLabels.hasNext();) {
2108
		GenNodeLabel next = (GenNodeLabel) externalLabels.next();
2516
		GenNodeLabel next = (GenNodeLabel) externalLabels.next();
2109
2517
2110
    stringBuffer.append(TEXT_282);
2518
    stringBuffer.append(TEXT_342);
2111
    stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName()));
2519
    stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName()));
2112
    stringBuffer.append(TEXT_283);
2520
    stringBuffer.append(TEXT_343);
2113
    
2521
    
2114
	}
2522
	}
2115
2523
2116
    stringBuffer.append(TEXT_284);
2524
    stringBuffer.append(TEXT_344);
2117
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2525
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2118
    stringBuffer.append(TEXT_285);
2526
    stringBuffer.append(TEXT_345);
2119
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.LayerManager"));
2527
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.LayerManager"));
2120
    stringBuffer.append(TEXT_286);
2528
    stringBuffer.append(TEXT_346);
2121
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.LayerManager"));
2529
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.LayerManager"));
2122
    stringBuffer.append(TEXT_287);
2530
    stringBuffer.append(TEXT_347);
2123
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
2531
    stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName()));
2124
    stringBuffer.append(TEXT_288);
2532
    stringBuffer.append(TEXT_348);
2125
    
2533
    
2126
}
2534
}
2127
if (myHelper.hasExternalLabels() || myHelper.hasFixedChildren()) {
2535
if (!genNode.getChildNodes().isEmpty()) {
2128
2536
2129
    stringBuffer.append(TEXT_289);
2537
    stringBuffer.append(TEXT_349);
2130
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2538
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2131
    stringBuffer.append(TEXT_290);
2539
    stringBuffer.append(TEXT_350);
2132
    
2540
    
2133
	if (myHelper.hasExternalLabels()) {
2541
	for(Iterator directChildren = genNode.getChildNodes().iterator(); directChildren.hasNext(); ) {
2542
		GenChildNode next = (GenChildNode) directChildren.next();
2134
2543
2135
    stringBuffer.append(TEXT_291);
2544
    stringBuffer.append(TEXT_351);
2136
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2545
    stringBuffer.append(importManager.getImportedName(next.getEditPartQualifiedClassName()));
2137
    stringBuffer.append(TEXT_292);
2546
    stringBuffer.append(TEXT_352);
2138
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2139
    stringBuffer.append(TEXT_293);
2140
    
2547
    
2141
	}
2548
	}
2142
	if (myHelper.hasFixedChildren()) {
2143
2549
2144
    stringBuffer.append(TEXT_294);
2550
    stringBuffer.append(TEXT_353);
2145
    
2551
    
2146
	}
2552
}
2553
if (myHelper.hasExternalLabels() || myHelper.hasFixedChildren() || myHelper.hasBothChildrenAndCompartments()) {
2147
2554
2148
    stringBuffer.append(TEXT_295);
2555
    stringBuffer.append(TEXT_354);
2149
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2556
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2150
    stringBuffer.append(TEXT_296);
2557
    stringBuffer.append(TEXT_355);
2151
    
2558
    
2152
	if (myHelper.hasExternalLabels()) {
2559
	if (myHelper.hasExternalLabels()) {
2153
2560
2154
    stringBuffer.append(TEXT_297);
2561
    stringBuffer.append(TEXT_356);
2155
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2562
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2156
    stringBuffer.append(TEXT_298);
2563
    stringBuffer.append(TEXT_357);
2157
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2564
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2158
    stringBuffer.append(TEXT_299);
2565
    stringBuffer.append(TEXT_358);
2159
    
2566
    
2160
	}
2567
	}
2161
	if (myHelper.hasFixedChildren()){
2568
	if (myHelper.hasFixedChildren()) {
2162
2569
2163
    stringBuffer.append(TEXT_300);
2570
    stringBuffer.append(TEXT_359);
2164
    
2571
    
2165
	}
2572
	}
2573
	if (myHelper.hasBothChildrenAndCompartments()) {
2166
2574
2167
    stringBuffer.append(TEXT_301);
2575
    stringBuffer.append(TEXT_360);
2576
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2577
    stringBuffer.append(TEXT_361);
2578
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2579
    stringBuffer.append(TEXT_362);
2168
    
2580
    
2169
}
2581
	}
2582
2583
    stringBuffer.append(TEXT_363);
2584
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2585
    stringBuffer.append(TEXT_364);
2586
    
2587
	if (myHelper.hasExternalLabels()) {
2588
2589
    stringBuffer.append(TEXT_365);
2590
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2591
    stringBuffer.append(TEXT_366);
2592
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2593
    stringBuffer.append(TEXT_367);
2594
    
2595
	}
2596
	if (myHelper.hasFixedChildren()){
2597
2598
    stringBuffer.append(TEXT_368);
2599
    
2600
	}
2601
	if (myHelper.hasBothChildrenAndCompartments()) {
2602
2603
    stringBuffer.append(TEXT_369);
2604
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure"));
2605
    stringBuffer.append(TEXT_370);
2606
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2607
    stringBuffer.append(TEXT_371);
2608
    
2609
	}
2610
2611
    stringBuffer.append(TEXT_372);
2612
    
2613
}
2170
2614
2171
    
2615
    
2172
if (myHelper.hasExternalLabels()) {
2616
if (myHelper.hasExternalLabels()) {
2173
2617
2174
    stringBuffer.append(TEXT_302);
2618
    stringBuffer.append(TEXT_373);
2175
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2619
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2176
    stringBuffer.append(TEXT_303);
2620
    stringBuffer.append(TEXT_374);
2177
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2621
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2178
    stringBuffer.append(TEXT_304);
2622
    stringBuffer.append(TEXT_375);
2179
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2623
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart"));
2180
    stringBuffer.append(TEXT_305);
2624
    stringBuffer.append(TEXT_376);
2181
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2625
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2182
    stringBuffer.append(TEXT_306);
2626
    stringBuffer.append(TEXT_377);
2183
    
2627
    
2184
}
2628
}
2185
2629
2186
    stringBuffer.append(TEXT_307);
2630
    stringBuffer.append(TEXT_378);
2187
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
2631
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node"));
2188
    stringBuffer.append(TEXT_308);
2632
    stringBuffer.append(TEXT_379);
2189
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
2633
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
2190
    stringBuffer.append(TEXT_309);
2634
    stringBuffer.append(TEXT_380);
2191
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
2635
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
2192
    stringBuffer.append(TEXT_310);
2636
    stringBuffer.append(TEXT_381);
2193
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
2637
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
2194
    stringBuffer.append(TEXT_311);
2638
    stringBuffer.append(TEXT_382);
2195
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2639
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart"));
2196
    stringBuffer.append(TEXT_312);
2640
    stringBuffer.append(TEXT_383);
2197
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
2641
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
2198
    stringBuffer.append(TEXT_313);
2642
    stringBuffer.append(TEXT_384);
2199
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2643
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2200
    stringBuffer.append(TEXT_314);
2644
    stringBuffer.append(TEXT_385);
2201
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2645
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2202
    stringBuffer.append(TEXT_315);
2646
    stringBuffer.append(TEXT_386);
2203
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2647
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2204
    stringBuffer.append(TEXT_316);
2648
    stringBuffer.append(TEXT_387);
2205
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2649
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2206
    stringBuffer.append(TEXT_317);
2650
    stringBuffer.append(TEXT_388);
2207
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
2651
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
2208
    stringBuffer.append(TEXT_318);
2652
    stringBuffer.append(TEXT_389);
2209
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2653
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2210
    stringBuffer.append(TEXT_319);
2654
    stringBuffer.append(TEXT_390);
2211
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2655
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2212
    stringBuffer.append(TEXT_320);
2656
    stringBuffer.append(TEXT_391);
2213
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
2657
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
2214
    stringBuffer.append(TEXT_321);
2658
    stringBuffer.append(TEXT_392);
2215
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2659
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2216
    stringBuffer.append(TEXT_322);
2660
    stringBuffer.append(TEXT_393);
2217
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2661
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2218
    stringBuffer.append(TEXT_323);
2662
    stringBuffer.append(TEXT_394);
2219
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
2663
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart"));
2220
    stringBuffer.append(TEXT_324);
2664
    stringBuffer.append(TEXT_395);
2221
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2665
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2222
    stringBuffer.append(TEXT_325);
2666
    stringBuffer.append(TEXT_396);
2223
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2667
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor"));
2224
    stringBuffer.append(TEXT_326);
2668
    stringBuffer.append(TEXT_397);
2225
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
2669
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request"));
2226
    stringBuffer.append(TEXT_327);
2670
    stringBuffer.append(TEXT_398);
2227
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2671
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor"));
2228
    stringBuffer.append(TEXT_328);
2672
    stringBuffer.append(TEXT_399);
2229
    /*@ include file="adapters/propertySource.javajetinc"*/
2673
    /*@ include file="adapters/propertySource.javajetinc"*/
2230
    stringBuffer.append(TEXT_329);
2674
    stringBuffer.append(TEXT_400);
2675
    
2676
if (!genNode.getChildNodes().isEmpty()) {
2677
2678
    stringBuffer.append(TEXT_401);
2679
    
2680
}
2681
2231
    
2682
    
2232
if (myHelper.containsLinks()) {
2683
if (myHelper.containsLinks()) {
2233
2684
2234
    stringBuffer.append(TEXT_330);
2685
    stringBuffer.append(TEXT_402);
2235
    
2686
    
2236
}
2687
}
2237
2688
2238
    stringBuffer.append(TEXT_331);
2689
    stringBuffer.append(TEXT_403);
2239
    
2690
    
2240
if (myHelper.containsLinks()) {
2691
if (myHelper.containsLinks()) {
2241
2692
2242
    stringBuffer.append(TEXT_332);
2693
    stringBuffer.append(TEXT_404);
2243
    
2694
    
2244
}
2695
}
2245
2696
2246
    stringBuffer.append(TEXT_333);
2697
    
2698
if (!genNode.getChildNodes().isEmpty()) {
2699
2700
    stringBuffer.append(TEXT_405);
2701
    
2702
}
2703
2704
    stringBuffer.append(TEXT_406);
2247
    
2705
    
2248
{
2706
{
2249
	final String _getViewCode = "getDiagramNode()";
2707
	final String _getViewCode = "getDiagramNode()";
2250
	final String _getDiagramCode = "getDiagramNode().getDiagram()";
2708
	final String _getDiagramCode = "getDiagramNode().getDiagram()";
2251
	final boolean _includeUncontainedLinks = false;
2709
	final boolean _includeUncontainedLinks = false;
2710
	if (!genNode.getChildNodes().isEmpty()) {
2711
		final boolean isListLayout = !isXYLayout;
2712
		final List childNodes = genNode.getChildNodes();
2252
2713
2253
    stringBuffer.append(TEXT_334);
2714
    stringBuffer.append(TEXT_407);
2254
    
2715
    stringBuffer.append(TEXT_408);
2255
if (myHelper.containsLinks() || _includeUncontainedLinks) {
2716
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
2256
2717
    stringBuffer.append(TEXT_409);
2257
    stringBuffer.append(TEXT_335);
2258
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
2718
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
2259
    stringBuffer.append(TEXT_336);
2719
    stringBuffer.append(TEXT_410);
2260
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2720
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2261
    stringBuffer.append(TEXT_337);
2721
    stringBuffer.append(TEXT_411);
2262
    stringBuffer.append(_getDiagramCode);
2722
    stringBuffer.append(_getDiagramCode);
2263
    stringBuffer.append(TEXT_338);
2723
    stringBuffer.append(TEXT_412);
2264
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
2724
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
2265
    stringBuffer.append(TEXT_339);
2725
    stringBuffer.append(TEXT_413);
2266
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
2726
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
2267
    stringBuffer.append(TEXT_340);
2727
    stringBuffer.append(TEXT_414);
2268
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService"));
2728
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ChildNotationModelRefresher"));
2269
    stringBuffer.append(TEXT_341);
2729
    stringBuffer.append(TEXT_415);
2270
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher"));
2271
    stringBuffer.append(TEXT_342);
2272
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
2273
    stringBuffer.append(TEXT_343);
2274
    
2730
    
2275
	boolean hasConstraintsInContainedLinks = false;
2731
boolean hasConstraintsInChildren = false;
2276
	for (Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
2732
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
2277
		GenLink nextLink = (GenLink) it.next();
2733
	GenNode nextNode = (GenNode) it.next();
2278
		TypeModelFacet typeModelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
2734
	TypeModelFacet typeModelFacet = nextNode.getModelFacet();
2279
		if (typeModelFacet != null && typeModelFacet.getMetaClass() != null && typeModelFacet.getModelElementSelector() != null) {
2735
	if (typeModelFacet != null && typeModelFacet.getMetaClass() != null && typeModelFacet.getModelElementSelector() != null) {
2280
			hasConstraintsInContainedLinks = true;
2736
		hasConstraintsInChildren = true;
2281
			break;
2737
		break;
2282
		}
2283
	}
2738
	}
2284
	if (hasConstraintsInContainedLinks) {
2739
}
2285
2740
2286
    stringBuffer.append(TEXT_344);
2741
    
2742
if (hasConstraintsInChildren) {
2743
2744
    stringBuffer.append(TEXT_416);
2287
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
2745
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
2288
    stringBuffer.append(TEXT_345);
2746
    stringBuffer.append(TEXT_417);
2289
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2747
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2290
    stringBuffer.append(TEXT_346);
2748
    stringBuffer.append(TEXT_418);
2291
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2749
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2292
    stringBuffer.append(TEXT_347);
2750
    stringBuffer.append(TEXT_419);
2293
    
2751
    
2294
	}
2752
}
2295
	if (_includeUncontainedLinks) {
2296
2753
2297
    stringBuffer.append(TEXT_348);
2754
    stringBuffer.append(TEXT_420);
2298
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2299
    stringBuffer.append(TEXT_349);
2300
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2301
    stringBuffer.append(TEXT_350);
2302
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
2303
    stringBuffer.append(TEXT_351);
2304
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2755
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2305
    stringBuffer.append(TEXT_352);
2756
    stringBuffer.append(TEXT_421);
2306
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
2757
    
2307
    stringBuffer.append(TEXT_353);
2758
{
2759
	boolean hasDeclaredFilter = false;
2760
	Set genChildFeatures = new LinkedHashSet();
2761
	for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
2762
		GenNode nextNode = (GenNode) it.next();
2763
		TypeModelFacet typeModelFacet = nextNode.getModelFacet();
2764
		if (typeModelFacet == null) {
2765
			continue;
2766
		}
2767
		GenFeature childMetaFeature = typeModelFacet.getChildMetaFeature();
2768
		if (genChildFeatures.contains(childMetaFeature)) {
2769
			continue;
2770
		}
2771
		genChildFeatures.add(childMetaFeature);
2772
		if (!hasDeclaredFilter) {
2773
			hasDeclaredFilter = true;
2774
2775
    stringBuffer.append(TEXT_422);
2308
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2776
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2309
    stringBuffer.append(TEXT_354);
2777
    stringBuffer.append(TEXT_423);
2310
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
2311
    stringBuffer.append(TEXT_355);
2312
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2778
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2313
    stringBuffer.append(TEXT_356);
2779
    stringBuffer.append(TEXT_424);
2314
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
2780
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
2315
    stringBuffer.append(TEXT_357);
2781
    stringBuffer.append(TEXT_425);
2782
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
2783
    stringBuffer.append(TEXT_426);
2316
    
2784
    
2317
	}
2785
		} else {
2318
2786
2319
    stringBuffer.append(TEXT_358);
2787
    stringBuffer.append(TEXT_427);
2320
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2788
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2321
    stringBuffer.append(TEXT_359);
2789
    stringBuffer.append(TEXT_428);
2790
    stringBuffer.append(importManager.getImportedName(childMetaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
2791
    stringBuffer.append(TEXT_429);
2792
    stringBuffer.append(childMetaFeature.getFeatureAccessorName());
2793
    stringBuffer.append(TEXT_430);
2322
    
2794
    
2323
	{
2795
		}
2324
		boolean hasDeclaredFilter = false;
2796
	}	//for
2325
		Set genAffectingFeatures = new LinkedHashSet();
2326
		for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
2327
			GenLink nextLink = (GenLink) it.next();
2328
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
2329
			if (modelFacet == null) {
2330
				continue;
2331
			}
2332
			GenFeature _feature = modelFacet.getChildMetaFeature();
2333
2797
2334
    stringBuffer.append(TEXT_360);
2335
    
2798
    
2336
	/*
2799
	if (hasDeclaredFilter) {
2337
	 * input: 
2338
	 * 		_feature: GenFeature
2339
	 * 		genAffectingFeatures : Set
2340
	 */
2341
	if (_feature == null || genAffectingFeatures.contains(_feature)) {
2342
		continue;
2343
	}
2344
	genAffectingFeatures.add(_feature);
2345
	if (!hasDeclaredFilter) {
2346
		hasDeclaredFilter = true;
2347
2800
2348
    stringBuffer.append(TEXT_361);
2801
    stringBuffer.append(TEXT_431);
2349
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2350
    stringBuffer.append(TEXT_362);
2351
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2802
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2352
    stringBuffer.append(TEXT_363);
2803
    stringBuffer.append(TEXT_432);
2353
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2804
    stringBuffer.append(_getViewCode);
2354
    stringBuffer.append(TEXT_364);
2805
    stringBuffer.append(TEXT_433);
2355
    stringBuffer.append(_feature.getFeatureAccessorName());
2356
    stringBuffer.append(TEXT_365);
2357
    
2806
    
2358
	} else {
2807
	} else {
2808
		hasDeclaredFilter = true;
2359
2809
2360
    stringBuffer.append(TEXT_366);
2810
    stringBuffer.append(TEXT_434);
2361
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2811
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2362
    stringBuffer.append(TEXT_367);
2812
    stringBuffer.append(TEXT_435);
2363
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2813
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2364
    stringBuffer.append(TEXT_368);
2814
    stringBuffer.append(TEXT_436);
2365
    stringBuffer.append(_feature.getFeatureAccessorName());
2815
    stringBuffer.append(_getViewCode);
2366
    stringBuffer.append(TEXT_369);
2816
    stringBuffer.append(TEXT_437);
2367
    
2817
    
2368
	}
2818
	}
2369
2819
2370
    
2820
    
2371
			_feature = modelFacet.getSourceMetaFeature();
2821
	if (hasConstraintsInChildren) {
2822
		if (hasDeclaredFilter) {
2823
			hasDeclaredFilter = true;
2372
2824
2373
    stringBuffer.append(TEXT_370);
2825
    stringBuffer.append(TEXT_438);
2374
    
2826
    
2375
	/*
2827
		} else {
2376
	 * input: 
2377
	 * 		_feature: GenFeature
2378
	 * 		genAffectingFeatures : Set
2379
	 */
2380
	if (_feature == null || genAffectingFeatures.contains(_feature)) {
2381
		continue;
2382
	}
2383
	genAffectingFeatures.add(_feature);
2384
	if (!hasDeclaredFilter) {
2385
		hasDeclaredFilter = true;
2386
2828
2387
    stringBuffer.append(TEXT_371);
2829
    stringBuffer.append(TEXT_439);
2388
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2830
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2389
    stringBuffer.append(TEXT_372);
2831
    stringBuffer.append(TEXT_440);
2832
    
2833
		}
2834
	}
2835
	if (!hasDeclaredFilter) {
2836
2837
    stringBuffer.append(TEXT_441);
2390
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2838
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2391
    stringBuffer.append(TEXT_373);
2839
    stringBuffer.append(TEXT_442);
2840
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2841
    stringBuffer.append(TEXT_443);
2842
    
2843
	}
2844
2845
    stringBuffer.append(TEXT_444);
2846
    
2847
}	//local declaration of hasDeclaredFilter
2848
2849
    stringBuffer.append(TEXT_445);
2850
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
2851
    stringBuffer.append(TEXT_446);
2852
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
2853
    stringBuffer.append(TEXT_447);
2854
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2855
    stringBuffer.append(TEXT_448);
2856
    
2857
for (Iterator it = childNodes.iterator(); it.hasNext(); ) {
2858
	GenNode nextNode = (GenNode) it.next();
2859
	TypeModelFacet typeModelFacet = nextNode.getModelFacet();
2860
	if (typeModelFacet == null) {
2861
		continue;
2862
	}
2863
	String childNodeInterfaceName = importManager.getImportedName(nextNode.getDomainMetaClass().getQualifiedInterfaceName());
2864
2865
    stringBuffer.append(TEXT_449);
2866
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
2867
    stringBuffer.append(TEXT_450);
2868
    stringBuffer.append(childNodeInterfaceName);
2869
    stringBuffer.append(TEXT_451);
2870
    stringBuffer.append(nextNode.getDomainMetaClass().getName());
2871
    stringBuffer.append(nextNode.getVisualID());
2872
    stringBuffer.append(TEXT_452);
2873
    if (!isListLayout) {
2874
    stringBuffer.append(TEXT_453);
2875
    }
2876
    stringBuffer.append(TEXT_454);
2877
    
2878
}
2879
2880
    stringBuffer.append(TEXT_455);
2881
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2882
    stringBuffer.append(TEXT_456);
2883
    stringBuffer.append(TEXT_457);
2884
    
2885
if (childNodes.size() == 0) {
2886
2887
    stringBuffer.append(TEXT_458);
2888
    stringBuffer.append(importManager.getImportedName("java.util.Collections"));
2889
    stringBuffer.append(TEXT_459);
2890
    
2891
} else {
2892
2893
    stringBuffer.append(TEXT_460);
2894
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2895
    stringBuffer.append(TEXT_461);
2896
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
2897
    stringBuffer.append(TEXT_462);
2898
    
2899
	Map genFeature2genNodeMap = new LinkedHashMap();
2900
	for (int nodeIndex = 0; nodeIndex < childNodes.size(); nodeIndex++) {
2901
		GenNode nextNode = (GenNode) childNodes.get(nodeIndex);
2902
		TypeModelFacet typeModelFacet = nextNode.getModelFacet();
2903
		if (typeModelFacet == null) {
2904
			continue;
2905
		}
2906
		GenFeature childMetaFeature = typeModelFacet.getChildMetaFeature();
2907
		if (!genFeature2genNodeMap.containsKey(childMetaFeature)) {
2908
			genFeature2genNodeMap.put(childMetaFeature, new ArrayList());
2909
		}
2910
		((Collection) genFeature2genNodeMap.get(childMetaFeature)).add(nextNode);
2911
	}
2912
	Set entrySet = genFeature2genNodeMap.entrySet();
2913
	if (entrySet.size() > 0) {
2914
2915
    stringBuffer.append(TEXT_463);
2916
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2917
    stringBuffer.append(TEXT_464);
2918
    stringBuffer.append(_getViewCode);
2919
    stringBuffer.append(TEXT_465);
2920
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2921
    stringBuffer.append(TEXT_466);
2922
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2923
    stringBuffer.append(TEXT_467);
2924
    
2925
	}
2926
	for (Iterator entries = entrySet.iterator(); entries.hasNext();) {
2927
		Map.Entry nextEntry = (Map.Entry) entries.next();
2928
		GenFeature childMetaFeature = (GenFeature) nextEntry.getKey();
2929
		Collection genNodesCollection = (Collection) nextEntry.getValue();
2930
		if (childMetaFeature.isListType()) {
2931
2932
    stringBuffer.append(TEXT_468);
2933
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2934
    stringBuffer.append(TEXT_469);
2935
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, true);
2936
    stringBuffer.append(TEXT_470);
2937
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2938
    stringBuffer.append(TEXT_471);
2939
    
2940
		} else {
2941
2942
    stringBuffer.append(TEXT_472);
2943
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2944
    stringBuffer.append(TEXT_473);
2945
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", childMetaFeature, null, false);
2946
    stringBuffer.append(TEXT_474);
2947
    
2948
	}
2949
2950
    stringBuffer.append(TEXT_475);
2951
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2952
    stringBuffer.append(TEXT_476);
2953
    
2954
	boolean generateSwitch = genNodesCollection.size() != 1;
2955
	if (generateSwitch) {
2956
2957
    stringBuffer.append(TEXT_477);
2958
    
2959
	}
2960
	for (Iterator genNodesIterator = genNodesCollection.iterator(); genNodesIterator.hasNext();) {
2961
		GenNode nextNode = (GenNode) genNodesIterator.next();
2962
		if (generateSwitch) {
2963
2964
    stringBuffer.append(TEXT_478);
2965
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
2966
    stringBuffer.append(TEXT_479);
2967
    
2968
		} else {
2969
2970
    stringBuffer.append(TEXT_480);
2971
    stringBuffer.append(importManager.getImportedName(nextNode.getEditPartQualifiedClassName()));
2972
    stringBuffer.append(TEXT_481);
2973
    
2974
		}
2975
2976
    stringBuffer.append(TEXT_482);
2977
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
2978
    stringBuffer.append(TEXT_483);
2979
    
2980
		if (generateSwitch) {
2981
2982
    stringBuffer.append(TEXT_484);
2983
    
2984
		} else {
2985
2986
    stringBuffer.append(TEXT_485);
2987
    
2988
		}
2989
	}
2990
	if (generateSwitch) {
2991
2992
    stringBuffer.append(TEXT_486);
2993
    
2994
	}
2995
	if (childMetaFeature.isListType()) {
2996
2997
    stringBuffer.append(TEXT_487);
2998
    
2999
	}
3000
}
3001
3002
    stringBuffer.append(TEXT_488);
3003
    
3004
}
3005
3006
    stringBuffer.append(TEXT_489);
3007
    stringBuffer.append(genDiagram.isSynchronized());
3008
    stringBuffer.append(TEXT_490);
3009
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
3010
    stringBuffer.append(TEXT_491);
3011
    stringBuffer.append(genDiagram.isSynchronized());
3012
    stringBuffer.append(TEXT_492);
3013
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3014
    stringBuffer.append(TEXT_493);
3015
    stringBuffer.append(_getViewCode);
3016
    stringBuffer.append(TEXT_494);
3017
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
3018
    stringBuffer.append(TEXT_495);
3019
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3020
    stringBuffer.append(TEXT_496);
3021
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3022
    stringBuffer.append(TEXT_497);
3023
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
3024
    stringBuffer.append(TEXT_498);
3025
    stringBuffer.append(_getDiagramCode);
3026
    stringBuffer.append(TEXT_499);
3027
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
3028
    stringBuffer.append(TEXT_500);
3029
    
3030
	}
3031
3032
    stringBuffer.append(TEXT_501);
3033
    
3034
if (myHelper.containsLinks() || _includeUncontainedLinks) {
3035
3036
    stringBuffer.append(TEXT_502);
3037
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3038
    stringBuffer.append(TEXT_503);
3039
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
3040
    stringBuffer.append(TEXT_504);
3041
    stringBuffer.append(_getDiagramCode);
3042
    stringBuffer.append(TEXT_505);
3043
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
3044
    stringBuffer.append(TEXT_506);
3045
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
3046
    stringBuffer.append(TEXT_507);
3047
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.EditPartRegistryBasedViewService"));
3048
    stringBuffer.append(TEXT_508);
3049
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.OwnedLinksNotationModelRefresher"));
3050
    stringBuffer.append(TEXT_509);
3051
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.IViewService"));
3052
    stringBuffer.append(TEXT_510);
3053
    
3054
	boolean hasConstraintsInContainedLinks = false;
3055
	for (Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
3056
		GenLink nextLink = (GenLink) it.next();
3057
		TypeModelFacet typeModelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
3058
		if (typeModelFacet != null && typeModelFacet.getMetaClass() != null && typeModelFacet.getModelElementSelector() != null) {
3059
			hasConstraintsInContainedLinks = true;
3060
			break;
3061
		}
3062
	}
3063
	if (hasConstraintsInContainedLinks) {
3064
3065
    stringBuffer.append(TEXT_511);
3066
    stringBuffer.append(genDiagram.getVisualIDRegistryQualifiedClassName());
3067
    stringBuffer.append(TEXT_512);
3068
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3069
    stringBuffer.append(TEXT_513);
3070
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3071
    stringBuffer.append(TEXT_514);
3072
    
3073
	}
3074
	if (_includeUncontainedLinks) {
3075
3076
    stringBuffer.append(TEXT_515);
3077
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3078
    stringBuffer.append(TEXT_516);
3079
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3080
    stringBuffer.append(TEXT_517);
3081
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
3082
    stringBuffer.append(TEXT_518);
3083
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3084
    stringBuffer.append(TEXT_519);
3085
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
3086
    stringBuffer.append(TEXT_520);
3087
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3088
    stringBuffer.append(TEXT_521);
3089
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
3090
    stringBuffer.append(TEXT_522);
3091
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3092
    stringBuffer.append(TEXT_523);
3093
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
3094
    stringBuffer.append(TEXT_524);
3095
    
3096
	}
3097
3098
    stringBuffer.append(TEXT_525);
3099
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3100
    stringBuffer.append(TEXT_526);
3101
    
3102
	{
3103
		boolean hasDeclaredFilter = false;
3104
		Set genAffectingFeatures = new LinkedHashSet();
3105
		for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
3106
			GenLink nextLink = (GenLink) it.next();
3107
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
3108
			if (modelFacet == null) {
3109
				continue;
3110
			}
3111
			GenFeature _feature = modelFacet.getChildMetaFeature();
3112
3113
    stringBuffer.append(TEXT_527);
3114
    
3115
	/*
3116
	 * input: 
3117
	 * 		_feature: GenFeature
3118
	 * 		genAffectingFeatures : Set
3119
	 */
3120
	if (_feature == null || genAffectingFeatures.contains(_feature)) {
3121
		continue;
3122
	}
3123
	genAffectingFeatures.add(_feature);
3124
	if (!hasDeclaredFilter) {
3125
		hasDeclaredFilter = true;
3126
3127
    stringBuffer.append(TEXT_528);
3128
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3129
    stringBuffer.append(TEXT_529);
3130
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3131
    stringBuffer.append(TEXT_530);
2392
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3132
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2393
    stringBuffer.append(TEXT_374);
3133
    stringBuffer.append(TEXT_531);
2394
    stringBuffer.append(_feature.getFeatureAccessorName());
3134
    stringBuffer.append(_feature.getFeatureAccessorName());
2395
    stringBuffer.append(TEXT_375);
3135
    stringBuffer.append(TEXT_532);
2396
    
3136
    
2397
	} else {
3137
	} else {
2398
3138
2399
    stringBuffer.append(TEXT_376);
3139
    stringBuffer.append(TEXT_533);
2400
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3140
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2401
    stringBuffer.append(TEXT_377);
3141
    stringBuffer.append(TEXT_534);
2402
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3142
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2403
    stringBuffer.append(TEXT_378);
3143
    stringBuffer.append(TEXT_535);
2404
    stringBuffer.append(_feature.getFeatureAccessorName());
3144
    stringBuffer.append(_feature.getFeatureAccessorName());
2405
    stringBuffer.append(TEXT_379);
3145
    stringBuffer.append(TEXT_536);
3146
    
3147
	}
3148
3149
    
3150
			_feature = modelFacet.getSourceMetaFeature();
3151
3152
    stringBuffer.append(TEXT_537);
3153
    
3154
	/*
3155
	 * input: 
3156
	 * 		_feature: GenFeature
3157
	 * 		genAffectingFeatures : Set
3158
	 */
3159
	if (_feature == null || genAffectingFeatures.contains(_feature)) {
3160
		continue;
3161
	}
3162
	genAffectingFeatures.add(_feature);
3163
	if (!hasDeclaredFilter) {
3164
		hasDeclaredFilter = true;
3165
3166
    stringBuffer.append(TEXT_538);
3167
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3168
    stringBuffer.append(TEXT_539);
3169
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3170
    stringBuffer.append(TEXT_540);
3171
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3172
    stringBuffer.append(TEXT_541);
3173
    stringBuffer.append(_feature.getFeatureAccessorName());
3174
    stringBuffer.append(TEXT_542);
3175
    
3176
	} else {
3177
3178
    stringBuffer.append(TEXT_543);
3179
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3180
    stringBuffer.append(TEXT_544);
3181
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3182
    stringBuffer.append(TEXT_545);
3183
    stringBuffer.append(_feature.getFeatureAccessorName());
3184
    stringBuffer.append(TEXT_546);
2406
    
3185
    
2407
	}
3186
	}
2408
3187
2409
    
3188
    
2410
			_feature = modelFacet.getTargetMetaFeature();
3189
			_feature = modelFacet.getTargetMetaFeature();
2411
3190
2412
    stringBuffer.append(TEXT_380);
3191
    stringBuffer.append(TEXT_547);
2413
    
3192
    
2414
	/*
3193
	/*
2415
	 * input: 
3194
	 * input: 
Lines 2423-2447 Link Here
2423
	if (!hasDeclaredFilter) {
3202
	if (!hasDeclaredFilter) {
2424
		hasDeclaredFilter = true;
3203
		hasDeclaredFilter = true;
2425
3204
2426
    stringBuffer.append(TEXT_381);
3205
    stringBuffer.append(TEXT_548);
2427
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3206
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2428
    stringBuffer.append(TEXT_382);
3207
    stringBuffer.append(TEXT_549);
2429
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3208
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2430
    stringBuffer.append(TEXT_383);
3209
    stringBuffer.append(TEXT_550);
2431
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3210
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2432
    stringBuffer.append(TEXT_384);
3211
    stringBuffer.append(TEXT_551);
2433
    stringBuffer.append(_feature.getFeatureAccessorName());
3212
    stringBuffer.append(_feature.getFeatureAccessorName());
2434
    stringBuffer.append(TEXT_385);
3213
    stringBuffer.append(TEXT_552);
2435
    
3214
    
2436
	} else {
3215
	} else {
2437
3216
2438
    stringBuffer.append(TEXT_386);
3217
    stringBuffer.append(TEXT_553);
2439
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3218
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2440
    stringBuffer.append(TEXT_387);
3219
    stringBuffer.append(TEXT_554);
2441
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3220
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2442
    stringBuffer.append(TEXT_388);
3221
    stringBuffer.append(TEXT_555);
2443
    stringBuffer.append(_feature.getFeatureAccessorName());
3222
    stringBuffer.append(_feature.getFeatureAccessorName());
2444
    stringBuffer.append(TEXT_389);
3223
    stringBuffer.append(TEXT_556);
2445
    
3224
    
2446
	}
3225
	}
2447
3226
Lines 2451-2457 Link Here
2451
			GenLink nextLink = (GenLink) it.next();
3230
			GenLink nextLink = (GenLink) it.next();
2452
			GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature();
3231
			GenFeature _feature = ((FeatureModelFacet) nextLink.getModelFacet()).getMetaFeature();
2453
3232
2454
    stringBuffer.append(TEXT_390);
3233
    stringBuffer.append(TEXT_557);
2455
    
3234
    
2456
	/*
3235
	/*
2457
	 * input: 
3236
	 * input: 
Lines 2465-2489 Link Here
2465
	if (!hasDeclaredFilter) {
3244
	if (!hasDeclaredFilter) {
2466
		hasDeclaredFilter = true;
3245
		hasDeclaredFilter = true;
2467
3246
2468
    stringBuffer.append(TEXT_391);
3247
    stringBuffer.append(TEXT_558);
2469
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3248
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2470
    stringBuffer.append(TEXT_392);
3249
    stringBuffer.append(TEXT_559);
2471
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3250
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2472
    stringBuffer.append(TEXT_393);
3251
    stringBuffer.append(TEXT_560);
2473
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3252
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2474
    stringBuffer.append(TEXT_394);
3253
    stringBuffer.append(TEXT_561);
2475
    stringBuffer.append(_feature.getFeatureAccessorName());
3254
    stringBuffer.append(_feature.getFeatureAccessorName());
2476
    stringBuffer.append(TEXT_395);
3255
    stringBuffer.append(TEXT_562);
2477
    
3256
    
2478
	} else {
3257
	} else {
2479
3258
2480
    stringBuffer.append(TEXT_396);
3259
    stringBuffer.append(TEXT_563);
2481
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3260
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2482
    stringBuffer.append(TEXT_397);
3261
    stringBuffer.append(TEXT_564);
2483
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3262
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
2484
    stringBuffer.append(TEXT_398);
3263
    stringBuffer.append(TEXT_565);
2485
    stringBuffer.append(_feature.getFeatureAccessorName());
3264
    stringBuffer.append(_feature.getFeatureAccessorName());
2486
    stringBuffer.append(TEXT_399);
3265
    stringBuffer.append(TEXT_566);
2487
    
3266
    
2488
	}
3267
	}
2489
3268
Lines 2492-2550 Link Here
2492
		if (hasConstraintsInContainedLinks) {
3271
		if (hasConstraintsInContainedLinks) {
2493
			if (hasDeclaredFilter) {
3272
			if (hasDeclaredFilter) {
2494
3273
2495
    stringBuffer.append(TEXT_400);
3274
    stringBuffer.append(TEXT_567);
2496
    
3275
    
2497
			} else {
3276
			} else {
2498
				hasDeclaredFilter = true;
3277
				hasDeclaredFilter = true;
2499
3278
2500
    stringBuffer.append(TEXT_401);
3279
    stringBuffer.append(TEXT_568);
2501
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3280
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2502
    stringBuffer.append(TEXT_402);
3281
    stringBuffer.append(TEXT_569);
2503
    
3282
    
2504
			}
3283
			}
2505
		}
3284
		}
2506
		if (_includeUncontainedLinks) {
3285
		if (_includeUncontainedLinks) {
2507
			if (hasDeclaredFilter) {
3286
			if (hasDeclaredFilter) {
2508
3287
2509
    stringBuffer.append(TEXT_403);
3288
    stringBuffer.append(TEXT_570);
2510
    
3289
    
2511
			} else {
3290
			} else {
2512
				hasDeclaredFilter = true;
3291
				hasDeclaredFilter = true;
2513
3292
2514
    stringBuffer.append(TEXT_404);
3293
    stringBuffer.append(TEXT_571);
2515
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3294
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2516
    stringBuffer.append(TEXT_405);
3295
    stringBuffer.append(TEXT_572);
2517
    
3296
    
2518
			}
3297
			}
2519
		}
3298
		}
2520
		if (!hasDeclaredFilter) {
3299
		if (!hasDeclaredFilter) {
2521
3300
2522
    stringBuffer.append(TEXT_406);
3301
    stringBuffer.append(TEXT_573);
2523
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3302
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2524
    stringBuffer.append(TEXT_407);
3303
    stringBuffer.append(TEXT_574);
2525
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
3304
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.NotificationFilter"));
2526
    stringBuffer.append(TEXT_408);
3305
    stringBuffer.append(TEXT_575);
2527
    
3306
    
2528
		}
3307
		}
2529
	}	//local declaration of hasDeclaredFilter
3308
	}	//local declaration of hasDeclaredFilter
2530
3309
2531
    stringBuffer.append(TEXT_409);
3310
    stringBuffer.append(TEXT_576);
2532
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
3311
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand"));
2533
    stringBuffer.append(TEXT_410);
3312
    stringBuffer.append(TEXT_577);
2534
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
3313
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
2535
    stringBuffer.append(TEXT_411);
3314
    stringBuffer.append(TEXT_578);
2536
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
3315
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
2537
    stringBuffer.append(TEXT_412);
3316
    stringBuffer.append(TEXT_579);
2538
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
3317
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
2539
    stringBuffer.append(TEXT_413);
3318
    stringBuffer.append(TEXT_580);
2540
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3319
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2541
    stringBuffer.append(TEXT_414);
3320
    stringBuffer.append(TEXT_581);
2542
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3321
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2543
    stringBuffer.append(TEXT_415);
3322
    stringBuffer.append(TEXT_582);
2544
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3323
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
2545
    stringBuffer.append(TEXT_416);
3324
    stringBuffer.append(TEXT_583);
2546
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
3325
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
2547
    stringBuffer.append(TEXT_417);
3326
    stringBuffer.append(TEXT_584);
2548
    
3327
    
2549
	for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
3328
	for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
2550
		GenLink nextLink = (GenLink) it.next();
3329
		GenLink nextLink = (GenLink) it.next();
Lines 2553-2589 Link Here
2553
			continue;
3332
			continue;
2554
		}
3333
		}
2555
3334
2556
    stringBuffer.append(TEXT_418);
3335
    stringBuffer.append(TEXT_585);
2557
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3336
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2558
    stringBuffer.append(TEXT_419);
3337
    stringBuffer.append(TEXT_586);
2559
    stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName()));
3338
    stringBuffer.append(importManager.getImportedName(modelFacet.getMetaClass().getQualifiedInterfaceName()));
2560
    stringBuffer.append(TEXT_420);
3339
    stringBuffer.append(TEXT_587);
2561
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
3340
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
2562
    stringBuffer.append(TEXT_421);
3341
    stringBuffer.append(TEXT_588);
2563
    
3342
    
2564
	}
3343
	}
2565
	for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
3344
	for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
2566
		GenLink nextLink = (GenLink) it.next();
3345
		GenLink nextLink = (GenLink) it.next();
2567
3346
2568
    stringBuffer.append(TEXT_422);
3347
    stringBuffer.append(TEXT_589);
2569
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3348
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2570
    stringBuffer.append(TEXT_423);
3349
    stringBuffer.append(TEXT_590);
2571
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
3350
    stringBuffer.append(importManager.getImportedName(nextLink.getNotationViewFactoryQualifiedClassName()));
2572
    stringBuffer.append(TEXT_424);
3351
    stringBuffer.append(TEXT_591);
2573
    
3352
    
2574
	}
3353
	}
2575
3354
2576
    stringBuffer.append(TEXT_425);
3355
    stringBuffer.append(TEXT_592);
2577
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand"));
3356
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalEdgeCommand"));
2578
    stringBuffer.append(TEXT_426);
3357
    stringBuffer.append(TEXT_593);
2579
    stringBuffer.append(importManager.getImportedName("java.util.List"));
3358
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2580
    stringBuffer.append(TEXT_427);
3359
    stringBuffer.append(TEXT_594);
2581
    stringBuffer.append(TEXT_428);
3360
    stringBuffer.append(TEXT_595);
2582
    stringBuffer.append(TEXT_429);
3361
    stringBuffer.append(TEXT_596);
2583
    stringBuffer.append(importManager.getImportedName("java.util.List"));
3362
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2584
    stringBuffer.append(TEXT_430);
3363
    stringBuffer.append(TEXT_597);
2585
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
3364
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
2586
    stringBuffer.append(TEXT_431);
3365
    stringBuffer.append(TEXT_598);
2587
    
3366
    
2588
Map genFeature2genLinkMap = new LinkedHashMap();
3367
Map genFeature2genLinkMap = new LinkedHashMap();
2589
for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
3368
for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
Lines 2606-2623 Link Here
2606
}
3385
}
2607
if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) {
3386
if (!genFeature2genLinkMap.isEmpty() || !genFeature2featureGenLinkMap.isEmpty()) {
2608
3387
2609
    stringBuffer.append(TEXT_432);
3388
    stringBuffer.append(TEXT_599);
2610
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3389
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2611
    stringBuffer.append(TEXT_433);
3390
    stringBuffer.append(TEXT_600);
2612
    stringBuffer.append(_getViewCode);
3391
    stringBuffer.append(_getViewCode);
2613
    stringBuffer.append(TEXT_434);
3392
    stringBuffer.append(TEXT_601);
2614
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3393
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2615
    stringBuffer.append(TEXT_435);
3394
    stringBuffer.append(TEXT_602);
2616
    
3395
    
2617
}
3396
}
2618
if (!genFeature2genLinkMap.isEmpty()) {
3397
if (!genFeature2genLinkMap.isEmpty()) {
2619
3398
2620
    stringBuffer.append(TEXT_436);
3399
    stringBuffer.append(TEXT_603);
2621
    
3400
    
2622
}
3401
}
2623
for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) {
3402
for (Iterator entries = genFeature2genLinkMap.entrySet().iterator(); entries.hasNext();) {
Lines 2626-2657 Link Here
2626
	Collection genLinksCollection = (Collection) nextEntry.getValue();
3405
	Collection genLinksCollection = (Collection) nextEntry.getValue();
2627
	if (metaFeature.isListType()) {
3406
	if (metaFeature.isListType()) {
2628
3407
2629
    stringBuffer.append(TEXT_437);
3408
    stringBuffer.append(TEXT_604);
2630
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
3409
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2631
    stringBuffer.append(TEXT_438);
3410
    stringBuffer.append(TEXT_605);
2632
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
3411
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
2633
    stringBuffer.append(TEXT_439);
3412
    stringBuffer.append(TEXT_606);
2634
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3413
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2635
    stringBuffer.append(TEXT_440);
3414
    stringBuffer.append(TEXT_607);
2636
    
3415
    
2637
	} else {
3416
	} else {
2638
3417
2639
    stringBuffer.append(TEXT_441);
3418
    stringBuffer.append(TEXT_608);
2640
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3419
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2641
    stringBuffer.append(TEXT_442);
3420
    stringBuffer.append(TEXT_609);
2642
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
3421
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
2643
    stringBuffer.append(TEXT_443);
3422
    stringBuffer.append(TEXT_610);
2644
    
3423
    
2645
	}
3424
	}
2646
3425
2647
    stringBuffer.append(TEXT_444);
3426
    stringBuffer.append(TEXT_611);
2648
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
3427
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2649
    stringBuffer.append(TEXT_445);
3428
    stringBuffer.append(TEXT_612);
2650
    
3429
    
2651
	boolean generateSwitch = genLinksCollection.size() != 1;
3430
	boolean generateSwitch = genLinksCollection.size() != 1;
2652
	if (generateSwitch) {
3431
	if (generateSwitch) {
2653
3432
2654
    stringBuffer.append(TEXT_446);
3433
    stringBuffer.append(TEXT_613);
2655
    
3434
    
2656
	}
3435
	}
2657
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
3436
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
Lines 2659-2725 Link Here
2659
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
3438
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) nextLink.getModelFacet();
2660
		if (generateSwitch) {
3439
		if (generateSwitch) {
2661
3440
2662
    stringBuffer.append(TEXT_447);
3441
    stringBuffer.append(TEXT_614);
2663
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3442
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2664
    stringBuffer.append(TEXT_448);
3443
    stringBuffer.append(TEXT_615);
2665
    
3444
    
2666
		} else {
3445
		} else {
2667
3446
2668
    stringBuffer.append(TEXT_449);
3447
    stringBuffer.append(TEXT_616);
2669
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3448
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2670
    stringBuffer.append(TEXT_450);
3449
    stringBuffer.append(TEXT_617);
2671
    
3450
    
2672
		}
3451
		}
2673
		if (modelFacet.getSourceMetaFeature() != null) {
3452
		if (modelFacet.getSourceMetaFeature() != null) {
2674
3453
2675
    stringBuffer.append(TEXT_451);
3454
    stringBuffer.append(TEXT_618);
2676
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3455
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2677
    stringBuffer.append(TEXT_452);
3456
    stringBuffer.append(TEXT_619);
2678
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3457
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2679
    stringBuffer.append(TEXT_453);
3458
    stringBuffer.append(TEXT_620);
2680
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false);
3459
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getSourceMetaFeature(), null, false);
2681
    stringBuffer.append(TEXT_454);
3460
    stringBuffer.append(TEXT_621);
2682
    
3461
    
2683
		} else {
3462
		} else {
2684
3463
2685
    stringBuffer.append(TEXT_455);
3464
    stringBuffer.append(TEXT_622);
2686
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3465
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2687
    stringBuffer.append(TEXT_456);
3466
    stringBuffer.append(TEXT_623);
2688
    stringBuffer.append(_getViewCode);
3467
    stringBuffer.append(_getViewCode);
2689
    stringBuffer.append(TEXT_457);
3468
    stringBuffer.append(TEXT_624);
2690
    
3469
    
2691
		}
3470
		}
2692
		if (modelFacet.getTargetMetaFeature() != null) {
3471
		if (modelFacet.getTargetMetaFeature() != null) {
2693
3472
2694
    stringBuffer.append(TEXT_458);
3473
    stringBuffer.append(TEXT_625);
2695
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3474
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2696
    stringBuffer.append(TEXT_459);
3475
    stringBuffer.append(TEXT_626);
2697
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3476
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2698
    stringBuffer.append(TEXT_460);
3477
    stringBuffer.append(TEXT_627);
2699
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false);
3478
    myFeatureGetAccessorHelper.appendFeatureValueGetter("nextValue", modelFacet.getTargetMetaFeature(), null, false);
2700
    stringBuffer.append(TEXT_461);
3479
    stringBuffer.append(TEXT_628);
2701
    
3480
    
2702
		} else {
3481
		} else {
2703
3482
2704
    stringBuffer.append(TEXT_462);
3483
    stringBuffer.append(TEXT_629);
2705
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3484
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2706
    stringBuffer.append(TEXT_463);
3485
    stringBuffer.append(TEXT_630);
2707
    stringBuffer.append(_getViewCode);
3486
    stringBuffer.append(_getViewCode);
2708
    stringBuffer.append(TEXT_464);
3487
    stringBuffer.append(TEXT_631);
2709
    
3488
    
2710
		}
3489
		}
2711
3490
2712
    stringBuffer.append(TEXT_465);
3491
    stringBuffer.append(TEXT_632);
2713
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
3492
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
2714
    stringBuffer.append(TEXT_466);
3493
    stringBuffer.append(TEXT_633);
2715
    
3494
    
2716
		if (generateSwitch) {
3495
		if (generateSwitch) {
2717
3496
2718
    stringBuffer.append(TEXT_467);
3497
    stringBuffer.append(TEXT_634);
2719
    
3498
    
2720
		} else {
3499
		} else {
2721
3500
2722
    stringBuffer.append(TEXT_468);
3501
    stringBuffer.append(TEXT_635);
2723
    
3502
    
2724
		}
3503
		}
2725
3504
Lines 2727-2738 Link Here
2727
	}	//iterate over genLinksCollection
3506
	}	//iterate over genLinksCollection
2728
	if (generateSwitch) {
3507
	if (generateSwitch) {
2729
3508
2730
    stringBuffer.append(TEXT_469);
3509
    stringBuffer.append(TEXT_636);
2731
    
3510
    
2732
	}
3511
	}
2733
	if (metaFeature.isListType()) {
3512
	if (metaFeature.isListType()) {
2734
3513
2735
    stringBuffer.append(TEXT_470);
3514
    stringBuffer.append(TEXT_637);
2736
    
3515
    
2737
	}
3516
	}
2738
}
3517
}
Lines 2742-2917 Link Here
2742
	Collection genLinksCollection = (Collection) nextEntry.getValue();
3521
	Collection genLinksCollection = (Collection) nextEntry.getValue();
2743
	if (metaFeature.isListType()) {
3522
	if (metaFeature.isListType()) {
2744
3523
2745
    stringBuffer.append(TEXT_471);
3524
    stringBuffer.append(TEXT_638);
2746
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
3525
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2747
    stringBuffer.append(TEXT_472);
3526
    stringBuffer.append(TEXT_639);
2748
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
3527
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, true);
2749
    stringBuffer.append(TEXT_473);
3528
    stringBuffer.append(TEXT_640);
2750
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3529
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2751
    stringBuffer.append(TEXT_474);
3530
    stringBuffer.append(TEXT_641);
2752
    
3531
    
2753
	} else {
3532
	} else {
2754
3533
2755
    stringBuffer.append(TEXT_475);
3534
    stringBuffer.append(TEXT_642);
2756
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3535
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
2757
    stringBuffer.append(TEXT_476);
3536
    stringBuffer.append(TEXT_643);
2758
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
3537
    myFeatureGetAccessorHelper.appendFeatureValueGetter("modelObject", metaFeature, null, false);
2759
    stringBuffer.append(TEXT_477);
3538
    stringBuffer.append(TEXT_644);
2760
    
3539
    
2761
	}
3540
	}
2762
3541
2763
    stringBuffer.append(TEXT_478);
3542
    stringBuffer.append(TEXT_645);
2764
    
3543
    
2765
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
3544
	for (Iterator genLinksIterator = genLinksCollection.iterator(); genLinksIterator.hasNext(); ) {
2766
		GenLink nextLink = (GenLink) genLinksIterator.next();
3545
		GenLink nextLink = (GenLink) genLinksIterator.next();
2767
3546
2768
    stringBuffer.append(TEXT_479);
3547
    stringBuffer.append(TEXT_646);
2769
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
3548
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.LinkDescriptor"));
2770
    stringBuffer.append(TEXT_480);
3549
    stringBuffer.append(TEXT_647);
2771
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3550
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2772
    stringBuffer.append(TEXT_481);
3551
    stringBuffer.append(TEXT_648);
2773
    
3552
    
2774
	}
3553
	}
2775
3554
2776
    stringBuffer.append(TEXT_482);
3555
    stringBuffer.append(TEXT_649);
2777
    
3556
    
2778
	if (metaFeature.isListType()) {
3557
	if (metaFeature.isListType()) {
2779
3558
2780
    stringBuffer.append(TEXT_483);
3559
    stringBuffer.append(TEXT_650);
2781
    
3560
    
2782
	}
3561
	}
2783
}
3562
}
2784
3563
2785
    stringBuffer.append(TEXT_484);
3564
    stringBuffer.append(TEXT_651);
2786
    stringBuffer.append(importManager.getImportedName("java.util.List"));
3565
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2787
    stringBuffer.append(TEXT_485);
3566
    stringBuffer.append(TEXT_652);
2788
    stringBuffer.append(importManager.getImportedName("java.util.List"));
3567
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2789
    stringBuffer.append(TEXT_486);
3568
    stringBuffer.append(TEXT_653);
2790
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
3569
    stringBuffer.append(importManager.getImportedName("java.util.LinkedList"));
2791
    stringBuffer.append(TEXT_487);
3570
    stringBuffer.append(TEXT_654);
2792
    stringBuffer.append(importManager.getImportedName("java.util.List"));
3571
    stringBuffer.append(importManager.getImportedName("java.util.List"));
2793
    stringBuffer.append(TEXT_488);
3572
    stringBuffer.append(TEXT_655);
2794
    stringBuffer.append(_getDiagramCode);
3573
    stringBuffer.append(_getDiagramCode);
2795
    stringBuffer.append(TEXT_489);
3574
    stringBuffer.append(TEXT_656);
2796
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
3575
    stringBuffer.append(importManager.getImportedName("java.util.Iterator"));
2797
    stringBuffer.append(TEXT_490);
3576
    stringBuffer.append(TEXT_657);
2798
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3577
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
2799
    stringBuffer.append(TEXT_491);
3578
    stringBuffer.append(TEXT_658);
2800
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3579
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
2801
    stringBuffer.append(TEXT_492);
3580
    stringBuffer.append(TEXT_659);
2802
    
3581
    
2803
	if (_includeUncontainedLinks) {
3582
	if (_includeUncontainedLinks) {
2804
3583
2805
    stringBuffer.append(TEXT_493);
3584
    stringBuffer.append(TEXT_660);
2806
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3585
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2807
    stringBuffer.append(TEXT_494);
3586
    stringBuffer.append(TEXT_661);
2808
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3587
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2809
    stringBuffer.append(TEXT_495);
3588
    stringBuffer.append(TEXT_662);
2810
    
3589
    
2811
	}
3590
	}
2812
	if (myHelper.containsFeatureModelFacetLinks()) {
3591
	if (myHelper.containsFeatureModelFacetLinks()) {
2813
3592
2814
    stringBuffer.append(TEXT_496);
3593
    stringBuffer.append(TEXT_663);
2815
    stringBuffer.append(_getViewCode);
3594
    stringBuffer.append(_getViewCode);
2816
    stringBuffer.append(TEXT_497);
3595
    stringBuffer.append(TEXT_664);
2817
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
3596
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2818
    stringBuffer.append(TEXT_498);
3597
    stringBuffer.append(TEXT_665);
2819
    
3598
    
2820
		for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
3599
		for(Iterator it = myHelper.getContainedFeatureModelFacetLinks(); it.hasNext(); ) {
2821
			GenLink nextLink = (GenLink) it.next();
3600
			GenLink nextLink = (GenLink) it.next();
2822
3601
2823
    stringBuffer.append(TEXT_499);
3602
    stringBuffer.append(TEXT_666);
2824
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3603
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2825
    stringBuffer.append(TEXT_500);
3604
    stringBuffer.append(TEXT_667);
2826
    
3605
    
2827
		}
3606
		}
2828
3607
2829
    stringBuffer.append(TEXT_501);
3608
    stringBuffer.append(TEXT_668);
2830
    
3609
    
2831
		if (myHelper.containsTypeModelFacetLinks()) {
3610
		if (myHelper.containsTypeModelFacetLinks()) {
2832
3611
2833
    stringBuffer.append(TEXT_502);
3612
    stringBuffer.append(TEXT_669);
2834
    
3613
    
2835
		} else {
3614
		} else {
2836
3615
2837
    stringBuffer.append(TEXT_503);
3616
    stringBuffer.append(TEXT_670);
2838
    
3617
    
2839
		}
3618
		}
2840
	}
3619
	}
2841
	if (myHelper.containsTypeModelFacetLinks()) {
3620
	if (myHelper.containsTypeModelFacetLinks()) {
2842
		if (!myHelper.containsFeatureModelFacetLinks()) {
3621
		if (!myHelper.containsFeatureModelFacetLinks()) {
2843
3622
2844
    stringBuffer.append(TEXT_504);
3623
    stringBuffer.append(TEXT_671);
2845
    
3624
    
2846
		}
3625
		}
2847
3626
2848
    stringBuffer.append(TEXT_505);
3627
    stringBuffer.append(TEXT_672);
2849
    stringBuffer.append(_getViewCode);
3628
    stringBuffer.append(_getViewCode);
2850
    stringBuffer.append(TEXT_506);
3629
    stringBuffer.append(TEXT_673);
2851
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
3630
    stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName()));
2852
    stringBuffer.append(TEXT_507);
3631
    stringBuffer.append(TEXT_674);
2853
    
3632
    
2854
		for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
3633
		for(Iterator it = myHelper.getContainedTypeModelFacetLinks(); it.hasNext(); ) {
2855
			GenLink nextLink = (GenLink) it.next();
3634
			GenLink nextLink = (GenLink) it.next();
2856
3635
2857
    stringBuffer.append(TEXT_508);
3636
    stringBuffer.append(TEXT_675);
2858
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
3637
    stringBuffer.append(importManager.getImportedName(nextLink.getEditPartQualifiedClassName()));
2859
    stringBuffer.append(TEXT_509);
3638
    stringBuffer.append(TEXT_676);
2860
    
3639
    
2861
		}
3640
		}
2862
3641
2863
    stringBuffer.append(TEXT_510);
3642
    stringBuffer.append(TEXT_677);
2864
    
3643
    
2865
	}
3644
	}
2866
3645
2867
    stringBuffer.append(TEXT_511);
3646
    stringBuffer.append(TEXT_678);
2868
    stringBuffer.append(genDiagram.isSynchronized());
3647
    stringBuffer.append(genDiagram.isSynchronized());
2869
    stringBuffer.append(TEXT_512);
3648
    stringBuffer.append(TEXT_679);
2870
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
3649
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.ElementDescriptor"));
2871
    stringBuffer.append(TEXT_513);
3650
    stringBuffer.append(TEXT_680);
2872
    stringBuffer.append(genDiagram.isSynchronized());
3651
    stringBuffer.append(genDiagram.isSynchronized());
2873
    stringBuffer.append(TEXT_514);
3652
    stringBuffer.append(TEXT_681);
2874
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3653
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
2875
    stringBuffer.append(TEXT_515);
3654
    stringBuffer.append(TEXT_682);
2876
    stringBuffer.append(_getViewCode);
3655
    stringBuffer.append(_getViewCode);
2877
    stringBuffer.append(TEXT_516);
3656
    stringBuffer.append(TEXT_683);
2878
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
3657
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.canonical.AbstractNotationModelRefresher"));
2879
    stringBuffer.append(TEXT_517);
3658
    stringBuffer.append(TEXT_684);
2880
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3659
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
2881
    stringBuffer.append(TEXT_518);
3660
    stringBuffer.append(TEXT_685);
2882
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3661
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
2883
    stringBuffer.append(TEXT_519);
3662
    stringBuffer.append(TEXT_686);
2884
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
3663
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
2885
    stringBuffer.append(TEXT_520);
3664
    stringBuffer.append(TEXT_687);
2886
    stringBuffer.append(_getDiagramCode);
3665
    stringBuffer.append(_getDiagramCode);
2887
    stringBuffer.append(TEXT_521);
3666
    stringBuffer.append(TEXT_688);
2888
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
3667
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
2889
    stringBuffer.append(TEXT_522);
3668
    stringBuffer.append(TEXT_689);
2890
    
3669
    
2891
}
3670
}
2892
3671
2893
    
3672
    
2894
}	//end of local declarations
3673
}	//end of local declarations
2895
3674
2896
    stringBuffer.append(TEXT_523);
3675
    stringBuffer.append(TEXT_690);
2897
    stringBuffer.append(TEXT_524);
3676
    stringBuffer.append(TEXT_691);
2898
    stringBuffer.append(TEXT_525);
3677
    stringBuffer.append(TEXT_692);
2899
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
3678
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
2900
    stringBuffer.append(TEXT_526);
3679
    stringBuffer.append(TEXT_693);
2901
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
3680
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.edit.parts.update.RefreshAdapter"));
2902
    stringBuffer.append(TEXT_527);
3681
    stringBuffer.append(TEXT_694);
2903
    stringBuffer.append(TEXT_528);
3682
    stringBuffer.append(TEXT_695);
2904
    stringBuffer.append(TEXT_529);
3683
    stringBuffer.append(TEXT_696);
2905
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
3684
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
2906
    stringBuffer.append(TEXT_530);
3685
    stringBuffer.append(TEXT_697);
2907
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
3686
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
2908
    stringBuffer.append(TEXT_531);
3687
    stringBuffer.append(TEXT_698);
2909
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
3688
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
2910
    stringBuffer.append(TEXT_532);
3689
    stringBuffer.append(TEXT_699);
2911
    
3690
    
2912
	final String primaryView = "getDiagramNode()";
3691
	final String primaryView = "getDiagramNode()";
2913
3692
2914
    stringBuffer.append(TEXT_533);
3693
    stringBuffer.append(TEXT_700);
2915
    
3694
    
2916
boolean isFixedFontSetInFigure;
3695
boolean isFixedFontSetInFigure;
2917
{
3696
{
Lines 2919-3056 Link Here
2919
	isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont();
3698
	isFixedFontSetInFigure = styleAttributes != null && styleAttributes.isFixedFont();
2920
}
3699
}
2921
3700
2922
    stringBuffer.append(TEXT_534);
3701
    stringBuffer.append(TEXT_701);
2923
    
3702
    
2924
if (!isFixedFontSetInFigure) {
3703
if (!isFixedFontSetInFigure) {
2925
3704
2926
    stringBuffer.append(TEXT_535);
3705
    stringBuffer.append(TEXT_702);
2927
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
3706
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
2928
    stringBuffer.append(TEXT_536);
3707
    stringBuffer.append(TEXT_703);
2929
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
3708
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle"));
2930
    stringBuffer.append(TEXT_537);
3709
    stringBuffer.append(TEXT_704);
2931
    stringBuffer.append(primaryView);
3710
    stringBuffer.append(primaryView);
2932
    stringBuffer.append(TEXT_538);
3711
    stringBuffer.append(TEXT_705);
2933
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3712
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
2934
    stringBuffer.append(TEXT_539);
3713
    stringBuffer.append(TEXT_706);
2935
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
3714
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
2936
    stringBuffer.append(TEXT_540);
3715
    stringBuffer.append(TEXT_707);
2937
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
3716
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
2938
    stringBuffer.append(TEXT_541);
3717
    stringBuffer.append(TEXT_708);
2939
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
3718
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
2940
    stringBuffer.append(TEXT_542);
3719
    stringBuffer.append(TEXT_709);
2941
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
3720
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT"));
2942
    stringBuffer.append(TEXT_543);
3721
    stringBuffer.append(TEXT_710);
2943
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
3722
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
2944
    stringBuffer.append(TEXT_544);
3723
    stringBuffer.append(TEXT_711);
2945
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
3724
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData"));
2946
    stringBuffer.append(TEXT_545);
3725
    stringBuffer.append(TEXT_712);
2947
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
3726
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
2948
    stringBuffer.append(TEXT_546);
3727
    stringBuffer.append(TEXT_713);
2949
    
3728
    
2950
}
3729
}
2951
3730
2952
    stringBuffer.append(TEXT_547);
3731
    stringBuffer.append(TEXT_714);
2953
    
3732
    
2954
if (!isFixedFontSetInFigure) {
3733
if (!isFixedFontSetInFigure) {
2955
3734
2956
    stringBuffer.append(TEXT_548);
3735
    stringBuffer.append(TEXT_715);
2957
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
3736
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font"));
2958
    stringBuffer.append(TEXT_549);
3737
    stringBuffer.append(TEXT_716);
2959
    
3738
    
2960
}
3739
}
2961
3740
2962
    stringBuffer.append(TEXT_550);
3741
    stringBuffer.append(TEXT_717);
2963
    stringBuffer.append(TEXT_551);
3742
    stringBuffer.append(TEXT_718);
2964
    stringBuffer.append(TEXT_552);
3743
    stringBuffer.append(TEXT_719);
2965
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle"));
3744
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle"));
2966
    stringBuffer.append(TEXT_553);
3745
    stringBuffer.append(TEXT_720);
2967
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle"));
3746
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle"));
2968
    stringBuffer.append(TEXT_554);
3747
    stringBuffer.append(TEXT_721);
2969
    stringBuffer.append(primaryView);
3748
    stringBuffer.append(primaryView);
2970
    stringBuffer.append(TEXT_555);
3749
    stringBuffer.append(TEXT_722);
2971
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3750
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
2972
    stringBuffer.append(TEXT_556);
3751
    stringBuffer.append(TEXT_723);
2973
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3752
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2974
    stringBuffer.append(TEXT_557);
3753
    stringBuffer.append(TEXT_724);
2975
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3754
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2976
    stringBuffer.append(TEXT_558);
3755
    stringBuffer.append(TEXT_725);
2977
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3756
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2978
    stringBuffer.append(TEXT_559);
3757
    stringBuffer.append(TEXT_726);
2979
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3758
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2980
    stringBuffer.append(TEXT_560);
3759
    stringBuffer.append(TEXT_727);
2981
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle"));
3760
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle"));
2982
    stringBuffer.append(TEXT_561);
3761
    stringBuffer.append(TEXT_728);
2983
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle"));
3762
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle"));
2984
    stringBuffer.append(TEXT_562);
3763
    stringBuffer.append(TEXT_729);
2985
    stringBuffer.append(primaryView);
3764
    stringBuffer.append(primaryView);
2986
    stringBuffer.append(TEXT_563);
3765
    stringBuffer.append(TEXT_730);
2987
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3766
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
2988
    stringBuffer.append(TEXT_564);
3767
    stringBuffer.append(TEXT_731);
2989
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3768
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2990
    stringBuffer.append(TEXT_565);
3769
    stringBuffer.append(TEXT_732);
2991
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3770
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2992
    stringBuffer.append(TEXT_566);
3771
    stringBuffer.append(TEXT_733);
2993
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3772
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2994
    stringBuffer.append(TEXT_567);
3773
    stringBuffer.append(TEXT_734);
2995
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
3774
    stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color"));
2996
    stringBuffer.append(TEXT_568);
3775
    stringBuffer.append(TEXT_735);
2997
    stringBuffer.append(TEXT_569);
3776
    stringBuffer.append(TEXT_736);
2998
    stringBuffer.append(TEXT_570);
3777
    stringBuffer.append(TEXT_737);
2999
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
3778
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
3000
    stringBuffer.append(TEXT_571);
3779
    stringBuffer.append(TEXT_738);
3001
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
3780
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature"));
3002
    stringBuffer.append(TEXT_572);
3781
    stringBuffer.append(TEXT_739);
3003
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
3782
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification"));
3004
    stringBuffer.append(TEXT_573);
3783
    stringBuffer.append(TEXT_740);
3005
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
3784
    stringBuffer.append(importManager.getImportedName("java.util.HashMap"));
3006
    stringBuffer.append(TEXT_574);
3785
    stringBuffer.append(TEXT_741);
3007
    stringBuffer.append(TEXT_575);
3786
    stringBuffer.append(TEXT_742);
3008
    stringBuffer.append(TEXT_576);
3787
    stringBuffer.append(TEXT_743);
3009
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3788
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3010
    stringBuffer.append(TEXT_577);
3789
    stringBuffer.append(TEXT_744);
3011
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3790
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3012
    stringBuffer.append(TEXT_578);
3791
    stringBuffer.append(TEXT_745);
3013
    stringBuffer.append(TEXT_579);
3792
    stringBuffer.append(TEXT_746);
3014
    stringBuffer.append(TEXT_580);
3793
    stringBuffer.append(TEXT_747);
3015
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3794
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3016
    stringBuffer.append(TEXT_581);
3795
    stringBuffer.append(TEXT_748);
3017
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3796
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3018
    stringBuffer.append(TEXT_582);
3797
    stringBuffer.append(TEXT_749);
3019
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3798
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3020
    stringBuffer.append(TEXT_583);
3799
    stringBuffer.append(TEXT_750);
3021
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3800
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3022
    stringBuffer.append(TEXT_584);
3801
    stringBuffer.append(TEXT_751);
3023
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3802
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3024
    stringBuffer.append(TEXT_585);
3803
    stringBuffer.append(TEXT_752);
3025
    stringBuffer.append(TEXT_586);
3804
    stringBuffer.append(TEXT_753);
3026
    stringBuffer.append(TEXT_587);
3805
    stringBuffer.append(TEXT_754);
3027
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3806
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3028
    stringBuffer.append(TEXT_588);
3807
    stringBuffer.append(TEXT_755);
3029
    stringBuffer.append(TEXT_589);
3808
    stringBuffer.append(TEXT_756);
3030
    stringBuffer.append(TEXT_590);
3809
    stringBuffer.append(TEXT_757);
3031
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3810
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3032
    stringBuffer.append(TEXT_591);
3811
    stringBuffer.append(TEXT_758);
3033
    stringBuffer.append(TEXT_592);
3812
    stringBuffer.append(TEXT_759);
3034
    stringBuffer.append(TEXT_593);
3813
    stringBuffer.append(TEXT_760);
3035
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3814
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3036
    stringBuffer.append(TEXT_594);
3815
    stringBuffer.append(TEXT_761);
3037
    stringBuffer.append(TEXT_595);
3816
    stringBuffer.append(TEXT_762);
3038
    stringBuffer.append(TEXT_596);
3817
    stringBuffer.append(TEXT_763);
3039
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3818
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3040
    stringBuffer.append(TEXT_597);
3819
    stringBuffer.append(TEXT_764);
3041
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3820
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3042
    stringBuffer.append(TEXT_598);
3821
    stringBuffer.append(TEXT_765);
3043
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3822
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3044
    stringBuffer.append(TEXT_599);
3823
    stringBuffer.append(TEXT_766);
3045
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3824
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3046
    stringBuffer.append(TEXT_600);
3825
    stringBuffer.append(TEXT_767);
3047
    stringBuffer.append(TEXT_601);
3826
    stringBuffer.append(TEXT_768);
3048
    stringBuffer.append(TEXT_602);
3827
    stringBuffer.append(TEXT_769);
3049
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3828
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3050
    stringBuffer.append(TEXT_603);
3829
    stringBuffer.append(TEXT_770);
3051
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3830
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"));
3052
    stringBuffer.append(TEXT_604);
3831
    stringBuffer.append(TEXT_771);
3832
    
3833
for(Iterator it = genNode.getChildNodes().iterator(); it.hasNext(); ) {
3834
	GenChildNode next = (GenChildNode)it.next();
3835
	boolean isStatic = true;
3836
	boolean isListLayout = !isXYLayout;
3837
	String resolvedSemanticElement = "parent.getElement()";
3838
3839
    stringBuffer.append(TEXT_772);
3840
    stringBuffer.append(TEXT_773);
3841
    if (isStatic) {
3842
    stringBuffer.append(TEXT_774);
3843
    }
3844
    stringBuffer.append(TEXT_775);
3845
    stringBuffer.append(next.getDomainMetaClass().getName());
3846
    stringBuffer.append(next.getVisualID());
3847
    stringBuffer.append(TEXT_776);
3848
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand"));
3849
    stringBuffer.append(TEXT_777);
3850
    stringBuffer.append(next.getDomainMetaClass().getName());
3851
    stringBuffer.append(next.getVisualID());
3852
    stringBuffer.append(TEXT_778);
3853
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3854
    stringBuffer.append(TEXT_779);
3855
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3856
    stringBuffer.append(TEXT_780);
3857
    if (!isListLayout) {
3858
    stringBuffer.append(TEXT_781);
3859
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
3860
    stringBuffer.append(TEXT_782);
3861
    }
3862
    stringBuffer.append(TEXT_783);
3863
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
3864
    stringBuffer.append(TEXT_784);
3865
    stringBuffer.append(importManager.getImportedName(next.getNotationViewFactoryQualifiedClassName()));
3866
    stringBuffer.append(TEXT_785);
3867
    
3868
	if (!isListLayout) {
3869
3870
    stringBuffer.append(TEXT_786);
3871
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds"));
3872
    stringBuffer.append(TEXT_787);
3873
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
3874
    stringBuffer.append(TEXT_788);
3875
    
3876
		int defaultWidth = 40;
3877
		int defaultHeight = 40;
3878
		DefaultSizeAttributes defSizeAttrs = (DefaultSizeAttributes) next.getViewmap().find(DefaultSizeAttributes.class);
3879
		if (defSizeAttrs != null) {
3880
			defaultWidth = defSizeAttrs.getWidth();
3881
			defaultHeight = defSizeAttrs.getHeight();
3882
		}
3883
3884
    stringBuffer.append(TEXT_789);
3885
    stringBuffer.append(defaultWidth);
3886
    stringBuffer.append(TEXT_790);
3887
    stringBuffer.append(defaultHeight);
3888
    stringBuffer.append(TEXT_791);
3889
    
3890
	}
3891
3892
    stringBuffer.append(TEXT_792);
3893
    
3894
if (genDiagram.getPalette() != null) {
3895
3896
    stringBuffer.append(TEXT_793);
3897
    if (isStatic) {
3898
    stringBuffer.append(TEXT_794);
3899
    }
3900
    stringBuffer.append(TEXT_795);
3901
    stringBuffer.append(next.getDomainMetaClass().getName());
3902
    stringBuffer.append(next.getVisualID());
3903
    stringBuffer.append(TEXT_796);
3904
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
3905
    stringBuffer.append(TEXT_797);
3906
    stringBuffer.append(next.getDomainMetaClass().getName());
3907
    stringBuffer.append(next.getVisualID());
3908
    stringBuffer.append(TEXT_798);
3909
    stringBuffer.append(next.getDomainMetaClass().getName());
3910
    stringBuffer.append(next.getVisualID());
3911
    stringBuffer.append(TEXT_799);
3912
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3913
    stringBuffer.append(TEXT_800);
3914
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateRequestEx"));
3915
    stringBuffer.append(TEXT_801);
3916
    if (!isListLayout) {
3917
    stringBuffer.append(TEXT_802);
3918
    stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle"));
3919
    stringBuffer.append(TEXT_803);
3920
    }
3921
    stringBuffer.append(TEXT_804);
3922
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3923
    stringBuffer.append(TEXT_805);
3924
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
3925
    stringBuffer.append(TEXT_806);
3926
    
3927
	if (next.getDomainMetaClass().isMapEntry()) {
3928
	/*Workaround for Ecore example: map entries cannot be created using factory, only using reflective EFactory.create() method*/
3929
3930
    stringBuffer.append(TEXT_807);
3931
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3932
    stringBuffer.append(TEXT_808);
3933
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
3934
    stringBuffer.append(TEXT_809);
3935
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedPackageInterfaceName()));
3936
    stringBuffer.append(TEXT_810);
3937
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
3938
    stringBuffer.append(TEXT_811);
3939
    
3940
	} else {
3941
3942
    stringBuffer.append(TEXT_812);
3943
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getQualifiedInterfaceName()));
3944
    stringBuffer.append(TEXT_813);
3945
    stringBuffer.append(importManager.getImportedName(next.getDomainMetaClass().getGenPackage().getQualifiedFactoryInterfaceName()));
3946
    stringBuffer.append(TEXT_814);
3947
    stringBuffer.append(next.getDomainMetaClass().getClassifierAccessorName());
3948
    stringBuffer.append(TEXT_815);
3949
    
3950
	}
3951
3952
    stringBuffer.append(TEXT_816);
3953
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
3954
    stringBuffer.append(TEXT_817);
3955
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
3956
    stringBuffer.append(TEXT_818);
3957
    stringBuffer.append(next.getUniqueIdentifier());
3958
    stringBuffer.append(TEXT_819);
3959
    if (next.getDomainMetaClass().isExternalInterface()) {
3960
    stringBuffer.append(TEXT_820);
3961
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3962
    stringBuffer.append(TEXT_821);
3963
    }
3964
    stringBuffer.append(TEXT_822);
3965
    
3966
	TypeModelFacet facet = next.getModelFacet();
3967
	GenFeature childFeature = facet.getChildMetaFeature();
3968
	GenFeature containmentFeature = facet.getContainmentMetaFeature();
3969
	if (childFeature != null && childFeature != containmentFeature && !childFeature.isDerived()) {
3970
3971
    stringBuffer.append(TEXT_823);
3972
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
3973
    stringBuffer.append(TEXT_824);
3974
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
3975
    stringBuffer.append(TEXT_825);
3976
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
3977
    stringBuffer.append(TEXT_826);
3978
    stringBuffer.append(resolvedSemanticElement);
3979
    stringBuffer.append(TEXT_827);
3980
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3981
    stringBuffer.append(TEXT_828);
3982
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
3983
    stringBuffer.append(TEXT_829);
3984
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
3985
    stringBuffer.append(TEXT_830);
3986
    stringBuffer.append(resolvedSemanticElement);
3987
    stringBuffer.append(TEXT_831);
3988
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3989
    stringBuffer.append(TEXT_832);
3990
    stringBuffer.append(childFeature.getFeatureAccessorName());
3991
    stringBuffer.append(TEXT_833);
3992
    
3993
	} else {
3994
3995
    stringBuffer.append(TEXT_834);
3996
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
3997
    stringBuffer.append(TEXT_835);
3998
    stringBuffer.append(resolvedSemanticElement);
3999
    stringBuffer.append(TEXT_836);
4000
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4001
    stringBuffer.append(TEXT_837);
4002
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
4003
    stringBuffer.append(TEXT_838);
4004
    
4005
	}
4006
4007
    stringBuffer.append(TEXT_839);
4008
    stringBuffer.append(next.getDomainMetaClass().getName());
4009
    stringBuffer.append(next.getVisualID());
4010
    stringBuffer.append(TEXT_840);
4011
    if (next.getDomainMetaClass().isExternalInterface()) {
4012
    stringBuffer.append(TEXT_841);
4013
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4014
    stringBuffer.append(TEXT_842);
4015
    }
4016
    stringBuffer.append(TEXT_843);
4017
    if(!isListLayout) {
4018
    stringBuffer.append(TEXT_844);
4019
    }
4020
    stringBuffer.append(TEXT_845);
4021
    
4022
}
4023
3053
    
4024
    
4025
}
3054
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
4026
for(Iterator it = genDiagram.getLinks().iterator(); it.hasNext(); ) {
3055
	GenLink genLink = (GenLink)it.next();
4027
	GenLink genLink = (GenLink)it.next();
3056
	if (!genLink.isViewDirectionAlignedWithModel() || genLink.getModelFacet() == null) {
4028
	if (!genLink.isViewDirectionAlignedWithModel() || genLink.getModelFacet() == null) {
Lines 3077-3155 Link Here
3077
	}
4049
	}
3078
	GenLinkConstraints linkConstraints = genLink.getCreationConstraints();
4050
	GenLinkConstraints linkConstraints = genLink.getCreationConstraints();
3079
4051
3080
    stringBuffer.append(TEXT_605);
4052
    stringBuffer.append(TEXT_846);
3081
    stringBuffer.append(reconnectCommandNameInfix);
4053
    stringBuffer.append(reconnectCommandNameInfix);
3082
    stringBuffer.append(genLink.getVisualID());
4054
    stringBuffer.append(genLink.getVisualID());
3083
    stringBuffer.append(TEXT_606);
4055
    stringBuffer.append(TEXT_847);
3084
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4056
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
3085
    stringBuffer.append(TEXT_607);
4057
    stringBuffer.append(TEXT_848);
3086
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4058
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3087
    stringBuffer.append(TEXT_608);
4059
    stringBuffer.append(TEXT_849);
3088
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4060
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3089
    stringBuffer.append(TEXT_609);
4061
    stringBuffer.append(TEXT_850);
3090
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4062
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3091
    stringBuffer.append(TEXT_610);
4063
    stringBuffer.append(TEXT_851);
3092
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4064
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3093
    stringBuffer.append(TEXT_611);
4065
    stringBuffer.append(TEXT_852);
3094
    stringBuffer.append(reconnectCommandNameInfix);
4066
    stringBuffer.append(reconnectCommandNameInfix);
3095
    stringBuffer.append(genLink.getVisualID());
4067
    stringBuffer.append(genLink.getVisualID());
3096
    stringBuffer.append(TEXT_612);
4068
    stringBuffer.append(TEXT_853);
3097
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
4069
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
3098
    stringBuffer.append(TEXT_613);
4070
    stringBuffer.append(TEXT_854);
3099
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4071
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3100
    stringBuffer.append(TEXT_614);
4072
    stringBuffer.append(TEXT_855);
3101
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4073
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3102
    stringBuffer.append(TEXT_615);
4074
    stringBuffer.append(TEXT_856);
3103
    stringBuffer.append(reconnectCommandNameInfix);
4075
    stringBuffer.append(reconnectCommandNameInfix);
3104
    stringBuffer.append(genLink.getVisualID());
4076
    stringBuffer.append(genLink.getVisualID());
3105
    stringBuffer.append(TEXT_616);
4077
    stringBuffer.append(TEXT_857);
3106
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4078
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3107
    stringBuffer.append(TEXT_617);
4079
    stringBuffer.append(TEXT_858);
3108
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4080
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3109
    stringBuffer.append(TEXT_618);
4081
    stringBuffer.append(TEXT_859);
3110
    
4082
    
3111
	if (linkConstraints != null) {
4083
	if (linkConstraints != null) {
3112
4084
3113
    stringBuffer.append(TEXT_619);
4085
    stringBuffer.append(TEXT_860);
3114
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4086
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3115
    stringBuffer.append(TEXT_620);
4087
    stringBuffer.append(TEXT_861);
3116
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
4088
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
3117
    stringBuffer.append(TEXT_621);
4089
    stringBuffer.append(TEXT_862);
3118
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4090
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3119
    stringBuffer.append(TEXT_622);
4091
    stringBuffer.append(TEXT_863);
3120
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4092
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
3121
    stringBuffer.append(TEXT_623);
4093
    stringBuffer.append(TEXT_864);
3122
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4094
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3123
    stringBuffer.append(TEXT_624);
4095
    stringBuffer.append(TEXT_865);
3124
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
4096
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
3125
    stringBuffer.append(TEXT_625);
4097
    stringBuffer.append(TEXT_866);
3126
    
4098
    
3127
	} else {
4099
	} else {
3128
4100
3129
    stringBuffer.append(TEXT_626);
4101
    stringBuffer.append(TEXT_867);
3130
    
4102
    
3131
	}
4103
	}
3132
4104
3133
    stringBuffer.append(TEXT_627);
4105
    stringBuffer.append(TEXT_868);
3134
    
4106
    
3135
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4107
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
3136
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4108
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
3137
			GenFeature containmentFeature = modelFacet.getContainmentMetaFeature();
4109
			GenFeature containmentFeature = modelFacet.getContainmentMetaFeature();
3138
			if (containmentFeature == null) {
4110
			if (containmentFeature == null) {
3139
4111
3140
    stringBuffer.append(TEXT_628);
4112
    stringBuffer.append(TEXT_869);
3141
    
4113
    
3142
			} else {
4114
			} else {
3143
4115
3144
    stringBuffer.append(TEXT_629);
4116
    stringBuffer.append(TEXT_870);
3145
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
4117
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
3146
    stringBuffer.append(TEXT_630);
4118
    stringBuffer.append(TEXT_871);
3147
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
4119
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
3148
    stringBuffer.append(TEXT_631);
4120
    stringBuffer.append(TEXT_872);
3149
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
4121
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
3150
    stringBuffer.append(TEXT_632);
4122
    stringBuffer.append(TEXT_873);
3151
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
4123
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
3152
    stringBuffer.append(TEXT_633);
4124
    stringBuffer.append(TEXT_874);
3153
    
4125
    
3154
				{
4126
				{
3155
					GenFeature _feature = containmentFeature;
4127
					GenFeature _feature = containmentFeature;
Lines 3157-3185 Link Here
3157
					String _exceedsUpperBound = "return false;";
4129
					String _exceedsUpperBound = "return false;";
3158
					GenClass _ownerGenClass = containmentFeature.getGenClass();
4130
					GenClass _ownerGenClass = containmentFeature.getGenClass();
3159
4131
3160
    stringBuffer.append(TEXT_634);
4132
    stringBuffer.append(TEXT_875);
3161
    
4133
    
3162
int upperBound = _feature.getEcoreFeature().getUpperBound();
4134
int upperBound = _feature.getEcoreFeature().getUpperBound();
3163
if (upperBound > 0) {
4135
if (upperBound > 0) {
3164
	if (upperBound == 1) {
4136
	if (upperBound == 1) {
3165
4137
3166
    stringBuffer.append(TEXT_635);
4138
    stringBuffer.append(TEXT_876);
3167
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4139
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
3168
    stringBuffer.append(TEXT_636);
4140
    stringBuffer.append(TEXT_877);
3169
    stringBuffer.append(_exceedsUpperBound);
4141
    stringBuffer.append(_exceedsUpperBound);
3170
    stringBuffer.append(TEXT_637);
4142
    stringBuffer.append(TEXT_878);
3171
    
4143
    
3172
	} else {
4144
	} else {
3173
4145
3174
    stringBuffer.append(TEXT_638);
4146
    stringBuffer.append(TEXT_879);
3175
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4147
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
3176
    stringBuffer.append(TEXT_639);
4148
    stringBuffer.append(TEXT_880);
3177
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4149
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3178
    stringBuffer.append(TEXT_640);
4150
    stringBuffer.append(TEXT_881);
3179
    stringBuffer.append(_feature.getFeatureAccessorName());
4151
    stringBuffer.append(_feature.getFeatureAccessorName());
3180
    stringBuffer.append(TEXT_641);
4152
    stringBuffer.append(TEXT_882);
3181
    stringBuffer.append(_exceedsUpperBound);
4153
    stringBuffer.append(_exceedsUpperBound);
3182
    stringBuffer.append(TEXT_642);
4154
    stringBuffer.append(TEXT_883);
3183
    
4155
    
3184
	}
4156
	}
3185
}
4157
}
Lines 3194-3222 Link Here
3194
						String _exceedsUpperBound = "return false;";
4166
						String _exceedsUpperBound = "return false;";
3195
						GenClass _ownerGenClass = containmentFeature.getGenClass();
4167
						GenClass _ownerGenClass = containmentFeature.getGenClass();
3196
4168
3197
    stringBuffer.append(TEXT_643);
4169
    stringBuffer.append(TEXT_884);
3198
    
4170
    
3199
int upperBound = _feature.getEcoreFeature().getUpperBound();
4171
int upperBound = _feature.getEcoreFeature().getUpperBound();
3200
if (upperBound > 0) {
4172
if (upperBound > 0) {
3201
	if (upperBound == 1) {
4173
	if (upperBound == 1) {
3202
4174
3203
    stringBuffer.append(TEXT_644);
4175
    stringBuffer.append(TEXT_885);
3204
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4176
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
3205
    stringBuffer.append(TEXT_645);
4177
    stringBuffer.append(TEXT_886);
3206
    stringBuffer.append(_exceedsUpperBound);
4178
    stringBuffer.append(_exceedsUpperBound);
3207
    stringBuffer.append(TEXT_646);
4179
    stringBuffer.append(TEXT_887);
3208
    
4180
    
3209
	} else {
4181
	} else {
3210
4182
3211
    stringBuffer.append(TEXT_647);
4183
    stringBuffer.append(TEXT_888);
3212
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4184
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
3213
    stringBuffer.append(TEXT_648);
4185
    stringBuffer.append(TEXT_889);
3214
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4186
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3215
    stringBuffer.append(TEXT_649);
4187
    stringBuffer.append(TEXT_890);
3216
    stringBuffer.append(_feature.getFeatureAccessorName());
4188
    stringBuffer.append(_feature.getFeatureAccessorName());
3217
    stringBuffer.append(TEXT_650);
4189
    stringBuffer.append(TEXT_891);
3218
    stringBuffer.append(_exceedsUpperBound);
4190
    stringBuffer.append(_exceedsUpperBound);
3219
    stringBuffer.append(TEXT_651);
4191
    stringBuffer.append(TEXT_892);
3220
    
4192
    
3221
	}
4193
	}
3222
}
4194
}
Lines 3230-3253 Link Here
3230
	String _source = "newSource.getElement()";
4202
	String _source = "newSource.getElement()";
3231
	String _target = "edge.getTarget().getElement()";
4203
	String _target = "edge.getTarget().getElement()";
3232
4204
3233
    stringBuffer.append(TEXT_652);
4205
    stringBuffer.append(TEXT_893);
3234
    
4206
    
3235
			if (linkConstraints != null) {
4207
			if (linkConstraints != null) {
3236
4208
3237
    stringBuffer.append(TEXT_653);
4209
    stringBuffer.append(TEXT_894);
3238
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4210
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
3239
    stringBuffer.append(TEXT_654);
4211
    stringBuffer.append(TEXT_895);
3240
    stringBuffer.append(_source);
4212
    stringBuffer.append(_source);
3241
    stringBuffer.append(TEXT_655);
4213
    stringBuffer.append(TEXT_896);
3242
    stringBuffer.append(_target);
4214
    stringBuffer.append(_target);
3243
    stringBuffer.append(TEXT_656);
4215
    stringBuffer.append(TEXT_897);
3244
    
4216
    
3245
			}
4217
			}
3246
4218
3247
    
4219
    
3248
}	//local declarations for linkConstraints.jetinc
4220
}	//local declarations for linkConstraints.jetinc
3249
4221
3250
    stringBuffer.append(TEXT_657);
4222
    stringBuffer.append(TEXT_898);
3251
    
4223
    
3252
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4224
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
3253
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
4225
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
Lines 3257-3285 Link Here
3257
				String _exceedsUpperBound = "return false;";
4229
				String _exceedsUpperBound = "return false;";
3258
				GenClass _ownerGenClass = null;
4230
				GenClass _ownerGenClass = null;
3259
4231
3260
    stringBuffer.append(TEXT_658);
4232
    stringBuffer.append(TEXT_899);
3261
    
4233
    
3262
int upperBound = _feature.getEcoreFeature().getUpperBound();
4234
int upperBound = _feature.getEcoreFeature().getUpperBound();
3263
if (upperBound > 0) {
4235
if (upperBound > 0) {
3264
	if (upperBound == 1) {
4236
	if (upperBound == 1) {
3265
4237
3266
    stringBuffer.append(TEXT_659);
4238
    stringBuffer.append(TEXT_900);
3267
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4239
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
3268
    stringBuffer.append(TEXT_660);
4240
    stringBuffer.append(TEXT_901);
3269
    stringBuffer.append(_exceedsUpperBound);
4241
    stringBuffer.append(_exceedsUpperBound);
3270
    stringBuffer.append(TEXT_661);
4242
    stringBuffer.append(TEXT_902);
3271
    
4243
    
3272
	} else {
4244
	} else {
3273
4245
3274
    stringBuffer.append(TEXT_662);
4246
    stringBuffer.append(TEXT_903);
3275
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4247
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
3276
    stringBuffer.append(TEXT_663);
4248
    stringBuffer.append(TEXT_904);
3277
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4249
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3278
    stringBuffer.append(TEXT_664);
4250
    stringBuffer.append(TEXT_905);
3279
    stringBuffer.append(_feature.getFeatureAccessorName());
4251
    stringBuffer.append(_feature.getFeatureAccessorName());
3280
    stringBuffer.append(TEXT_665);
4252
    stringBuffer.append(TEXT_906);
3281
    stringBuffer.append(_exceedsUpperBound);
4253
    stringBuffer.append(_exceedsUpperBound);
3282
    stringBuffer.append(TEXT_666);
4254
    stringBuffer.append(TEXT_907);
3283
    
4255
    
3284
	}
4256
	}
3285
}
4257
}
Lines 3290-3333 Link Here
3290
	String _source = "newSource.getElement()";
4262
	String _source = "newSource.getElement()";
3291
	String _target = "edge.getTarget().getElement()";
4263
	String _target = "edge.getTarget().getElement()";
3292
4264
3293
    stringBuffer.append(TEXT_667);
4265
    stringBuffer.append(TEXT_908);
3294
    
4266
    
3295
			if (linkConstraints != null) {
4267
			if (linkConstraints != null) {
3296
4268
3297
    stringBuffer.append(TEXT_668);
4269
    stringBuffer.append(TEXT_909);
3298
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4270
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
3299
    stringBuffer.append(TEXT_669);
4271
    stringBuffer.append(TEXT_910);
3300
    stringBuffer.append(_source);
4272
    stringBuffer.append(_source);
3301
    stringBuffer.append(TEXT_670);
4273
    stringBuffer.append(TEXT_911);
3302
    stringBuffer.append(_target);
4274
    stringBuffer.append(_target);
3303
    stringBuffer.append(TEXT_671);
4275
    stringBuffer.append(TEXT_912);
3304
    
4276
    
3305
			}
4277
			}
3306
4278
3307
    
4279
    
3308
}	//local declarations for linkConstraints.jetinc
4280
}	//local declarations for linkConstraints.jetinc
3309
4281
3310
    stringBuffer.append(TEXT_672);
4282
    stringBuffer.append(TEXT_913);
3311
    
4283
    
3312
		} else {
4284
		} else {
3313
4285
3314
    stringBuffer.append(TEXT_673);
4286
    stringBuffer.append(TEXT_914);
3315
    
4287
    
3316
		}
4288
		}
3317
4289
3318
    stringBuffer.append(TEXT_674);
4290
    stringBuffer.append(TEXT_915);
3319
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4291
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3320
    stringBuffer.append(TEXT_675);
4292
    stringBuffer.append(TEXT_916);
3321
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4293
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3322
    stringBuffer.append(TEXT_676);
4294
    stringBuffer.append(TEXT_917);
3323
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
4295
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
3324
    stringBuffer.append(TEXT_677);
4296
    stringBuffer.append(TEXT_918);
3325
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4297
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
3326
    stringBuffer.append(TEXT_678);
4298
    stringBuffer.append(TEXT_919);
3327
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4299
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
3328
    stringBuffer.append(TEXT_679);
4300
    stringBuffer.append(TEXT_920);
3329
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeSourceCommand"));
4301
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeSourceCommand"));
3330
    stringBuffer.append(TEXT_680);
4302
    stringBuffer.append(TEXT_921);
3331
    
4303
    
3332
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4304
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
3333
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4305
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
Lines 3346-3455 Link Here
3346
			}
4318
			}
3347
			if (containmentFeature != null || setChild) {
4319
			if (containmentFeature != null || setChild) {
3348
4320
3349
    stringBuffer.append(TEXT_681);
4321
    stringBuffer.append(TEXT_922);
3350
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4322
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3351
    stringBuffer.append(TEXT_682);
4323
    stringBuffer.append(TEXT_923);
3352
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
4324
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
3353
    stringBuffer.append(TEXT_683);
4325
    stringBuffer.append(TEXT_924);
3354
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
4326
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
3355
    stringBuffer.append(TEXT_684);
4327
    stringBuffer.append(TEXT_925);
3356
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
4328
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
3357
    stringBuffer.append(TEXT_685);
4329
    stringBuffer.append(TEXT_926);
3358
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4330
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3359
    stringBuffer.append(TEXT_686);
4331
    stringBuffer.append(TEXT_927);
3360
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
4332
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
3361
    stringBuffer.append(TEXT_687);
4333
    stringBuffer.append(TEXT_928);
3362
    
4334
    
3363
			}
4335
			}
3364
			if (containmentFeature != null) {
4336
			if (containmentFeature != null) {
3365
				if (containmentFeature.getEcoreFeature().isMany()) {
4337
				if (containmentFeature.getEcoreFeature().isMany()) {
3366
4338
3367
    stringBuffer.append(TEXT_688);
4339
    stringBuffer.append(TEXT_929);
3368
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4340
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3369
    stringBuffer.append(TEXT_689);
4341
    stringBuffer.append(TEXT_930);
3370
    
4342
    
3371
				} else {
4343
				} else {
3372
4344
3373
    stringBuffer.append(TEXT_690);
4345
    stringBuffer.append(TEXT_931);
3374
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4346
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3375
    stringBuffer.append(TEXT_691);
4347
    stringBuffer.append(TEXT_932);
3376
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4348
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3377
    stringBuffer.append(TEXT_692);
4349
    stringBuffer.append(TEXT_933);
3378
    
4350
    
3379
				}
4351
				}
3380
4352
3381
    stringBuffer.append(TEXT_693);
4353
    stringBuffer.append(TEXT_934);
3382
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4354
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
3383
    stringBuffer.append(TEXT_694);
4355
    stringBuffer.append(TEXT_935);
3384
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4356
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3385
    stringBuffer.append(TEXT_695);
4357
    stringBuffer.append(TEXT_936);
3386
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
4358
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
3387
    stringBuffer.append(TEXT_696);
4359
    stringBuffer.append(TEXT_937);
3388
    
4360
    
3389
			}
4361
			}
3390
			if (setChild) {
4362
			if (setChild) {
3391
				if (childFeature.getEcoreFeature().isMany()) {
4363
				if (childFeature.getEcoreFeature().isMany()) {
3392
4364
3393
    stringBuffer.append(TEXT_697);
4365
    stringBuffer.append(TEXT_938);
3394
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4366
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3395
    stringBuffer.append(TEXT_698);
4367
    stringBuffer.append(TEXT_939);
3396
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4368
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3397
    stringBuffer.append(TEXT_699);
4369
    stringBuffer.append(TEXT_940);
3398
    stringBuffer.append(childFeature.getFeatureAccessorName());
4370
    stringBuffer.append(childFeature.getFeatureAccessorName());
3399
    stringBuffer.append(TEXT_700);
4371
    stringBuffer.append(TEXT_941);
3400
    
4372
    
3401
				} else {
4373
				} else {
3402
4374
3403
    stringBuffer.append(TEXT_701);
4375
    stringBuffer.append(TEXT_942);
3404
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4376
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3405
    stringBuffer.append(TEXT_702);
4377
    stringBuffer.append(TEXT_943);
3406
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4378
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3407
    stringBuffer.append(TEXT_703);
4379
    stringBuffer.append(TEXT_944);
3408
    stringBuffer.append(childFeature.getFeatureAccessorName());
4380
    stringBuffer.append(childFeature.getFeatureAccessorName());
3409
    stringBuffer.append(TEXT_704);
4381
    stringBuffer.append(TEXT_945);
3410
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4382
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3411
    stringBuffer.append(TEXT_705);
4383
    stringBuffer.append(TEXT_946);
3412
    
4384
    
3413
				}
4385
				}
3414
4386
3415
    stringBuffer.append(TEXT_706);
4387
    stringBuffer.append(TEXT_947);
3416
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4388
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
3417
    stringBuffer.append(TEXT_707);
4389
    stringBuffer.append(TEXT_948);
3418
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4390
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3419
    stringBuffer.append(TEXT_708);
4391
    stringBuffer.append(TEXT_949);
3420
    stringBuffer.append(childFeature.getFeatureAccessorName());
4392
    stringBuffer.append(childFeature.getFeatureAccessorName());
3421
    stringBuffer.append(TEXT_709);
4393
    stringBuffer.append(TEXT_950);
3422
    
4394
    
3423
			}
4395
			}
3424
4396
3425
    stringBuffer.append(TEXT_710);
4397
    stringBuffer.append(TEXT_951);
3426
    
4398
    
3427
			if (setSource) {
4399
			if (setSource) {
3428
				if (sourceFeature.getEcoreFeature().isMany()) {
4400
				if (sourceFeature.getEcoreFeature().isMany()) {
3429
4401
3430
    stringBuffer.append(TEXT_711);
4402
    stringBuffer.append(TEXT_952);
3431
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4403
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3432
    stringBuffer.append(TEXT_712);
4404
    stringBuffer.append(TEXT_953);
3433
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4405
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3434
    stringBuffer.append(TEXT_713);
4406
    stringBuffer.append(TEXT_954);
3435
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4407
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
3436
    stringBuffer.append(TEXT_714);
4408
    stringBuffer.append(TEXT_955);
3437
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
4409
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
3438
    stringBuffer.append(TEXT_715);
4410
    stringBuffer.append(TEXT_956);
3439
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4411
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3440
    stringBuffer.append(TEXT_716);
4412
    stringBuffer.append(TEXT_957);
3441
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4413
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
3442
    stringBuffer.append(TEXT_717);
4414
    stringBuffer.append(TEXT_958);
3443
    
4415
    
3444
				} else {
4416
				} else {
3445
4417
3446
    stringBuffer.append(TEXT_718);
4418
    stringBuffer.append(TEXT_959);
3447
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4419
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3448
    stringBuffer.append(TEXT_719);
4420
    stringBuffer.append(TEXT_960);
3449
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4421
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3450
    stringBuffer.append(TEXT_720);
4422
    stringBuffer.append(TEXT_961);
3451
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4423
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
3452
    stringBuffer.append(TEXT_721);
4424
    stringBuffer.append(TEXT_962);
3453
    
4425
    
3454
				}
4426
				}
3455
			}
4427
			}
Lines 3457-3509 Link Here
3457
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
4429
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
3458
			if (metaFeature.getEcoreFeature().isMany()) {
4430
			if (metaFeature.getEcoreFeature().isMany()) {
3459
4431
3460
    stringBuffer.append(TEXT_722);
4432
    stringBuffer.append(TEXT_963);
3461
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4433
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3462
    stringBuffer.append(TEXT_723);
4434
    stringBuffer.append(TEXT_964);
3463
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4435
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3464
    stringBuffer.append(TEXT_724);
4436
    stringBuffer.append(TEXT_965);
3465
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4437
    stringBuffer.append(metaFeature.getFeatureAccessorName());
3466
    stringBuffer.append(TEXT_725);
4438
    stringBuffer.append(TEXT_966);
3467
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
4439
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
3468
    stringBuffer.append(TEXT_726);
4440
    stringBuffer.append(TEXT_967);
3469
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4441
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3470
    stringBuffer.append(TEXT_727);
4442
    stringBuffer.append(TEXT_968);
3471
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4443
    stringBuffer.append(metaFeature.getFeatureAccessorName());
3472
    stringBuffer.append(TEXT_728);
4444
    stringBuffer.append(TEXT_969);
3473
    
4445
    
3474
			} else {
4446
			} else {
3475
4447
3476
    stringBuffer.append(TEXT_729);
4448
    stringBuffer.append(TEXT_970);
3477
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4449
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3478
    stringBuffer.append(TEXT_730);
4450
    stringBuffer.append(TEXT_971);
3479
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4451
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3480
    stringBuffer.append(TEXT_731);
4452
    stringBuffer.append(TEXT_972);
3481
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4453
    stringBuffer.append(metaFeature.getFeatureAccessorName());
3482
    stringBuffer.append(TEXT_732);
4454
    stringBuffer.append(TEXT_973);
3483
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4455
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3484
    stringBuffer.append(TEXT_733);
4456
    stringBuffer.append(TEXT_974);
3485
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4457
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3486
    stringBuffer.append(TEXT_734);
4458
    stringBuffer.append(TEXT_975);
3487
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4459
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3488
    stringBuffer.append(TEXT_735);
4460
    stringBuffer.append(TEXT_976);
3489
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4461
    stringBuffer.append(metaFeature.getFeatureAccessorName());
3490
    stringBuffer.append(TEXT_736);
4462
    stringBuffer.append(TEXT_977);
3491
    
4463
    
3492
			}
4464
			}
3493
		}
4465
		}
3494
4466
3495
    stringBuffer.append(TEXT_737);
4467
    stringBuffer.append(TEXT_978);
3496
    stringBuffer.append(TEXT_738);
4468
    stringBuffer.append(TEXT_979);
3497
    
4469
    
3498
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4470
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
3499
4471
3500
    stringBuffer.append(TEXT_739);
4472
    stringBuffer.append(TEXT_980);
3501
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4473
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3502
    stringBuffer.append(TEXT_740);
4474
    stringBuffer.append(TEXT_981);
3503
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4475
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3504
    stringBuffer.append(TEXT_741);
4476
    stringBuffer.append(TEXT_982);
3505
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
4477
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
3506
    stringBuffer.append(TEXT_742);
4478
    stringBuffer.append(TEXT_983);
3507
    
4479
    
3508
		}
4480
		}
3509
4481
Lines 3511-3526 Link Here
3511
	if (linkConstraints != null) {
4483
	if (linkConstraints != null) {
3512
		String _edge = "edge";
4484
		String _edge = "edge";
3513
4485
3514
    stringBuffer.append(TEXT_743);
4486
    stringBuffer.append(TEXT_984);
3515
    stringBuffer.append(TEXT_744);
4487
    stringBuffer.append(TEXT_985);
3516
    
4488
    
3517
	//input: _edge : String
4489
	//input: _edge : String
3518
4490
3519
    stringBuffer.append(TEXT_745);
4491
    stringBuffer.append(TEXT_986);
3520
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4492
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3521
    stringBuffer.append(TEXT_746);
4493
    stringBuffer.append(TEXT_987);
3522
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4494
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
3523
    stringBuffer.append(TEXT_747);
4495
    stringBuffer.append(TEXT_988);
3524
    
4496
    
3525
	if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4497
	if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
3526
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4498
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
Lines 3547-3763 Link Here
3547
				}
4519
				}
3548
			}
4520
			}
3549
4521
3550
    stringBuffer.append(TEXT_748);
4522
    stringBuffer.append(TEXT_989);
3551
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4523
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
3552
    stringBuffer.append(TEXT_749);
4524
    stringBuffer.append(TEXT_990);
3553
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4525
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
3554
    stringBuffer.append(TEXT_750);
4526
    stringBuffer.append(TEXT_991);
3555
    
4527
    
3556
			if (containmentFeature.getEcoreFeature().isMany()) {
4528
			if (containmentFeature.getEcoreFeature().isMany()) {
3557
4529
3558
    stringBuffer.append(TEXT_751);
4530
    stringBuffer.append(TEXT_992);
3559
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4531
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3560
    stringBuffer.append(TEXT_752);
4532
    stringBuffer.append(TEXT_993);
3561
    stringBuffer.append(_edge);
4533
    stringBuffer.append(_edge);
3562
    stringBuffer.append(TEXT_753);
4534
    stringBuffer.append(TEXT_994);
3563
    stringBuffer.append(_edge);
4535
    stringBuffer.append(_edge);
3564
    stringBuffer.append(TEXT_754);
4536
    stringBuffer.append(TEXT_995);
3565
    stringBuffer.append(_edge);
4537
    stringBuffer.append(_edge);
3566
    stringBuffer.append(TEXT_755);
4538
    stringBuffer.append(TEXT_996);
3567
    
4539
    
3568
			} else {
4540
			} else {
3569
4541
3570
    stringBuffer.append(TEXT_756);
4542
    stringBuffer.append(TEXT_997);
3571
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4543
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3572
    stringBuffer.append(TEXT_757);
4544
    stringBuffer.append(TEXT_998);
3573
    stringBuffer.append(_edge);
4545
    stringBuffer.append(_edge);
3574
    stringBuffer.append(TEXT_758);
4546
    stringBuffer.append(TEXT_999);
3575
    stringBuffer.append(_edge);
4547
    stringBuffer.append(_edge);
3576
    stringBuffer.append(TEXT_759);
4548
    stringBuffer.append(TEXT_1000);
3577
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4549
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3578
    stringBuffer.append(TEXT_760);
4550
    stringBuffer.append(TEXT_1001);
3579
    
4551
    
3580
			}
4552
			}
3581
		} else {
4553
		} else {
3582
4554
3583
    stringBuffer.append(TEXT_761);
4555
    stringBuffer.append(TEXT_1002);
3584
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
4556
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
3585
    stringBuffer.append(TEXT_762);
4557
    stringBuffer.append(TEXT_1003);
3586
    
4558
    
3587
		}
4559
		}
3588
		if (removeChild) {
4560
		if (removeChild) {
3589
			if (childFeature.getEcoreFeature().isMany()) {
4561
			if (childFeature.getEcoreFeature().isMany()) {
3590
4562
3591
    stringBuffer.append(TEXT_763);
4563
    stringBuffer.append(TEXT_1004);
3592
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4564
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3593
    stringBuffer.append(TEXT_764);
4565
    stringBuffer.append(TEXT_1005);
3594
    stringBuffer.append(_edge);
4566
    stringBuffer.append(_edge);
3595
    stringBuffer.append(TEXT_765);
4567
    stringBuffer.append(TEXT_1006);
3596
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4568
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3597
    stringBuffer.append(TEXT_766);
4569
    stringBuffer.append(TEXT_1007);
3598
    stringBuffer.append(childFeature.getFeatureAccessorName());
4570
    stringBuffer.append(childFeature.getFeatureAccessorName());
3599
    stringBuffer.append(TEXT_767);
4571
    stringBuffer.append(TEXT_1008);
3600
    stringBuffer.append(_edge);
4572
    stringBuffer.append(_edge);
3601
    stringBuffer.append(TEXT_768);
4573
    stringBuffer.append(TEXT_1009);
3602
    
4574
    
3603
			} else {
4575
			} else {
3604
4576
3605
    stringBuffer.append(TEXT_769);
4577
    stringBuffer.append(TEXT_1010);
3606
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4578
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3607
    stringBuffer.append(TEXT_770);
4579
    stringBuffer.append(TEXT_1011);
3608
    stringBuffer.append(_edge);
4580
    stringBuffer.append(_edge);
3609
    stringBuffer.append(TEXT_771);
4581
    stringBuffer.append(TEXT_1012);
3610
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4582
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3611
    stringBuffer.append(TEXT_772);
4583
    stringBuffer.append(TEXT_1013);
3612
    stringBuffer.append(childFeature.getFeatureAccessorName());
4584
    stringBuffer.append(childFeature.getFeatureAccessorName());
3613
    stringBuffer.append(TEXT_773);
4585
    stringBuffer.append(TEXT_1014);
3614
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4586
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3615
    stringBuffer.append(TEXT_774);
4587
    stringBuffer.append(TEXT_1015);
3616
    
4588
    
3617
			}
4589
			}
3618
		}
4590
		}
3619
		if (removeSource) {
4591
		if (removeSource) {
3620
			if (sourceFeature.getEcoreFeature().isMany()) {
4592
			if (sourceFeature.getEcoreFeature().isMany()) {
3621
4593
3622
    stringBuffer.append(TEXT_775);
4594
    stringBuffer.append(TEXT_1016);
3623
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4595
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3624
    stringBuffer.append(TEXT_776);
4596
    stringBuffer.append(TEXT_1017);
3625
    stringBuffer.append(_edge);
4597
    stringBuffer.append(_edge);
3626
    stringBuffer.append(TEXT_777);
4598
    stringBuffer.append(TEXT_1018);
3627
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4599
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3628
    stringBuffer.append(TEXT_778);
4600
    stringBuffer.append(TEXT_1019);
3629
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4601
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
3630
    stringBuffer.append(TEXT_779);
4602
    stringBuffer.append(TEXT_1020);
3631
    stringBuffer.append(_edge);
4603
    stringBuffer.append(_edge);
3632
    stringBuffer.append(TEXT_780);
4604
    stringBuffer.append(TEXT_1021);
3633
    
4605
    
3634
			} else {
4606
			} else {
3635
4607
3636
    stringBuffer.append(TEXT_781);
4608
    stringBuffer.append(TEXT_1022);
3637
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4609
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3638
    stringBuffer.append(TEXT_782);
4610
    stringBuffer.append(TEXT_1023);
3639
    stringBuffer.append(_edge);
4611
    stringBuffer.append(_edge);
3640
    stringBuffer.append(TEXT_783);
4612
    stringBuffer.append(TEXT_1024);
3641
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4613
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3642
    stringBuffer.append(TEXT_784);
4614
    stringBuffer.append(TEXT_1025);
3643
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4615
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
3644
    stringBuffer.append(TEXT_785);
4616
    stringBuffer.append(TEXT_1026);
3645
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4617
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3646
    stringBuffer.append(TEXT_786);
4618
    stringBuffer.append(TEXT_1027);
3647
    
4619
    
3648
			}
4620
			}
3649
		}
4621
		}
3650
		if (removeTarget) {
4622
		if (removeTarget) {
3651
			if (targetFeature.getEcoreFeature().isMany()) {
4623
			if (targetFeature.getEcoreFeature().isMany()) {
3652
4624
3653
    stringBuffer.append(TEXT_787);
4625
    stringBuffer.append(TEXT_1028);
3654
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4626
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3655
    stringBuffer.append(TEXT_788);
4627
    stringBuffer.append(TEXT_1029);
3656
    stringBuffer.append(_edge);
4628
    stringBuffer.append(_edge);
3657
    stringBuffer.append(TEXT_789);
4629
    stringBuffer.append(TEXT_1030);
3658
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4630
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3659
    stringBuffer.append(TEXT_790);
4631
    stringBuffer.append(TEXT_1031);
3660
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4632
    stringBuffer.append(targetFeature.getFeatureAccessorName());
3661
    stringBuffer.append(TEXT_791);
4633
    stringBuffer.append(TEXT_1032);
3662
    stringBuffer.append(_edge);
4634
    stringBuffer.append(_edge);
3663
    stringBuffer.append(TEXT_792);
4635
    stringBuffer.append(TEXT_1033);
3664
    
4636
    
3665
			} else {
4637
			} else {
3666
4638
3667
    stringBuffer.append(TEXT_793);
4639
    stringBuffer.append(TEXT_1034);
3668
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4640
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3669
    stringBuffer.append(TEXT_794);
4641
    stringBuffer.append(TEXT_1035);
3670
    stringBuffer.append(_edge);
4642
    stringBuffer.append(_edge);
3671
    stringBuffer.append(TEXT_795);
4643
    stringBuffer.append(TEXT_1036);
3672
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4644
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3673
    stringBuffer.append(TEXT_796);
4645
    stringBuffer.append(TEXT_1037);
3674
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4646
    stringBuffer.append(targetFeature.getFeatureAccessorName());
3675
    stringBuffer.append(TEXT_797);
4647
    stringBuffer.append(TEXT_1038);
3676
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4648
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3677
    stringBuffer.append(TEXT_798);
4649
    stringBuffer.append(TEXT_1039);
3678
    
4650
    
3679
			}
4651
			}
3680
		}
4652
		}
3681
4653
3682
    stringBuffer.append(TEXT_799);
4654
    stringBuffer.append(TEXT_1040);
3683
    
4655
    
3684
	} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4656
	} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
3685
		GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
4657
		GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
3686
		if (metaFeature.getEcoreFeature().isMany()) {
4658
		if (metaFeature.getEcoreFeature().isMany()) {
3687
4659
3688
    stringBuffer.append(TEXT_800);
4660
    stringBuffer.append(TEXT_1041);
3689
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4661
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
3690
    stringBuffer.append(TEXT_801);
4662
    stringBuffer.append(TEXT_1042);
3691
    stringBuffer.append(_edge);
4663
    stringBuffer.append(_edge);
3692
    stringBuffer.append(TEXT_802);
4664
    stringBuffer.append(TEXT_1043);
3693
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4665
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3694
    stringBuffer.append(TEXT_803);
4666
    stringBuffer.append(TEXT_1044);
3695
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4667
    stringBuffer.append(metaFeature.getFeatureAccessorName());
3696
    stringBuffer.append(TEXT_804);
4668
    stringBuffer.append(TEXT_1045);
3697
    stringBuffer.append(_edge);
4669
    stringBuffer.append(_edge);
3698
    stringBuffer.append(TEXT_805);
4670
    stringBuffer.append(TEXT_1046);
3699
    
4671
    
3700
		} else {
4672
		} else {
3701
4673
3702
    stringBuffer.append(TEXT_806);
4674
    stringBuffer.append(TEXT_1047);
3703
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4675
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3704
    stringBuffer.append(TEXT_807);
4676
    stringBuffer.append(TEXT_1048);
3705
    stringBuffer.append(_edge);
4677
    stringBuffer.append(_edge);
3706
    stringBuffer.append(TEXT_808);
4678
    stringBuffer.append(TEXT_1049);
3707
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4679
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
3708
    stringBuffer.append(TEXT_809);
4680
    stringBuffer.append(TEXT_1050);
3709
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4681
    stringBuffer.append(metaFeature.getFeatureAccessorName());
3710
    stringBuffer.append(TEXT_810);
4682
    stringBuffer.append(TEXT_1051);
3711
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4683
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
3712
    stringBuffer.append(TEXT_811);
4684
    stringBuffer.append(TEXT_1052);
3713
    
4685
    
3714
		}
4686
		}
3715
4687
3716
    
4688
    
3717
	}
4689
	}
3718
4690
3719
    stringBuffer.append(TEXT_812);
4691
    stringBuffer.append(TEXT_1053);
3720
    
4692
    
3721
	}
4693
	}
3722
4694
3723
    stringBuffer.append(TEXT_813);
4695
    stringBuffer.append(TEXT_1054);
3724
    
4696
    
3725
	if (palette != null) {
4697
	if (palette != null) {
3726
4698
3727
    stringBuffer.append(TEXT_814);
4699
    stringBuffer.append(TEXT_1055);
3728
    stringBuffer.append(createCommandNameInfix);
4700
    stringBuffer.append(createCommandNameInfix);
3729
    stringBuffer.append(genLink.getVisualID());
4701
    stringBuffer.append(genLink.getVisualID());
3730
    stringBuffer.append(TEXT_815);
4702
    stringBuffer.append(TEXT_1056);
3731
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4703
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
3732
    stringBuffer.append(TEXT_816);
4704
    stringBuffer.append(TEXT_1057);
3733
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4705
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3734
    stringBuffer.append(TEXT_817);
4706
    stringBuffer.append(TEXT_1058);
3735
    stringBuffer.append(createCommandNameInfix);
4707
    stringBuffer.append(createCommandNameInfix);
3736
    stringBuffer.append(genLink.getVisualID());
4708
    stringBuffer.append(genLink.getVisualID());
3737
    stringBuffer.append(TEXT_818);
4709
    stringBuffer.append(TEXT_1059);
3738
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
4710
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
3739
    stringBuffer.append(TEXT_819);
4711
    stringBuffer.append(TEXT_1060);
3740
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4712
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3741
    stringBuffer.append(TEXT_820);
4713
    stringBuffer.append(TEXT_1061);
3742
    
4714
    
3743
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4715
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
3744
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4716
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
3745
			GenFeature containmentFeature = modelFacet.getContainmentMetaFeature();
4717
			GenFeature containmentFeature = modelFacet.getContainmentMetaFeature();
3746
			if (containmentFeature == null) {
4718
			if (containmentFeature == null) {
3747
4719
3748
    stringBuffer.append(TEXT_821);
4720
    stringBuffer.append(TEXT_1062);
3749
    
4721
    
3750
			} else {
4722
			} else {
3751
4723
3752
    stringBuffer.append(TEXT_822);
4724
    stringBuffer.append(TEXT_1063);
3753
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
4725
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
3754
    stringBuffer.append(TEXT_823);
4726
    stringBuffer.append(TEXT_1064);
3755
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
4727
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName()));
3756
    stringBuffer.append(TEXT_824);
4728
    stringBuffer.append(TEXT_1065);
3757
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
4729
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
3758
    stringBuffer.append(TEXT_825);
4730
    stringBuffer.append(TEXT_1066);
3759
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
4731
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
3760
    stringBuffer.append(TEXT_826);
4732
    stringBuffer.append(TEXT_1067);
3761
    
4733
    
3762
				{
4734
				{
3763
					GenFeature _feature = containmentFeature;
4735
					GenFeature _feature = containmentFeature;
Lines 3765-3793 Link Here
3765
					String _exceedsUpperBound = "return false;";
4737
					String _exceedsUpperBound = "return false;";
3766
					GenClass _ownerGenClass = containmentFeature.getGenClass();
4738
					GenClass _ownerGenClass = containmentFeature.getGenClass();
3767
4739
3768
    stringBuffer.append(TEXT_827);
4740
    stringBuffer.append(TEXT_1068);
3769
    
4741
    
3770
int upperBound = _feature.getEcoreFeature().getUpperBound();
4742
int upperBound = _feature.getEcoreFeature().getUpperBound();
3771
if (upperBound > 0) {
4743
if (upperBound > 0) {
3772
	if (upperBound == 1) {
4744
	if (upperBound == 1) {
3773
4745
3774
    stringBuffer.append(TEXT_828);
4746
    stringBuffer.append(TEXT_1069);
3775
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4747
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
3776
    stringBuffer.append(TEXT_829);
4748
    stringBuffer.append(TEXT_1070);
3777
    stringBuffer.append(_exceedsUpperBound);
4749
    stringBuffer.append(_exceedsUpperBound);
3778
    stringBuffer.append(TEXT_830);
4750
    stringBuffer.append(TEXT_1071);
3779
    
4751
    
3780
	} else {
4752
	} else {
3781
4753
3782
    stringBuffer.append(TEXT_831);
4754
    stringBuffer.append(TEXT_1072);
3783
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4755
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
3784
    stringBuffer.append(TEXT_832);
4756
    stringBuffer.append(TEXT_1073);
3785
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4757
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3786
    stringBuffer.append(TEXT_833);
4758
    stringBuffer.append(TEXT_1074);
3787
    stringBuffer.append(_feature.getFeatureAccessorName());
4759
    stringBuffer.append(_feature.getFeatureAccessorName());
3788
    stringBuffer.append(TEXT_834);
4760
    stringBuffer.append(TEXT_1075);
3789
    stringBuffer.append(_exceedsUpperBound);
4761
    stringBuffer.append(_exceedsUpperBound);
3790
    stringBuffer.append(TEXT_835);
4762
    stringBuffer.append(TEXT_1076);
3791
    
4763
    
3792
	}
4764
	}
3793
}
4765
}
Lines 3802-3830 Link Here
3802
						String _exceedsUpperBound = "return false;";
4774
						String _exceedsUpperBound = "return false;";
3803
						GenClass _ownerGenClass = containmentFeature.getGenClass();
4775
						GenClass _ownerGenClass = containmentFeature.getGenClass();
3804
4776
3805
    stringBuffer.append(TEXT_836);
4777
    stringBuffer.append(TEXT_1077);
3806
    
4778
    
3807
int upperBound = _feature.getEcoreFeature().getUpperBound();
4779
int upperBound = _feature.getEcoreFeature().getUpperBound();
3808
if (upperBound > 0) {
4780
if (upperBound > 0) {
3809
	if (upperBound == 1) {
4781
	if (upperBound == 1) {
3810
4782
3811
    stringBuffer.append(TEXT_837);
4783
    stringBuffer.append(TEXT_1078);
3812
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4784
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
3813
    stringBuffer.append(TEXT_838);
4785
    stringBuffer.append(TEXT_1079);
3814
    stringBuffer.append(_exceedsUpperBound);
4786
    stringBuffer.append(_exceedsUpperBound);
3815
    stringBuffer.append(TEXT_839);
4787
    stringBuffer.append(TEXT_1080);
3816
    
4788
    
3817
	} else {
4789
	} else {
3818
4790
3819
    stringBuffer.append(TEXT_840);
4791
    stringBuffer.append(TEXT_1081);
3820
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4792
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
3821
    stringBuffer.append(TEXT_841);
4793
    stringBuffer.append(TEXT_1082);
3822
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4794
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3823
    stringBuffer.append(TEXT_842);
4795
    stringBuffer.append(TEXT_1083);
3824
    stringBuffer.append(_feature.getFeatureAccessorName());
4796
    stringBuffer.append(_feature.getFeatureAccessorName());
3825
    stringBuffer.append(TEXT_843);
4797
    stringBuffer.append(TEXT_1084);
3826
    stringBuffer.append(_exceedsUpperBound);
4798
    stringBuffer.append(_exceedsUpperBound);
3827
    stringBuffer.append(TEXT_844);
4799
    stringBuffer.append(TEXT_1085);
3828
    
4800
    
3829
	}
4801
	}
3830
}
4802
}
Lines 3836-3859 Link Here
3836
	String _source = "source.getElement()";
4808
	String _source = "source.getElement()";
3837
	String _target = "null";
4809
	String _target = "null";
3838
4810
3839
    stringBuffer.append(TEXT_845);
4811
    stringBuffer.append(TEXT_1086);
3840
    
4812
    
3841
			if (linkConstraints != null) {
4813
			if (linkConstraints != null) {
3842
4814
3843
    stringBuffer.append(TEXT_846);
4815
    stringBuffer.append(TEXT_1087);
3844
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4816
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
3845
    stringBuffer.append(TEXT_847);
4817
    stringBuffer.append(TEXT_1088);
3846
    stringBuffer.append(_source);
4818
    stringBuffer.append(_source);
3847
    stringBuffer.append(TEXT_848);
4819
    stringBuffer.append(TEXT_1089);
3848
    stringBuffer.append(_target);
4820
    stringBuffer.append(_target);
3849
    stringBuffer.append(TEXT_849);
4821
    stringBuffer.append(TEXT_1090);
3850
    
4822
    
3851
			}
4823
			}
3852
4824
3853
    
4825
    
3854
}	//local declarations for linkConstraints.jetinc
4826
}	//local declarations for linkConstraints.jetinc
3855
4827
3856
    stringBuffer.append(TEXT_850);
4828
    stringBuffer.append(TEXT_1091);
3857
    
4829
    
3858
			}
4830
			}
3859
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4831
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
Lines 3864-3892 Link Here
3864
			String _exceedsUpperBound = "return false;";
4836
			String _exceedsUpperBound = "return false;";
3865
			GenClass _ownerGenClass = null;
4837
			GenClass _ownerGenClass = null;
3866
4838
3867
    stringBuffer.append(TEXT_851);
4839
    stringBuffer.append(TEXT_1092);
3868
    
4840
    
3869
int upperBound = _feature.getEcoreFeature().getUpperBound();
4841
int upperBound = _feature.getEcoreFeature().getUpperBound();
3870
if (upperBound > 0) {
4842
if (upperBound > 0) {
3871
	if (upperBound == 1) {
4843
	if (upperBound == 1) {
3872
4844
3873
    stringBuffer.append(TEXT_852);
4845
    stringBuffer.append(TEXT_1093);
3874
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4846
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
3875
    stringBuffer.append(TEXT_853);
4847
    stringBuffer.append(TEXT_1094);
3876
    stringBuffer.append(_exceedsUpperBound);
4848
    stringBuffer.append(_exceedsUpperBound);
3877
    stringBuffer.append(TEXT_854);
4849
    stringBuffer.append(TEXT_1095);
3878
    
4850
    
3879
	} else {
4851
	} else {
3880
4852
3881
    stringBuffer.append(TEXT_855);
4853
    stringBuffer.append(TEXT_1096);
3882
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4854
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
3883
    stringBuffer.append(TEXT_856);
4855
    stringBuffer.append(TEXT_1097);
3884
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4856
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
3885
    stringBuffer.append(TEXT_857);
4857
    stringBuffer.append(TEXT_1098);
3886
    stringBuffer.append(_feature.getFeatureAccessorName());
4858
    stringBuffer.append(_feature.getFeatureAccessorName());
3887
    stringBuffer.append(TEXT_858);
4859
    stringBuffer.append(TEXT_1099);
3888
    stringBuffer.append(_exceedsUpperBound);
4860
    stringBuffer.append(_exceedsUpperBound);
3889
    stringBuffer.append(TEXT_859);
4861
    stringBuffer.append(TEXT_1100);
3890
    
4862
    
3891
	}
4863
	}
3892
}
4864
}
Lines 3897-3943 Link Here
3897
	String _source = "source.getElement()";
4869
	String _source = "source.getElement()";
3898
	String _target = "null";
4870
	String _target = "null";
3899
4871
3900
    stringBuffer.append(TEXT_860);
4872
    stringBuffer.append(TEXT_1101);
3901
    
4873
    
3902
			if (linkConstraints != null) {
4874
			if (linkConstraints != null) {
3903
4875
3904
    stringBuffer.append(TEXT_861);
4876
    stringBuffer.append(TEXT_1102);
3905
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4877
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
3906
    stringBuffer.append(TEXT_862);
4878
    stringBuffer.append(TEXT_1103);
3907
    stringBuffer.append(_source);
4879
    stringBuffer.append(_source);
3908
    stringBuffer.append(TEXT_863);
4880
    stringBuffer.append(TEXT_1104);
3909
    stringBuffer.append(_target);
4881
    stringBuffer.append(_target);
3910
    stringBuffer.append(TEXT_864);
4882
    stringBuffer.append(TEXT_1105);
3911
    
4883
    
3912
			}
4884
			}
3913
4885
3914
    
4886
    
3915
}	//local declarations for linkConstraints.jetinc
4887
}	//local declarations for linkConstraints.jetinc
3916
4888
3917
    stringBuffer.append(TEXT_865);
4889
    stringBuffer.append(TEXT_1106);
3918
    
4890
    
3919
		} else {
4891
		} else {
3920
4892
3921
    stringBuffer.append(TEXT_866);
4893
    stringBuffer.append(TEXT_1107);
3922
    
4894
    
3923
		}
4895
		}
3924
4896
3925
    stringBuffer.append(TEXT_867);
4897
    stringBuffer.append(TEXT_1108);
3926
    stringBuffer.append(TEXT_868);
4898
    stringBuffer.append(TEXT_1109);
3927
    
4899
    
3928
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4900
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
3929
4901
3930
    stringBuffer.append(TEXT_869);
4902
    stringBuffer.append(TEXT_1110);
3931
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4903
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3932
    stringBuffer.append(TEXT_870);
4904
    stringBuffer.append(TEXT_1111);
3933
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4905
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
3934
    stringBuffer.append(TEXT_871);
4906
    stringBuffer.append(TEXT_1112);
3935
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
4907
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
3936
    stringBuffer.append(TEXT_872);
4908
    stringBuffer.append(TEXT_1113);
3937
    
4909
    
3938
		}
4910
		}
3939
4911
3940
    stringBuffer.append(TEXT_873);
4912
    stringBuffer.append(TEXT_1114);
3941
    
4913
    
3942
	}	//if there's palette 
4914
	}	//if there's palette 
3943
}	//outgoing links
4915
}	//outgoing links
Lines 3967-4171 Link Here
3967
	}
4939
	}
3968
	GenLinkConstraints linkConstraints = genLink.getCreationConstraints();
4940
	GenLinkConstraints linkConstraints = genLink.getCreationConstraints();
3969
4941
3970
    stringBuffer.append(TEXT_874);
4942
    stringBuffer.append(TEXT_1115);
3971
    stringBuffer.append(reconnectCommandNameInfix);
4943
    stringBuffer.append(reconnectCommandNameInfix);
3972
    stringBuffer.append(genLink.getVisualID());
4944
    stringBuffer.append(genLink.getVisualID());
3973
    stringBuffer.append(TEXT_875);
4945
    stringBuffer.append(TEXT_1116);
3974
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4946
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
3975
    stringBuffer.append(TEXT_876);
4947
    stringBuffer.append(TEXT_1117);
3976
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4948
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3977
    stringBuffer.append(TEXT_877);
4949
    stringBuffer.append(TEXT_1118);
3978
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4950
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3979
    stringBuffer.append(TEXT_878);
4951
    stringBuffer.append(TEXT_1119);
3980
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4952
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3981
    stringBuffer.append(TEXT_879);
4953
    stringBuffer.append(TEXT_1120);
3982
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4954
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
3983
    stringBuffer.append(TEXT_880);
4955
    stringBuffer.append(TEXT_1121);
3984
    stringBuffer.append(reconnectCommandNameInfix);
4956
    stringBuffer.append(reconnectCommandNameInfix);
3985
    stringBuffer.append(genLink.getVisualID());
4957
    stringBuffer.append(genLink.getVisualID());
3986
    stringBuffer.append(TEXT_881);
4958
    stringBuffer.append(TEXT_1122);
3987
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
4959
    stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.ReconnectRequest"));
3988
    stringBuffer.append(TEXT_882);
4960
    stringBuffer.append(TEXT_1123);
3989
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4961
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3990
    stringBuffer.append(TEXT_883);
4962
    stringBuffer.append(TEXT_1124);
3991
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4963
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3992
    stringBuffer.append(TEXT_884);
4964
    stringBuffer.append(TEXT_1125);
3993
    stringBuffer.append(reconnectCommandNameInfix);
4965
    stringBuffer.append(reconnectCommandNameInfix);
3994
    stringBuffer.append(genLink.getVisualID());
4966
    stringBuffer.append(genLink.getVisualID());
3995
    stringBuffer.append(TEXT_885);
4967
    stringBuffer.append(TEXT_1126);
3996
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4968
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
3997
    stringBuffer.append(TEXT_886);
4969
    stringBuffer.append(TEXT_1127);
3998
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4970
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
3999
    stringBuffer.append(TEXT_887);
4971
    stringBuffer.append(TEXT_1128);
4000
    
4972
    
4001
	if (linkConstraints != null) {
4973
	if (linkConstraints != null) {
4002
4974
4003
    stringBuffer.append(TEXT_888);
4975
    stringBuffer.append(TEXT_1129);
4004
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4976
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4005
    stringBuffer.append(TEXT_889);
4977
    stringBuffer.append(TEXT_1130);
4006
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
4978
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
4007
    stringBuffer.append(TEXT_890);
4979
    stringBuffer.append(TEXT_1131);
4008
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4980
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4009
    stringBuffer.append(TEXT_891);
4981
    stringBuffer.append(TEXT_1132);
4010
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4982
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4011
    stringBuffer.append(TEXT_892);
4983
    stringBuffer.append(TEXT_1133);
4012
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4984
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4013
    stringBuffer.append(TEXT_893);
4985
    stringBuffer.append(TEXT_1134);
4014
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
4986
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand"));
4015
    stringBuffer.append(TEXT_894);
4987
    stringBuffer.append(TEXT_1135);
4016
    
4988
    
4017
	} else {
4989
	} else {
4018
4990
4019
    stringBuffer.append(TEXT_895);
4991
    stringBuffer.append(TEXT_1136);
4020
    
4992
    
4021
	}
4993
	}
4022
4994
4023
    stringBuffer.append(TEXT_896);
4995
    stringBuffer.append(TEXT_1137);
4024
    
4996
    
4025
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4997
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4026
{
4998
{
4027
	String _source = "edge.getSource().getElement()";
4999
	String _source = "edge.getSource().getElement()";
4028
	String _target = "newTarget.getElement()";
5000
	String _target = "newTarget.getElement()";
4029
5001
4030
    stringBuffer.append(TEXT_897);
5002
    stringBuffer.append(TEXT_1138);
4031
    
5003
    
4032
			if (linkConstraints != null) {
5004
			if (linkConstraints != null) {
4033
5005
4034
    stringBuffer.append(TEXT_898);
5006
    stringBuffer.append(TEXT_1139);
4035
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
5007
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4036
    stringBuffer.append(TEXT_899);
5008
    stringBuffer.append(TEXT_1140);
4037
    stringBuffer.append(_source);
5009
    stringBuffer.append(_source);
4038
    stringBuffer.append(TEXT_900);
5010
    stringBuffer.append(TEXT_1141);
4039
    stringBuffer.append(_target);
5011
    stringBuffer.append(_target);
4040
    stringBuffer.append(TEXT_901);
5012
    stringBuffer.append(TEXT_1142);
4041
    
5013
    
4042
			}
5014
			}
4043
5015
4044
    
5016
    
4045
}	//local declarations for linkConstraints.jetinc
5017
}	//local declarations for linkConstraints.jetinc
4046
5018
4047
    stringBuffer.append(TEXT_902);
5019
    stringBuffer.append(TEXT_1143);
4048
    
5020
    
4049
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
5021
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4050
{
5022
{
4051
	String _source = "edge.getSource().getElement()";
5023
	String _source = "edge.getSource().getElement()";
4052
	String _target = "newTarget.getElement()";
5024
	String _target = "newTarget.getElement()";
4053
5025
4054
    stringBuffer.append(TEXT_903);
5026
    stringBuffer.append(TEXT_1144);
4055
    
5027
    
4056
			if (linkConstraints != null) {
5028
			if (linkConstraints != null) {
4057
5029
4058
    stringBuffer.append(TEXT_904);
5030
    stringBuffer.append(TEXT_1145);
4059
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
5031
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4060
    stringBuffer.append(TEXT_905);
5032
    stringBuffer.append(TEXT_1146);
4061
    stringBuffer.append(_source);
5033
    stringBuffer.append(_source);
4062
    stringBuffer.append(TEXT_906);
5034
    stringBuffer.append(TEXT_1147);
4063
    stringBuffer.append(_target);
5035
    stringBuffer.append(_target);
4064
    stringBuffer.append(TEXT_907);
5036
    stringBuffer.append(TEXT_1148);
4065
    
5037
    
4066
			}
5038
			}
4067
5039
4068
    
5040
    
4069
}	//local declarations for linkConstraints.jetinc
5041
}	//local declarations for linkConstraints.jetinc
4070
5042
4071
    stringBuffer.append(TEXT_908);
5043
    stringBuffer.append(TEXT_1149);
4072
    
5044
    
4073
		} else {
5045
		} else {
4074
5046
4075
    stringBuffer.append(TEXT_909);
5047
    stringBuffer.append(TEXT_1150);
4076
    
5048
    
4077
		}
5049
		}
4078
5050
4079
    stringBuffer.append(TEXT_910);
5051
    stringBuffer.append(TEXT_1151);
4080
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
5052
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4081
    stringBuffer.append(TEXT_911);
5053
    stringBuffer.append(TEXT_1152);
4082
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
5054
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4083
    stringBuffer.append(TEXT_912);
5055
    stringBuffer.append(TEXT_1153);
4084
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
5056
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
4085
    stringBuffer.append(TEXT_913);
5057
    stringBuffer.append(TEXT_1154);
4086
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
5058
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4087
    stringBuffer.append(TEXT_914);
5059
    stringBuffer.append(TEXT_1155);
4088
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
5060
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4089
    stringBuffer.append(TEXT_915);
5061
    stringBuffer.append(TEXT_1156);
4090
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeTargetCommand"));
5062
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.ReconnectNotationalEdgeTargetCommand"));
4091
    stringBuffer.append(TEXT_916);
5063
    stringBuffer.append(TEXT_1157);
4092
    
5064
    
4093
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
5065
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4094
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
5066
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4095
			GenFeature targetFeature = modelFacet.getTargetMetaFeature();
5067
			GenFeature targetFeature = modelFacet.getTargetMetaFeature();
4096
			if (targetFeature.getEcoreFeature().isMany()) {
5068
			if (targetFeature.getEcoreFeature().isMany()) {
4097
5069
4098
    stringBuffer.append(TEXT_917);
5070
    stringBuffer.append(TEXT_1158);
4099
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5071
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4100
    stringBuffer.append(TEXT_918);
5072
    stringBuffer.append(TEXT_1159);
4101
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5073
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4102
    stringBuffer.append(TEXT_919);
5074
    stringBuffer.append(TEXT_1160);
4103
    stringBuffer.append(targetFeature.getFeatureAccessorName());
5075
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4104
    stringBuffer.append(TEXT_920);
5076
    stringBuffer.append(TEXT_1161);
4105
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
5077
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
4106
    stringBuffer.append(TEXT_921);
5078
    stringBuffer.append(TEXT_1162);
4107
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5079
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4108
    stringBuffer.append(TEXT_922);
5080
    stringBuffer.append(TEXT_1163);
4109
    stringBuffer.append(targetFeature.getFeatureAccessorName());
5081
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4110
    stringBuffer.append(TEXT_923);
5082
    stringBuffer.append(TEXT_1164);
4111
    
5083
    
4112
			} else {
5084
			} else {
4113
5085
4114
    stringBuffer.append(TEXT_924);
5086
    stringBuffer.append(TEXT_1165);
4115
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5087
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4116
    stringBuffer.append(TEXT_925);
5088
    stringBuffer.append(TEXT_1166);
4117
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5089
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4118
    stringBuffer.append(TEXT_926);
5090
    stringBuffer.append(TEXT_1167);
4119
    stringBuffer.append(targetFeature.getFeatureAccessorName());
5091
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4120
    stringBuffer.append(TEXT_927);
5092
    stringBuffer.append(TEXT_1168);
4121
    
5093
    
4122
			}
5094
			}
4123
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
5095
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4124
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
5096
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
4125
			if (metaFeature.getEcoreFeature().isMany()) {
5097
			if (metaFeature.getEcoreFeature().isMany()) {
4126
5098
4127
    stringBuffer.append(TEXT_928);
5099
    stringBuffer.append(TEXT_1169);
4128
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5100
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4129
    stringBuffer.append(TEXT_929);
5101
    stringBuffer.append(TEXT_1170);
4130
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5102
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4131
    stringBuffer.append(TEXT_930);
5103
    stringBuffer.append(TEXT_1171);
4132
    stringBuffer.append(metaFeature.getFeatureAccessorName());
5104
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4133
    stringBuffer.append(TEXT_931);
5105
    stringBuffer.append(TEXT_1172);
4134
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
5106
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.AddCommand"));
4135
    stringBuffer.append(TEXT_932);
5107
    stringBuffer.append(TEXT_1173);
4136
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5108
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4137
    stringBuffer.append(TEXT_933);
5109
    stringBuffer.append(TEXT_1174);
4138
    stringBuffer.append(metaFeature.getFeatureAccessorName());
5110
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4139
    stringBuffer.append(TEXT_934);
5111
    stringBuffer.append(TEXT_1175);
4140
    
5112
    
4141
			} else {
5113
			} else {
4142
5114
4143
    stringBuffer.append(TEXT_935);
5115
    stringBuffer.append(TEXT_1176);
4144
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5116
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4145
    stringBuffer.append(TEXT_936);
5117
    stringBuffer.append(TEXT_1177);
4146
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5118
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4147
    stringBuffer.append(TEXT_937);
5119
    stringBuffer.append(TEXT_1178);
4148
    stringBuffer.append(metaFeature.getFeatureAccessorName());
5120
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4149
    stringBuffer.append(TEXT_938);
5121
    stringBuffer.append(TEXT_1179);
4150
    
5122
    
4151
			}
5123
			}
4152
		}
5124
		}
4153
5125
4154
    stringBuffer.append(TEXT_939);
5126
    stringBuffer.append(TEXT_1180);
4155
    
5127
    
4156
	if (linkConstraints != null) {
5128
	if (linkConstraints != null) {
4157
		String _edge = "edge";
5129
		String _edge = "edge";
4158
5130
4159
    stringBuffer.append(TEXT_940);
5131
    stringBuffer.append(TEXT_1181);
4160
    stringBuffer.append(TEXT_941);
5132
    stringBuffer.append(TEXT_1182);
4161
    
5133
    
4162
	//input: _edge : String
5134
	//input: _edge : String
4163
5135
4164
    stringBuffer.append(TEXT_942);
5136
    stringBuffer.append(TEXT_1183);
4165
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
5137
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.Command"));
4166
    stringBuffer.append(TEXT_943);
5138
    stringBuffer.append(TEXT_1184);
4167
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
5139
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4168
    stringBuffer.append(TEXT_944);
5140
    stringBuffer.append(TEXT_1185);
4169
    
5141
    
4170
	if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
5142
	if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4171
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
5143
		TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
Lines 4192-4451 Link Here
4192
				}
5164
				}
4193
			}
5165
			}
4194
5166
4195
    stringBuffer.append(TEXT_945);
5167
    stringBuffer.append(TEXT_1186);
4196
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
5168
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4197
    stringBuffer.append(TEXT_946);
5169
    stringBuffer.append(TEXT_1187);
4198
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
5170
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.CompoundCommand"));
4199
    stringBuffer.append(TEXT_947);
5171
    stringBuffer.append(TEXT_1188);
4200
    
5172
    
4201
			if (containmentFeature.getEcoreFeature().isMany()) {
5173
			if (containmentFeature.getEcoreFeature().isMany()) {
4202
5174
4203
    stringBuffer.append(TEXT_948);
5175
    stringBuffer.append(TEXT_1189);
4204
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5176
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4205
    stringBuffer.append(TEXT_949);
5177
    stringBuffer.append(TEXT_1190);
4206
    stringBuffer.append(_edge);
5178
    stringBuffer.append(_edge);
4207
    stringBuffer.append(TEXT_950);
5179
    stringBuffer.append(TEXT_1191);
4208
    stringBuffer.append(_edge);
5180
    stringBuffer.append(_edge);
4209
    stringBuffer.append(TEXT_951);
5181
    stringBuffer.append(TEXT_1192);
4210
    stringBuffer.append(_edge);
5182
    stringBuffer.append(_edge);
4211
    stringBuffer.append(TEXT_952);
5183
    stringBuffer.append(TEXT_1193);
4212
    
5184
    
4213
			} else {
5185
			} else {
4214
5186
4215
    stringBuffer.append(TEXT_953);
5187
    stringBuffer.append(TEXT_1194);
4216
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5188
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4217
    stringBuffer.append(TEXT_954);
5189
    stringBuffer.append(TEXT_1195);
4218
    stringBuffer.append(_edge);
5190
    stringBuffer.append(_edge);
4219
    stringBuffer.append(TEXT_955);
5191
    stringBuffer.append(TEXT_1196);
4220
    stringBuffer.append(_edge);
5192
    stringBuffer.append(_edge);
4221
    stringBuffer.append(TEXT_956);
5193
    stringBuffer.append(TEXT_1197);
4222
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5194
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4223
    stringBuffer.append(TEXT_957);
5195
    stringBuffer.append(TEXT_1198);
4224
    
5196
    
4225
			}
5197
			}
4226
		} else {
5198
		} else {
4227
5199
4228
    stringBuffer.append(TEXT_958);
5200
    stringBuffer.append(TEXT_1199);
4229
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
5201
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
4230
    stringBuffer.append(TEXT_959);
5202
    stringBuffer.append(TEXT_1200);
4231
    
5203
    
4232
		}
5204
		}
4233
		if (removeChild) {
5205
		if (removeChild) {
4234
			if (childFeature.getEcoreFeature().isMany()) {
5206
			if (childFeature.getEcoreFeature().isMany()) {
4235
5207
4236
    stringBuffer.append(TEXT_960);
5208
    stringBuffer.append(TEXT_1201);
4237
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5209
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4238
    stringBuffer.append(TEXT_961);
5210
    stringBuffer.append(TEXT_1202);
4239
    stringBuffer.append(_edge);
5211
    stringBuffer.append(_edge);
4240
    stringBuffer.append(TEXT_962);
5212
    stringBuffer.append(TEXT_1203);
4241
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5213
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4242
    stringBuffer.append(TEXT_963);
5214
    stringBuffer.append(TEXT_1204);
4243
    stringBuffer.append(childFeature.getFeatureAccessorName());
5215
    stringBuffer.append(childFeature.getFeatureAccessorName());
4244
    stringBuffer.append(TEXT_964);
5216
    stringBuffer.append(TEXT_1205);
4245
    stringBuffer.append(_edge);
5217
    stringBuffer.append(_edge);
4246
    stringBuffer.append(TEXT_965);
5218
    stringBuffer.append(TEXT_1206);
4247
    
5219
    
4248
			} else {
5220
			} else {
4249
5221
4250
    stringBuffer.append(TEXT_966);
5222
    stringBuffer.append(TEXT_1207);
4251
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5223
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4252
    stringBuffer.append(TEXT_967);
5224
    stringBuffer.append(TEXT_1208);
4253
    stringBuffer.append(_edge);
5225
    stringBuffer.append(_edge);
4254
    stringBuffer.append(TEXT_968);
5226
    stringBuffer.append(TEXT_1209);
4255
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5227
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4256
    stringBuffer.append(TEXT_969);
5228
    stringBuffer.append(TEXT_1210);
4257
    stringBuffer.append(childFeature.getFeatureAccessorName());
5229
    stringBuffer.append(childFeature.getFeatureAccessorName());
4258
    stringBuffer.append(TEXT_970);
5230
    stringBuffer.append(TEXT_1211);
4259
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5231
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4260
    stringBuffer.append(TEXT_971);
5232
    stringBuffer.append(TEXT_1212);
4261
    
5233
    
4262
			}
5234
			}
4263
		}
5235
		}
4264
		if (removeSource) {
5236
		if (removeSource) {
4265
			if (sourceFeature.getEcoreFeature().isMany()) {
5237
			if (sourceFeature.getEcoreFeature().isMany()) {
4266
5238
4267
    stringBuffer.append(TEXT_972);
5239
    stringBuffer.append(TEXT_1213);
4268
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5240
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4269
    stringBuffer.append(TEXT_973);
5241
    stringBuffer.append(TEXT_1214);
4270
    stringBuffer.append(_edge);
5242
    stringBuffer.append(_edge);
4271
    stringBuffer.append(TEXT_974);
5243
    stringBuffer.append(TEXT_1215);
4272
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5244
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4273
    stringBuffer.append(TEXT_975);
5245
    stringBuffer.append(TEXT_1216);
4274
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
5246
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4275
    stringBuffer.append(TEXT_976);
5247
    stringBuffer.append(TEXT_1217);
4276
    stringBuffer.append(_edge);
5248
    stringBuffer.append(_edge);
4277
    stringBuffer.append(TEXT_977);
5249
    stringBuffer.append(TEXT_1218);
4278
    
5250
    
4279
			} else {
5251
			} else {
4280
5252
4281
    stringBuffer.append(TEXT_978);
5253
    stringBuffer.append(TEXT_1219);
4282
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5254
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4283
    stringBuffer.append(TEXT_979);
5255
    stringBuffer.append(TEXT_1220);
4284
    stringBuffer.append(_edge);
5256
    stringBuffer.append(_edge);
4285
    stringBuffer.append(TEXT_980);
5257
    stringBuffer.append(TEXT_1221);
4286
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5258
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4287
    stringBuffer.append(TEXT_981);
5259
    stringBuffer.append(TEXT_1222);
4288
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
5260
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4289
    stringBuffer.append(TEXT_982);
5261
    stringBuffer.append(TEXT_1223);
4290
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5262
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4291
    stringBuffer.append(TEXT_983);
5263
    stringBuffer.append(TEXT_1224);
4292
    
5264
    
4293
			}
5265
			}
4294
		}
5266
		}
4295
		if (removeTarget) {
5267
		if (removeTarget) {
4296
			if (targetFeature.getEcoreFeature().isMany()) {
5268
			if (targetFeature.getEcoreFeature().isMany()) {
4297
5269
4298
    stringBuffer.append(TEXT_984);
5270
    stringBuffer.append(TEXT_1225);
4299
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5271
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4300
    stringBuffer.append(TEXT_985);
5272
    stringBuffer.append(TEXT_1226);
4301
    stringBuffer.append(_edge);
5273
    stringBuffer.append(_edge);
4302
    stringBuffer.append(TEXT_986);
5274
    stringBuffer.append(TEXT_1227);
4303
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5275
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4304
    stringBuffer.append(TEXT_987);
5276
    stringBuffer.append(TEXT_1228);
4305
    stringBuffer.append(targetFeature.getFeatureAccessorName());
5277
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4306
    stringBuffer.append(TEXT_988);
5278
    stringBuffer.append(TEXT_1229);
4307
    stringBuffer.append(_edge);
5279
    stringBuffer.append(_edge);
4308
    stringBuffer.append(TEXT_989);
5280
    stringBuffer.append(TEXT_1230);
4309
    
5281
    
4310
			} else {
5282
			} else {
4311
5283
4312
    stringBuffer.append(TEXT_990);
5284
    stringBuffer.append(TEXT_1231);
4313
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5285
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4314
    stringBuffer.append(TEXT_991);
5286
    stringBuffer.append(TEXT_1232);
4315
    stringBuffer.append(_edge);
5287
    stringBuffer.append(_edge);
4316
    stringBuffer.append(TEXT_992);
5288
    stringBuffer.append(TEXT_1233);
4317
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5289
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4318
    stringBuffer.append(TEXT_993);
5290
    stringBuffer.append(TEXT_1234);
4319
    stringBuffer.append(targetFeature.getFeatureAccessorName());
5291
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4320
    stringBuffer.append(TEXT_994);
5292
    stringBuffer.append(TEXT_1235);
4321
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5293
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4322
    stringBuffer.append(TEXT_995);
5294
    stringBuffer.append(TEXT_1236);
4323
    
5295
    
4324
			}
5296
			}
4325
		}
5297
		}
4326
5298
4327
    stringBuffer.append(TEXT_996);
5299
    stringBuffer.append(TEXT_1237);
4328
    
5300
    
4329
	} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
5301
	} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4330
		GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
5302
		GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
4331
		if (metaFeature.getEcoreFeature().isMany()) {
5303
		if (metaFeature.getEcoreFeature().isMany()) {
4332
5304
4333
    stringBuffer.append(TEXT_997);
5305
    stringBuffer.append(TEXT_1238);
4334
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
5306
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.RemoveCommand"));
4335
    stringBuffer.append(TEXT_998);
5307
    stringBuffer.append(TEXT_1239);
4336
    stringBuffer.append(_edge);
5308
    stringBuffer.append(_edge);
4337
    stringBuffer.append(TEXT_999);
5309
    stringBuffer.append(TEXT_1240);
4338
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5310
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4339
    stringBuffer.append(TEXT_1000);
5311
    stringBuffer.append(TEXT_1241);
4340
    stringBuffer.append(metaFeature.getFeatureAccessorName());
5312
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4341
    stringBuffer.append(TEXT_1001);
5313
    stringBuffer.append(TEXT_1242);
4342
    stringBuffer.append(_edge);
5314
    stringBuffer.append(_edge);
4343
    stringBuffer.append(TEXT_1002);
5315
    stringBuffer.append(TEXT_1243);
4344
    
5316
    
4345
		} else {
5317
		} else {
4346
5318
4347
    stringBuffer.append(TEXT_1003);
5319
    stringBuffer.append(TEXT_1244);
4348
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5320
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4349
    stringBuffer.append(TEXT_1004);
5321
    stringBuffer.append(TEXT_1245);
4350
    stringBuffer.append(_edge);
5322
    stringBuffer.append(_edge);
4351
    stringBuffer.append(TEXT_1005);
5323
    stringBuffer.append(TEXT_1246);
4352
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5324
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4353
    stringBuffer.append(TEXT_1006);
5325
    stringBuffer.append(TEXT_1247);
4354
    stringBuffer.append(metaFeature.getFeatureAccessorName());
5326
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4355
    stringBuffer.append(TEXT_1007);
5327
    stringBuffer.append(TEXT_1248);
4356
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
5328
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.edit.command.SetCommand"));
4357
    stringBuffer.append(TEXT_1008);
5329
    stringBuffer.append(TEXT_1249);
4358
    
5330
    
4359
		}
5331
		}
4360
5332
4361
    
5333
    
4362
	}
5334
	}
4363
5335
4364
    stringBuffer.append(TEXT_1009);
5336
    stringBuffer.append(TEXT_1250);
4365
    
5337
    
4366
	}
5338
	}
4367
5339
4368
    stringBuffer.append(TEXT_1010);
5340
    stringBuffer.append(TEXT_1251);
4369
    
5341
    
4370
	if (palette != null) {
5342
	if (palette != null) {
4371
5343
4372
    stringBuffer.append(TEXT_1011);
5344
    stringBuffer.append(TEXT_1252);
4373
    stringBuffer.append(createCommandNameInfix);
5345
    stringBuffer.append(createCommandNameInfix);
4374
    stringBuffer.append(genLink.getVisualID());
5346
    stringBuffer.append(genLink.getVisualID());
4375
    stringBuffer.append(TEXT_1012);
5347
    stringBuffer.append(TEXT_1253);
4376
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
5348
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand"));
4377
    stringBuffer.append(TEXT_1013);
5349
    stringBuffer.append(TEXT_1254);
4378
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
5350
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4379
    stringBuffer.append(TEXT_1014);
5351
    stringBuffer.append(TEXT_1255);
4380
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
5352
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4381
    stringBuffer.append(TEXT_1015);
5353
    stringBuffer.append(TEXT_1256);
4382
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
5354
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge"));
4383
    stringBuffer.append(TEXT_1016);
5355
    stringBuffer.append(TEXT_1257);
4384
    stringBuffer.append(createCommandNameInfix);
5356
    stringBuffer.append(createCommandNameInfix);
4385
    stringBuffer.append(genLink.getVisualID());
5357
    stringBuffer.append(genLink.getVisualID());
4386
    stringBuffer.append(TEXT_1017);
5358
    stringBuffer.append(TEXT_1258);
4387
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
5359
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.lite.requests.CreateConnectionRequestEx"));
4388
    stringBuffer.append(TEXT_1018);
5360
    stringBuffer.append(TEXT_1259);
4389
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
5361
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4390
    stringBuffer.append(TEXT_1019);
5362
    stringBuffer.append(TEXT_1260);
4391
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
5363
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4392
    stringBuffer.append(TEXT_1020);
5364
    stringBuffer.append(TEXT_1261);
4393
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
5365
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4394
    stringBuffer.append(TEXT_1021);
5366
    stringBuffer.append(TEXT_1262);
4395
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
5367
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View"));
4396
    stringBuffer.append(TEXT_1022);
5368
    stringBuffer.append(TEXT_1263);
4397
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
5369
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand"));
4398
    stringBuffer.append(TEXT_1023);
5370
    stringBuffer.append(TEXT_1264);
4399
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
5371
    stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory"));
4400
    stringBuffer.append(TEXT_1024);
5372
    stringBuffer.append(TEXT_1265);
4401
    
5373
    
4402
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
5374
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4403
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
5375
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4404
			GenClass linkClass = modelFacet.getMetaClass();
5376
			GenClass linkClass = modelFacet.getMetaClass();
4405
5377
4406
    stringBuffer.append(TEXT_1025);
5378
    stringBuffer.append(TEXT_1266);
4407
    stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName())));
5379
    stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName())));
4408
    stringBuffer.append(TEXT_1026);
5380
    stringBuffer.append(TEXT_1267);
4409
    stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName()));
5381
    stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName()));
4410
    stringBuffer.append(TEXT_1027);
5382
    stringBuffer.append(TEXT_1268);
4411
    stringBuffer.append(linkClass.getClassifierAccessorName());
5383
    stringBuffer.append(linkClass.getClassifierAccessorName());
4412
    stringBuffer.append(TEXT_1028);
5384
    stringBuffer.append(TEXT_1269);
4413
    if (linkClass.isExternalInterface()) {
5385
    if (linkClass.isExternalInterface()) {
4414
    stringBuffer.append(TEXT_1029);
5386
    stringBuffer.append(TEXT_1270);
4415
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
5387
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4416
    stringBuffer.append(TEXT_1030);
5388
    stringBuffer.append(TEXT_1271);
4417
    }
5389
    }
4418
    stringBuffer.append(TEXT_1031);
5390
    stringBuffer.append(TEXT_1272);
4419
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
5391
    /*XXX: Class name DomainElementInitializer should be user-customizable*/
4420
    stringBuffer.append(TEXT_1032);
5392
    stringBuffer.append(TEXT_1273);
4421
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
5393
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer"));
4422
    stringBuffer.append(TEXT_1033);
5394
    stringBuffer.append(TEXT_1274);
4423
    stringBuffer.append(genLink.getUniqueIdentifier());
5395
    stringBuffer.append(genLink.getUniqueIdentifier());
4424
    stringBuffer.append(TEXT_1034);
5396
    stringBuffer.append(TEXT_1275);
4425
    if (linkClass.isExternalInterface()) {
5397
    if (linkClass.isExternalInterface()) {
4426
    stringBuffer.append(TEXT_1035);
5398
    stringBuffer.append(TEXT_1276);
4427
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
5399
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4428
    stringBuffer.append(TEXT_1036);
5400
    stringBuffer.append(TEXT_1277);
4429
    }
5401
    }
4430
    stringBuffer.append(TEXT_1037);
5402
    stringBuffer.append(TEXT_1278);
4431
    
5403
    
4432
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
5404
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4433
5405
4434
    stringBuffer.append(TEXT_1038);
5406
    stringBuffer.append(TEXT_1279);
4435
    
5407
    
4436
		}
5408
		}
4437
5409
4438
    stringBuffer.append(TEXT_1039);
5410
    stringBuffer.append(TEXT_1280);
4439
    stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName()));
5411
    stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName()));
4440
    stringBuffer.append(TEXT_1040);
5412
    stringBuffer.append(TEXT_1281);
4441
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
5413
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain"));
4442
    stringBuffer.append(TEXT_1041);
5414
    stringBuffer.append(TEXT_1282);
4443
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
5415
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil"));
4444
    stringBuffer.append(TEXT_1042);
5416
    stringBuffer.append(TEXT_1283);
4445
    
5417
    
4446
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
5418
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4447
5419
4448
    stringBuffer.append(TEXT_1043);
5420
    stringBuffer.append(TEXT_1284);
4449
    
5421
    
4450
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
5422
			TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet();
4451
			GenFeature sourceFeature = modelFacet.getSourceMetaFeature();
5423
			GenFeature sourceFeature = modelFacet.getSourceMetaFeature();
Lines 4472-4501 Link Here
4472
					}
5444
					}
4473
				}
5445
				}
4474
5446
4475
    stringBuffer.append(TEXT_1044);
5447
    stringBuffer.append(TEXT_1285);
4476
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
5448
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4477
    stringBuffer.append(TEXT_1045);
5449
    stringBuffer.append(TEXT_1286);
4478
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
5450
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName()));
4479
    stringBuffer.append(TEXT_1046);
5451
    stringBuffer.append(TEXT_1287);
4480
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
5452
    stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName());
4481
    stringBuffer.append(TEXT_1047);
5453
    stringBuffer.append(TEXT_1288);
4482
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
5454
    stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4483
    stringBuffer.append(TEXT_1048);
5455
    stringBuffer.append(TEXT_1289);
4484
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5456
    stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4485
    stringBuffer.append(TEXT_1049);
5457
    stringBuffer.append(TEXT_1290);
4486
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
5458
    stringBuffer.append(containmentFeature.getFeatureAccessorName());
4487
    stringBuffer.append(TEXT_1050);
5459
    stringBuffer.append(TEXT_1291);
4488
    
5460
    
4489
			}
5461
			}
4490
			if (addChild) {
5462
			if (addChild) {
4491
5463
4492
    stringBuffer.append(TEXT_1051);
5464
    stringBuffer.append(TEXT_1292);
4493
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
5465
    stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4494
    stringBuffer.append(TEXT_1052);
5466
    stringBuffer.append(TEXT_1293);
4495
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5467
    stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4496
    stringBuffer.append(TEXT_1053);
5468
    stringBuffer.append(TEXT_1294);
4497
    stringBuffer.append(childFeature.getFeatureAccessorName());
5469
    stringBuffer.append(childFeature.getFeatureAccessorName());
4498
    stringBuffer.append(TEXT_1054);
5470
    stringBuffer.append(TEXT_1295);
4499
    
5471
    
4500
			}
5472
			}
4501
			if (addSource) {
5473
			if (addSource) {
Lines 4505-4533 Link Here
4505
					String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;";
5477
					String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;";
4506
					GenClass _ownerGenClass = modelFacet.getMetaClass();
5478
					GenClass _ownerGenClass = modelFacet.getMetaClass();
4507
5479
4508
    stringBuffer.append(TEXT_1055);
5480
    stringBuffer.append(TEXT_1296);
4509
    
5481
    
4510
int upperBound = _feature.getEcoreFeature().getUpperBound();
5482
int upperBound = _feature.getEcoreFeature().getUpperBound();
4511
if (upperBound > 0) {
5483
if (upperBound > 0) {
4512
	if (upperBound == 1) {
5484
	if (upperBound == 1) {
4513
5485
4514
    stringBuffer.append(TEXT_1056);
5486
    stringBuffer.append(TEXT_1297);
4515
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
5487
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4516
    stringBuffer.append(TEXT_1057);
5488
    stringBuffer.append(TEXT_1298);
4517
    stringBuffer.append(_exceedsUpperBound);
5489
    stringBuffer.append(_exceedsUpperBound);
4518
    stringBuffer.append(TEXT_1058);
5490
    stringBuffer.append(TEXT_1299);
4519
    
5491
    
4520
	} else {
5492
	} else {
4521
5493
4522
    stringBuffer.append(TEXT_1059);
5494
    stringBuffer.append(TEXT_1300);
4523
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
5495
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4524
    stringBuffer.append(TEXT_1060);
5496
    stringBuffer.append(TEXT_1301);
4525
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
5497
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4526
    stringBuffer.append(TEXT_1061);
5498
    stringBuffer.append(TEXT_1302);
4527
    stringBuffer.append(_feature.getFeatureAccessorName());
5499
    stringBuffer.append(_feature.getFeatureAccessorName());
4528
    stringBuffer.append(TEXT_1062);
5500
    stringBuffer.append(TEXT_1303);
4529
    stringBuffer.append(_exceedsUpperBound);
5501
    stringBuffer.append(_exceedsUpperBound);
4530
    stringBuffer.append(TEXT_1063);
5502
    stringBuffer.append(TEXT_1304);
4531
    
5503
    
4532
	}
5504
	}
4533
}
5505
}
Lines 4535-4547 Link Here
4535
    
5507
    
4536
				}
5508
				}
4537
5509
4538
    stringBuffer.append(TEXT_1064);
5510
    stringBuffer.append(TEXT_1305);
4539
    stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
5511
    stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4540
    stringBuffer.append(TEXT_1065);
5512
    stringBuffer.append(TEXT_1306);
4541
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5513
    stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4542
    stringBuffer.append(TEXT_1066);
5514
    stringBuffer.append(TEXT_1307);
4543
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
5515
    stringBuffer.append(sourceFeature.getFeatureAccessorName());
4544
    stringBuffer.append(TEXT_1067);
5516
    stringBuffer.append(TEXT_1308);
4545
    
5517
    
4546
			}
5518
			}
4547
			if (addTarget) {
5519
			if (addTarget) {
Lines 4551-4579 Link Here
4551
					String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;";
5523
					String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;";
4552
					GenClass _ownerGenClass = modelFacet.getMetaClass();
5524
					GenClass _ownerGenClass = modelFacet.getMetaClass();
4553
5525
4554
    stringBuffer.append(TEXT_1068);
5526
    stringBuffer.append(TEXT_1309);
4555
    
5527
    
4556
int upperBound = _feature.getEcoreFeature().getUpperBound();
5528
int upperBound = _feature.getEcoreFeature().getUpperBound();
4557
if (upperBound > 0) {
5529
if (upperBound > 0) {
4558
	if (upperBound == 1) {
5530
	if (upperBound == 1) {
4559
5531
4560
    stringBuffer.append(TEXT_1069);
5532
    stringBuffer.append(TEXT_1310);
4561
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
5533
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, false);
4562
    stringBuffer.append(TEXT_1070);
5534
    stringBuffer.append(TEXT_1311);
4563
    stringBuffer.append(_exceedsUpperBound);
5535
    stringBuffer.append(_exceedsUpperBound);
4564
    stringBuffer.append(TEXT_1071);
5536
    stringBuffer.append(TEXT_1312);
4565
    
5537
    
4566
	} else {
5538
	} else {
4567
5539
4568
    stringBuffer.append(TEXT_1072);
5540
    stringBuffer.append(TEXT_1313);
4569
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
5541
    myFeatureGetAccessorHelper.appendFeatureValueGetter(_ownerInstance, _feature, _ownerGenClass, true);
4570
    stringBuffer.append(TEXT_1073);
5542
    stringBuffer.append(TEXT_1314);
4571
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
5543
    stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName()));
4572
    stringBuffer.append(TEXT_1074);
5544
    stringBuffer.append(TEXT_1315);
4573
    stringBuffer.append(_feature.getFeatureAccessorName());
5545
    stringBuffer.append(_feature.getFeatureAccessorName());
4574
    stringBuffer.append(TEXT_1075);
5546
    stringBuffer.append(TEXT_1316);
4575
    stringBuffer.append(_exceedsUpperBound);
5547
    stringBuffer.append(_exceedsUpperBound);
4576
    stringBuffer.append(TEXT_1076);
5548
    stringBuffer.append(TEXT_1317);
4577
    
5549
    
4578
	}
5550
	}
4579
}
5551
}
Lines 4581-4650 Link Here
4581
    
5553
    
4582
				}
5554
				}
4583
5555
4584
    stringBuffer.append(TEXT_1077);
5556
    stringBuffer.append(TEXT_1318);
4585
    stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
5557
    stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4586
    stringBuffer.append(TEXT_1078);
5558
    stringBuffer.append(TEXT_1319);
4587
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5559
    stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4588
    stringBuffer.append(TEXT_1079);
5560
    stringBuffer.append(TEXT_1320);
4589
    stringBuffer.append(targetFeature.getFeatureAccessorName());
5561
    stringBuffer.append(targetFeature.getFeatureAccessorName());
4590
    stringBuffer.append(TEXT_1080);
5562
    stringBuffer.append(TEXT_1321);
4591
    
5563
    
4592
			}
5564
			}
4593
5565
4594
    stringBuffer.append(TEXT_1081);
5566
    stringBuffer.append(TEXT_1322);
4595
    
5567
    
4596
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
5568
		} else if (genLink.getModelFacet() instanceof FeatureModelFacet) {
4597
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
5569
			GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature();
4598
5570
4599
    stringBuffer.append(TEXT_1082);
5571
    stringBuffer.append(TEXT_1323);
4600
    stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
5572
    stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand"));
4601
    stringBuffer.append(TEXT_1083);
5573
    stringBuffer.append(TEXT_1324);
4602
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
5574
    stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName()));
4603
    stringBuffer.append(TEXT_1084);
5575
    stringBuffer.append(TEXT_1325);
4604
    stringBuffer.append(metaFeature.getFeatureAccessorName());
5576
    stringBuffer.append(metaFeature.getFeatureAccessorName());
4605
    stringBuffer.append(TEXT_1085);
5577
    stringBuffer.append(TEXT_1326);
4606
    
5578
    
4607
		}
5579
		}
4608
5580
4609
    stringBuffer.append(TEXT_1086);
5581
    stringBuffer.append(TEXT_1327);
4610
    stringBuffer.append(TEXT_1087);
5582
    stringBuffer.append(TEXT_1328);
4611
    
5583
    
4612
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
5584
		if (genLink.getModelFacet() instanceof TypeLinkModelFacet) {
4613
5585
4614
    stringBuffer.append(TEXT_1088);
5586
    stringBuffer.append(TEXT_1329);
4615
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
5587
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4616
    stringBuffer.append(TEXT_1089);
5588
    stringBuffer.append(TEXT_1330);
4617
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
5589
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject"));
4618
    stringBuffer.append(TEXT_1090);
5590
    stringBuffer.append(TEXT_1331);
4619
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
5591
    stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass"));
4620
    stringBuffer.append(TEXT_1091);
5592
    stringBuffer.append(TEXT_1332);
4621
    
5593
    
4622
		}
5594
		}
4623
5595
4624
    stringBuffer.append(TEXT_1092);
5596
    stringBuffer.append(TEXT_1333);
4625
    
5597
    
4626
{
5598
{
4627
	String _source = "source.getElement()";
5599
	String _source = "source.getElement()";
4628
	String _target = "target.getElement()";
5600
	String _target = "target.getElement()";
4629
5601
4630
    stringBuffer.append(TEXT_1093);
5602
    stringBuffer.append(TEXT_1334);
4631
    
5603
    
4632
			if (linkConstraints != null) {
5604
			if (linkConstraints != null) {
4633
5605
4634
    stringBuffer.append(TEXT_1094);
5606
    stringBuffer.append(TEXT_1335);
4635
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
5607
    stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName());
4636
    stringBuffer.append(TEXT_1095);
5608
    stringBuffer.append(TEXT_1336);
4637
    stringBuffer.append(_source);
5609
    stringBuffer.append(_source);
4638
    stringBuffer.append(TEXT_1096);
5610
    stringBuffer.append(TEXT_1337);
4639
    stringBuffer.append(_target);
5611
    stringBuffer.append(_target);
4640
    stringBuffer.append(TEXT_1097);
5612
    stringBuffer.append(TEXT_1338);
4641
    
5613
    
4642
			}
5614
			}
4643
5615
4644
    
5616
    
4645
}	//local declarations for linkConstraints.jetinc
5617
}	//local declarations for linkConstraints.jetinc
4646
5618
4647
    stringBuffer.append(TEXT_1098);
5619
    stringBuffer.append(TEXT_1339);
4648
    
5620
    
4649
	}
5621
	}
4650
5622
Lines 4653-4674 Link Here
4653
if (genNode.getViewmap() instanceof InnerClassViewmap) {
5625
if (genNode.getViewmap() instanceof InnerClassViewmap) {
4654
	String classBody = ((InnerClassViewmap) genNode.getViewmap()).getClassBody();
5626
	String classBody = ((InnerClassViewmap) genNode.getViewmap()).getClassBody();
4655
5627
4656
    stringBuffer.append(TEXT_1099);
5628
    stringBuffer.append(TEXT_1340);
4657
    stringBuffer.append(classBody);
5629
    stringBuffer.append(classBody);
4658
    stringBuffer.append(TEXT_1100);
5630
    stringBuffer.append(TEXT_1341);
4659
    
5631
    
4660
if (classBody.indexOf("DPtoLP") != -1) {
5632
if (classBody.indexOf("DPtoLP") != -1) {
4661
5633
4662
    stringBuffer.append(TEXT_1101);
5634
    stringBuffer.append(TEXT_1342);
4663
    
5635
    
4664
}
5636
}
4665
5637
4666
    
5638
    
4667
}
5639
}
4668
5640
4669
    stringBuffer.append(TEXT_1102);
5641
    stringBuffer.append(TEXT_1343);
4670
    importManager.emitSortedImports();
5642
    importManager.emitSortedImports();
4671
    stringBuffer.append(TEXT_1103);
5643
    stringBuffer.append(TEXT_1344);
4672
    return stringBuffer.toString();
5644
    return stringBuffer.toString();
4673
  }
5645
  }
4674
}
5646
}
(-)templates/editor/VisualIDRegistry.javajet (-2 / +7 lines)
Lines 140-149 Link Here
140
		}
140
		}
141
		switch (containerVisualID) {
141
		switch (containerVisualID) {
142
<%
142
<%
143
Collection nodeContainers = new ArrayList(genDiagram.getCompartments());
143
List nodeContainers = genDiagram.getAllContainers();
144
nodeContainers.add(genDiagram);
145
for(Iterator it = nodeContainers.iterator(); it.hasNext(); ) {
144
for(Iterator it = nodeContainers.iterator(); it.hasNext(); ) {
146
	GenContainerBase nextContainer = (GenContainerBase) it.next();
145
	GenContainerBase nextContainer = (GenContainerBase) it.next();
146
	if (nextContainer.getContainedNodes().isEmpty()) {
147
		continue;
148
	}
147
%>
149
%>
148
		case <%=importManager.getImportedName(nextContainer.getEditPartQualifiedClassName())%>.VISUAL_ID:
150
		case <%=importManager.getImportedName(nextContainer.getEditPartQualifiedClassName())%>.VISUAL_ID:
149
<%
151
<%
Lines 246-251 Link Here
246
}
248
}
247
for (Iterator containers = nodeContainers.iterator(); containers.hasNext();) {
249
for (Iterator containers = nodeContainers.iterator(); containers.hasNext();) {
248
	GenContainerBase nextContainer = (GenContainerBase) containers.next();
250
	GenContainerBase nextContainer = (GenContainerBase) containers.next();
251
	if (nextContainer.getContainedNodes().isEmpty()) {
252
		continue;
253
	}
249
%>
254
%>
250
255
251
	/**
256
	/**
(-)templates/parts/changeConstraintCommand.jetinc (+41 lines)
Added Link Here
1
				final <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%> node = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")%>) child.getModel();
2
				<%=importManager.getImportedName("org.eclipse.emf.common.command.Command")%> emfCommand = new <%=importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")%>("Change node position/size") {
3
					private <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> moveDelta;
4
					private <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%> resizeDelta;
5
6
					public boolean canUndo() {
7
						return canExecute();
8
					}
9
					protected boolean prepare() {
10
						if (node.getLayoutConstraint() instanceof <%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")%> == false) {
11
							return false;
12
						}
13
						<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")%> bounds = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")%>) node.getLayoutConstraint();
14
						<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> original = new <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%>(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
15
						<%=importManager.getImportedName("org.eclipse.draw2d.IFigure")%> referenceFigure = ((<%=importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")%>)child).getFigure();
16
						referenceFigure.translateToAbsolute(original);
17
						<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")%> transformed = request.getTransformedRectangle(original);
18
						referenceFigure.translateToRelative(transformed);
19
						referenceFigure.translateToRelative(original);
20
						resizeDelta = transformed.getSize().expand(original.getSize().negate());
21
						moveDelta = transformed.getTopLeft().translate(original.getTopLeft().negate());
22
						return true;
23
					}
24
					public void undo() {
25
						execute(moveDelta.getNegated(), resizeDelta.getNegated());
26
					}
27
					public void execute() {
28
						execute(moveDelta, resizeDelta);
29
					}
30
					public void redo() {
31
						execute();
32
					}
33
					private void execute(<%=importManager.getImportedName("org.eclipse.draw2d.geometry.Point")%> move, <%=importManager.getImportedName("org.eclipse.draw2d.geometry.Dimension")%> resize) {
34
						<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")%> bounds = (<%=importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")%>) node.getLayoutConstraint();
35
						bounds.setX(bounds.getX() + move.x);
36
						bounds.setY(bounds.getY() + move.y);
37
						bounds.setWidth(bounds.getWidth() + resize.width);
38
						bounds.setHeight(bounds.getHeight() + resize.height);
39
					}
40
				};
41
				return new <%=importManager.getImportedName("org.eclipse.gmf.runtime.lite.commands.WrappingCommand")%>(<%=importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")%>.getEditingDomain(node.getDiagram().getElement()), emfCommand);
(-)src/org/eclipse/gmf/runtime/lite/edit/parts/update/canonical/ChildNotationModelRefresher.java (-3 / +5 lines)
Lines 40-48 Link Here
40
		final Map semanticToNotational = new HashMap();
40
		final Map semanticToNotational = new HashMap();
41
		for(Iterator it = notationalChildren.iterator(); it.hasNext(); ) {
41
		for(Iterator it = notationalChildren.iterator(); it.hasNext(); ) {
42
			View next = (View) it.next();
42
			View next = (View) it.next();
43
			EObject nextSemantic = next.getElement();
43
			if (next.isSetElement()) {
44
			if (nextSemantic != null) {
44
				EObject nextSemantic = next.getElement();
45
				semanticToNotational.put(nextSemantic, next);
45
				if (nextSemantic != null) {
46
					semanticToNotational.put(nextSemantic, next);
47
				}
46
			}
48
			}
47
		}
49
		}
48
		CompoundCommand command = new CompoundCommand();
50
		CompoundCommand command = new CompoundCommand();
(-)src/org/eclipse/gmf/tests/gef/DiagramNodeTest.java (-20 / +19 lines)
Lines 359-383 Link Here
359
	}
359
	}
360
	
360
	
361
361
362
// TODO: Uncomment this test once child nodes without compartments will be supposred in lite generator
362
	public void testCreateChildNodeNotWithinCompartment() {
363
//	public void testCreateChildNodeNotWithinCompartment() {
363
		assertTrue("Incorrect Setup: GenModel with only two nodes", getSetup().getGenModel().getGenDiagram().getTopLevelNodes().size() > 2);
364
//		assertTrue("Incorrect Setup: GenModel with only two nodes", getSetup().getGenModel().getGenDiagram().getTopLevelNodes().size() > 2);
364
		GenNode genNodeC = (GenNode) getSetup().getGenModel().getGenDiagram().getTopLevelNodes().get(2);
365
//		GenNode genNodeC = (GenNode) getSetup().getGenModel().getGenDiagram().getTopLevelNodes().get(2);
365
		assertFalse("Incorrect Setup: passed node has compartments", genNodeC.getCompartments().size() > 0);
366
//		assertFalse("Incorrect Setup: passed node has compartments", genNodeC.getCompartments().size() > 0);
366
		assertTrue("Incorrect Setup: passed node has no children", genNodeC.getChildNodes().size() > 0);
367
//		assertTrue("Incorrect Setup: passed node has no children", genNodeC.getChildNodes().size() > 0);
367
368
//
368
		GenNode genChildNode = (GenNode) genNodeC.getChildNodes().get(0);
369
//		GenNode genChildNode = (GenNode) genNodeC.getChildNodes().get(0);
369
370
//
370
		Node topLevelNode = createNode(genNodeC, getDiagram());
371
//		Node topLevelNode = createNode(genNodeC, getDiagram());
371
		assertNotNull("Top level node was not created", topLevelNode);
372
//		assertNotNull("Top level node was not created", topLevelNode);
372
		assertTrue("Incorrect number of top-level node children was created", genNodeC.getLabels().size() == topLevelNode.getChildren().size());
373
//		assertTrue("Incorrect number of top-level node children was created", genNodeC.getLabels().size() == topLevelNode.getChildren().size());
373
		for (Iterator it = genNodeC.getLabels().iterator(); it.hasNext();) {
374
//		for (Iterator it = genNodeC.getLabels().iterator(); it.hasNext();) {
374
			GenNodeLabel nextLabel = (GenNodeLabel) it.next();
375
//			GenNodeLabel nextLabel = (GenNodeLabel) it.next();
375
			assertNotNull("Notation model element was not created for label: " + nextLabel.getVisualID(), findChildView(topLevelNode, nextLabel));
376
//			assertNotNull("Notation model element was not created for label: " + nextLabel.getVisualID(), findChildView(topLevelNode, nextLabel));
376
		}
377
//		}
377
		
378
//		
378
		Node childNode = createNode(genChildNode, topLevelNode);
379
//		Node childNode = createNode(genChildNode, topLevelNode);
379
		assertNotNull("Child node without compartment was not created", childNode);
380
//		assertNotNull("Child node without compartment was not created", childNode);
380
	}
381
//	}
382
	
381
	
383
}
382
}
(-)src/org/eclipse/gmf/tests/lite/gef/NotationRefreshTest.java (+22 lines)
Lines 20-25 Link Here
20
import org.eclipse.emf.common.command.Command;
20
import org.eclipse.emf.common.command.Command;
21
import org.eclipse.emf.common.util.BasicEList;
21
import org.eclipse.emf.common.util.BasicEList;
22
import org.eclipse.emf.ecore.EClass;
22
import org.eclipse.emf.ecore.EClass;
23
import org.eclipse.emf.ecore.EClassifier;
23
import org.eclipse.emf.ecore.EObject;
24
import org.eclipse.emf.ecore.EObject;
24
import org.eclipse.emf.ecore.EStructuralFeature;
25
import org.eclipse.emf.ecore.EStructuralFeature;
25
import org.eclipse.emf.edit.command.AddCommand;
26
import org.eclipse.emf.edit.command.AddCommand;
Lines 79-84 Link Here
79
		assertNotNull("EditPart not created automatically", newChildEP);
80
		assertNotNull("EditPart not created automatically", newChildEP);
80
	}
81
	}
81
82
83
	public void testNotationRefreshOnCreateDirectChildNode() throws Exception {
84
		EditPart diagramEP = getDiagramEditPart();
85
		Diagram diagram = (Diagram) diagramEP.getModel();
86
		EObject diagramElement = diagram.getElement();
87
		TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(diagramElement);
88
		Node nodeB = getCanvasInstance().getNodeB();
89
		EObject elementB = nodeB.getElement();
90
		EStructuralFeature directNodeFeature = elementB.eClass().getEStructuralFeature("chapters");
91
		assertNotNull("Child feature not found", directNodeFeature);
92
		EClass chapterClass = (EClass) directNodeFeature.getEType();
93
		EObject chapter = chapterClass.getEPackage().getEFactoryInstance().create(chapterClass);
94
		Command command = AddCommand.create(editingDomain, elementB, directNodeFeature, chapter);
95
		assertTrue("Failed to obtain command to create a new instance of the domain model element", command != null && command.canExecute());
96
		new EMFCommandOperation(editingDomain, command).execute(new NullProgressMonitor(), null);
97
		assertSame("AddCommand not executed properly", elementB, chapter.eContainer());
98
		View newChildView = findView(nodeB, chapter);
99
		assertNotNull("Notational refresh failed on domain element creation", newChildView);
100
		EditPart newChildEP = findEditPart(newChildView);
101
		assertNotNull("EditPart not created automatically", newChildEP);
102
	}
103
82
	public void testNotationRefreshOnAttributeChangeThatAffectsSelector() throws Exception {
104
	public void testNotationRefreshOnAttributeChangeThatAffectsSelector() throws Exception {
83
		EditPart diagramEP = getDiagramEditPart();
105
		EditPart diagramEP = getDiagramEditPart();
84
		Diagram diagram = (Diagram) diagramEP.getModel();
106
		Diagram diagram = (Diagram) diagramEP.getModel();
(-)models/library/library_constrained.gmfgen (-4 / +79 lines)
Lines 56-61 Link Here
56
    </childNodes>
56
    </childNodes>
57
    <childNodes
57
    <childNodes
58
        xsi:type="gmfgen:GenChildLabelNode"
58
        xsi:type="gmfgen:GenChildLabelNode"
59
        visualID="3003"
60
        editPartClassName="ChapterEditPart"
61
        itemSemanticEditPolicyClassName="ChapterItemSemanticEditPolicy"
62
        notationViewFactoryClassName="ChapterViewFactory"
63
        canonicalEditPolicyClassName="ChapterCanonicalEditPolicy"
64
        graphicalNodeEditPolicyClassName="ChapterGraphicalNodeEditPolicy"
65
        containers="//@diagram/@topLevelNodes.1"
66
        labelElementIcon="true">
67
      <diagramRunTimeClass
68
          href="../../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
69
      <elementType
70
          xsi:type="gmfgen:MetamodelType"
71
          editHelperClassName="ChapterEditHelper"/>
72
      <viewmap
73
          xsi:type="gmfgen:FigureViewmap"
74
          figureQualifiedClassName="org.eclipse.draw2d.Label">
75
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
76
      </viewmap>
77
      <modelFacet>
78
        <metaClass
79
            href="library.genmodel#//library/Chapter"/>
80
        <containmentMetaFeature
81
            href="library.genmodel#//library/Book/chapters"/>
82
        <childMetaFeature
83
            href="library.genmodel#//library/Book/chapters"/>
84
      </modelFacet>
85
      <labelModelFacet
86
          xsi:type="gmfgen:FeatureLabelModelFacet"
87
          viewPattern="Chapter: {0}"
88
          editPattern="{0}">
89
        <metaFeature
90
            href="library.genmodel#//library/Chapter/name"/>
91
      </labelModelFacet>
92
    </childNodes>
93
    <childNodes
94
        xsi:type="gmfgen:GenChildLabelNode"
59
        visualID="3002"
95
        visualID="3002"
60
        editPartClassName="Review2EditPart"
96
        editPartClassName="Review2EditPart"
61
        itemSemanticEditPolicyClassName="Review2ItemSemanticEditPolicy"
97
        itemSemanticEditPolicyClassName="Review2ItemSemanticEditPolicy"
Lines 89-94 Link Here
89
            href="library.genmodel#//library/Review/title"/>
125
            href="library.genmodel#//library/Review/title"/>
90
      </labelModelFacet>
126
      </labelModelFacet>
91
    </childNodes>
127
    </childNodes>
128
    <childNodes
129
        xsi:type="gmfgen:GenChildLabelNode"
130
        visualID="3004"
131
        editPartClassName="Chapter2EditPart"
132
        itemSemanticEditPolicyClassName="Chapter2ItemSemanticEditPolicy"
133
        notationViewFactoryClassName="Chapter2ViewFactory"
134
        canonicalEditPolicyClassName="Chapter2CanonicalEditPolicy"
135
        graphicalNodeEditPolicyClassName="Chapter2GraphicalNodeEditPolicy"
136
        containers="//@diagram/@topLevelNodes.2"
137
        labelElementIcon="true">
138
      <diagramRunTimeClass
139
          href="../../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
140
      <elementType
141
          xsi:type="gmfgen:SpecializationType"
142
          metamodelType="//@diagram/@childNodes.1/@elementType"
143
          editHelperAdviceClassName="ChapterEditHelperAdvice"/>
144
      <viewmap
145
          xsi:type="gmfgen:FigureViewmap"
146
          figureQualifiedClassName="org.eclipse.draw2d.Label">
147
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
148
      </viewmap>
149
      <modelFacet>
150
        <metaClass
151
            href="library.genmodel#//library/Chapter"/>
152
        <containmentMetaFeature
153
            href="library.genmodel#//library/Book/chapters"/>
154
        <childMetaFeature
155
            href="library.genmodel#//library/Book/chapters"/>
156
      </modelFacet>
157
      <labelModelFacet
158
          xsi:type="gmfgen:FeatureLabelModelFacet"
159
          viewPattern="{0}"
160
          editPattern="{0}">
161
        <metaFeature
162
            href="library.genmodel#//library/Chapter/name"/>
163
      </labelModelFacet>
164
    </childNodes>
92
    <topLevelNodes
165
    <topLevelNodes
93
        visualID="2001"
166
        visualID="2001"
94
        editPartClassName="WriterEditPart"
167
        editPartClassName="WriterEditPart"
Lines 105-111 Link Here
105
          xsi:type="gmfgen:InnerClassViewmap"
178
          xsi:type="gmfgen:InnerClassViewmap"
106
          layoutType="TOOLBAR_LAYOUT"
179
          layoutType="TOOLBAR_LAYOUT"
107
          className="NamedNodeRectangle"
180
          className="NamedNodeRectangle"
108
          classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class NamedNodeRectangle extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public NamedNodeRectangle() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.ToolbarLayout myGenLayoutManager = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;myGenLayoutManager.setStretchMinorAxis(true);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER);&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setSpacing(0);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(myGenLayoutManager);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;setFigureNamedNode_NameLabelFigure(fig_0);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;Object layData0 = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.add(fig_0, layData0);&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.Label fNamedNode_NameLabelFigure; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.Label getFigureNamedNode_NameLabelFigure() {&#xD;&#xA;&#x9;&#x9;return fNamedNode_NameLabelFigure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void setFigureNamedNode_NameLabelFigure(org.eclipse.draw2d.Label fig){&#xD;&#xA;&#x9;&#x9;fNamedNode_NameLabelFigure = fig;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#x9;&#xD;&#xA;">
181
          classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class NamedNodeRectangle extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public NamedNodeRectangle() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.ToolbarLayout myGenLayoutManager = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;myGenLayoutManager.setStretchMinorAxis(true);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER);&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setSpacing(0);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(myGenLayoutManager);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;setFigureNamedNode_NameLabelFigure(fig_0);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;Object layData0 = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.add(fig_0, layData0);&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.Label fNamedNode_NameLabelFigure; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.Label getFigureNamedNode_NameLabelFigure() {&#xD;&#xA;&#x9;&#x9;return fNamedNode_NameLabelFigure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void setFigureNamedNode_NameLabelFigure(org.eclipse.draw2d.Label fig){&#xD;&#xA;&#x9;&#x9;fNamedNode_NameLabelFigure = fig;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#x9;&#xD;&#xA;">
109
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
182
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
110
      </viewmap>
183
      </viewmap>
111
      <modelFacet>
184
      <modelFacet>
Lines 140-145 Link Here
140
        editPartClassName="BookEditPart"
213
        editPartClassName="BookEditPart"
141
        itemSemanticEditPolicyClassName="BookItemSemanticEditPolicy"
214
        itemSemanticEditPolicyClassName="BookItemSemanticEditPolicy"
142
        notationViewFactoryClassName="BookViewFactory"
215
        notationViewFactoryClassName="BookViewFactory"
216
        childNodes="//@diagram/@childNodes.1"
143
        canonicalEditPolicyClassName="BookCanonicalEditPolicy"
217
        canonicalEditPolicyClassName="BookCanonicalEditPolicy"
144
        compartments="//@diagram/@compartments.0"
218
        compartments="//@diagram/@compartments.0"
145
        graphicalNodeEditPolicyClassName="BookGraphicalNodeEditPolicy">
219
        graphicalNodeEditPolicyClassName="BookGraphicalNodeEditPolicy">
Lines 152-158 Link Here
152
          xsi:type="gmfgen:InnerClassViewmap"
226
          xsi:type="gmfgen:InnerClassViewmap"
153
          layoutType="TOOLBAR_LAYOUT"
227
          layoutType="TOOLBAR_LAYOUT"
154
          className="NamedNodeRectangle"
228
          className="NamedNodeRectangle"
155
          classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class NamedNodeRectangle extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public NamedNodeRectangle() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.ToolbarLayout myGenLayoutManager = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;myGenLayoutManager.setStretchMinorAxis(true);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER);&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setSpacing(0);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(myGenLayoutManager);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;setFigureNamedNode_NameLabelFigure(fig_0);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;Object layData0 = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.add(fig_0, layData0);&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.Label fNamedNode_NameLabelFigure; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.Label getFigureNamedNode_NameLabelFigure() {&#xD;&#xA;&#x9;&#x9;return fNamedNode_NameLabelFigure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void setFigureNamedNode_NameLabelFigure(org.eclipse.draw2d.Label fig){&#xD;&#xA;&#x9;&#x9;fNamedNode_NameLabelFigure = fig;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#x9;&#xD;&#xA;">
229
          classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class NamedNodeRectangle extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public NamedNodeRectangle() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.ToolbarLayout myGenLayoutManager = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;myGenLayoutManager.setStretchMinorAxis(true);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER);&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setSpacing(0);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(myGenLayoutManager);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;setFigureNamedNode_NameLabelFigure(fig_0);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;Object layData0 = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.add(fig_0, layData0);&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.Label fNamedNode_NameLabelFigure; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.Label getFigureNamedNode_NameLabelFigure() {&#xD;&#xA;&#x9;&#x9;return fNamedNode_NameLabelFigure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void setFigureNamedNode_NameLabelFigure(org.eclipse.draw2d.Label fig){&#xD;&#xA;&#x9;&#x9;fNamedNode_NameLabelFigure = fig;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#x9;&#xD;&#xA;">
156
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
230
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
157
      </viewmap>
231
      </viewmap>
158
      <modelFacet>
232
      <modelFacet>
Lines 189-194 Link Here
189
        editPartClassName="Book2EditPart"
263
        editPartClassName="Book2EditPart"
190
        itemSemanticEditPolicyClassName="Book2ItemSemanticEditPolicy"
264
        itemSemanticEditPolicyClassName="Book2ItemSemanticEditPolicy"
191
        notationViewFactoryClassName="Book2ViewFactory"
265
        notationViewFactoryClassName="Book2ViewFactory"
266
        childNodes="//@diagram/@childNodes.3"
192
        canonicalEditPolicyClassName="Book2CanonicalEditPolicy"
267
        canonicalEditPolicyClassName="Book2CanonicalEditPolicy"
193
        compartments="//@diagram/@compartments.1"
268
        compartments="//@diagram/@compartments.1"
194
        graphicalNodeEditPolicyClassName="Book2GraphicalNodeEditPolicy">
269
        graphicalNodeEditPolicyClassName="Book2GraphicalNodeEditPolicy">
Lines 202-208 Link Here
202
          xsi:type="gmfgen:InnerClassViewmap"
277
          xsi:type="gmfgen:InnerClassViewmap"
203
          layoutType="TOOLBAR_LAYOUT"
278
          layoutType="TOOLBAR_LAYOUT"
204
          className="NamedNodeRectangle"
279
          className="NamedNodeRectangle"
205
          classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class NamedNodeRectangle extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public NamedNodeRectangle() {&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.ToolbarLayout myGenLayoutManager = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;myGenLayoutManager.setStretchMinorAxis(true);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER);&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setSpacing(0);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(myGenLayoutManager);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;setFigureNamedNode_NameLabelFigure(fig_0);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;Object layData0 = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.add(fig_0, layData0);&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.Label fNamedNode_NameLabelFigure; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.Label getFigureNamedNode_NameLabelFigure() {&#xD;&#xA;&#x9;&#x9;return fNamedNode_NameLabelFigure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void setFigureNamedNode_NameLabelFigure(org.eclipse.draw2d.Label fig){&#xD;&#xA;&#x9;&#x9;fNamedNode_NameLabelFigure = fig;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#x9;&#xD;&#xA;">
280
          classBody="&#xD;&#xA;&#xD;&#xA;/**&#xD;&#xA; * @generated&#xD;&#xA; */&#xD;&#xA;public class NamedNodeRectangle extends org.eclipse.draw2d.RectangleFigure {&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public NamedNodeRectangle() {&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.ToolbarLayout myGenLayoutManager = new org.eclipse.draw2d.ToolbarLayout();&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;myGenLayoutManager.setStretchMinorAxis(true);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setMinorAlignment(org.eclipse.draw2d.ToolbarLayout.ALIGN_CENTER);&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setSpacing(0);&#xD;&#xA;&#x9;&#x9;myGenLayoutManager.setVertical(true);&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;this.setLayoutManager(myGenLayoutManager);&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;createContents();&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void createContents(){&#xD;&#xA;&#x9;&#x9;org.eclipse.draw2d.Label fig_0 = new org.eclipse.draw2d.Label();&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;setFigureNamedNode_NameLabelFigure(fig_0);&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;&#x9;Object layData0 = null;&#xD;&#xA;&#xD;&#xA;&#x9;&#x9;this.add(fig_0, layData0);&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private org.eclipse.draw2d.Label fNamedNode_NameLabelFigure; &#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;public org.eclipse.draw2d.Label getFigureNamedNode_NameLabelFigure() {&#xD;&#xA;&#x9;&#x9;return fNamedNode_NameLabelFigure;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private void setFigureNamedNode_NameLabelFigure(org.eclipse.draw2d.Label fig){&#xD;&#xA;&#x9;&#x9;fNamedNode_NameLabelFigure = fig;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;private boolean myUseLocalCoordinates = false;&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected boolean useLocalCoordinates() {&#xD;&#xA;&#x9;&#x9;return myUseLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#xD;&#xA;&#x9;/**&#xD;&#xA;&#x9; * @generated&#xD;&#xA;&#x9; */&#xD;&#xA;&#x9;protected void setUseLocalCoordinates(boolean useLocalCoordinates) {&#xD;&#xA;&#x9;&#x9;myUseLocalCoordinates = useLocalCoordinates;&#xD;&#xA;&#x9;}&#xD;&#xA;&#x9;&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#x9;&#xD;&#xA;">
206
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
281
        <requiredPluginIDs>org.eclipse.draw2d</requiredPluginIDs>
207
      </viewmap>
282
      </viewmap>
208
      <modelFacet>
283
      <modelFacet>
Lines 382-388 Link Here
382
        editPartClassName="BookCompartment2EditPart"
457
        editPartClassName="BookCompartment2EditPart"
383
        itemSemanticEditPolicyClassName="BookCompartment2ItemSemanticEditPolicy"
458
        itemSemanticEditPolicyClassName="BookCompartment2ItemSemanticEditPolicy"
384
        notationViewFactoryClassName="BookCompartment2ViewFactory"
459
        notationViewFactoryClassName="BookCompartment2ViewFactory"
385
        childNodes="//@diagram/@childNodes.1"
460
        childNodes="//@diagram/@childNodes.2"
386
        canonicalEditPolicyClassName="BookCompartment2CanonicalEditPolicy"
461
        canonicalEditPolicyClassName="BookCompartment2CanonicalEditPolicy"
387
        title="Compartment"
462
        title="Compartment"
388
        node="//@diagram/@topLevelNodes.2">
463
        node="//@diagram/@topLevelNodes.2">
(-)models/library/library.ecore (+8 lines)
Lines 39-44 Link Here
39
    </eStructuralFeatures>
39
    </eStructuralFeatures>
40
    <eStructuralFeatures xsi:type="ecore:EReference" name="reviews" upperBound="-1"
40
    <eStructuralFeatures xsi:type="ecore:EReference" name="reviews" upperBound="-1"
41
        eType="#//Review" containment="true" eOpposite="#//Review/book"/>
41
        eType="#//Review" containment="true" eOpposite="#//Review/book"/>
42
    <eStructuralFeatures xsi:type="ecore:EReference" name="chapters" upperBound="-1"
43
        eType="#//Chapter" containment="true"/>
42
  </eClassifiers>
44
  </eClassifiers>
43
  <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
45
  <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
44
    <eLiterals name="Mystery"/>
46
    <eLiterals name="Mystery"/>
Lines 65-68 Link Here
65
        eType="#//Writer" eOpposite="#//Writer/opinions"/>
67
        eType="#//Writer" eOpposite="#//Writer/opinions"/>
66
    <eStructuralFeatures xsi:type="ecore:EReference" name="book" lowerBound="1" eType="#//Book"/>
68
    <eStructuralFeatures xsi:type="ecore:EReference" name="book" lowerBound="1" eType="#//Book"/>
67
  </eClassifiers>
69
  </eClassifiers>
70
  <eClassifiers xsi:type="ecore:EClass" name="Chapter">
71
    <eAnnotations source="http:///org/eclipse/example/library.ecore">
72
      <details key="note" value="Should be modeled as direct child of book without compartments"/>
73
    </eAnnotations>
74
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
75
  </eClassifiers>
68
</ecore:EPackage>
76
</ecore:EPackage>
(-)models/library/library_constrained.gmfmap (+36 lines)
Lines 53-58 Link Here
53
              href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
53
              href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
54
        </ownedChild>
54
        </ownedChild>
55
      </children>
55
      </children>
56
      <children>
57
        <containmentFeature
58
            href="library.ecore#//Book/chapters"/>
59
        <ownedChild>
60
          <domainMetaElement
61
              href="library.ecore#//Chapter"/>
62
          <labelMappings
63
              viewPattern="Chapter: {0}"
64
              editPattern="{0}">
65
            <diagramLabel
66
                href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
67
            <features
68
                href="library.ecore#//Chapter/name"/>
69
          </labelMappings>
70
          <diagramNode
71
              href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
72
        </ownedChild>
73
      </children>
56
      <compartments
74
      <compartments
57
          children="//@nodes.1/@ownedChild/@children.0">
75
          children="//@nodes.1/@ownedChild/@children.0">
58
        <compartment
76
        <compartment
Lines 93-98 Link Here
93
              href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
111
              href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
94
        </ownedChild>
112
        </ownedChild>
95
      </children>
113
      </children>
114
      <children>
115
        <containmentFeature
116
            href="library.ecore#//Book/chapters"/>
117
        <ownedChild>
118
          <domainMetaElement
119
              href="library.ecore#//Chapter"/>
120
          <labelMappings
121
              viewPattern="{0}"
122
              editPattern="{0}">
123
            <diagramLabel
124
                href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
125
            <features
126
                href="library.ecore#//Chapter/name"/>
127
          </labelMappings>
128
          <diagramNode
129
              href="../../../../plugin/org.eclipse.gmf.graphdef/models/basic.gmfgraph#Label"/>
130
        </ownedChild>
131
      </children>
96
      <compartments
132
      <compartments
97
          children="//@nodes.2/@ownedChild/@children.0">
133
          children="//@nodes.2/@ownedChild/@children.0">
98
        <compartment
134
        <compartment
(-)models/library/library.genmodel (-11 / +14 lines)
Lines 1-10 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<genmodel:GenModel xmi:version="2.0"
2
<genmodel:GenModel xmi:version="2.0"
3
    xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
3
    xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
4
    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/library_constrained/src"
4
    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/library/src"
5
    editDirectory="/library_constrained.edit/src" editorDirectory="/library_constrained.editor/src"
5
    modelPluginID="library" modelName="Library" importerID="org.eclipse.emf.importer.ecore">
6
    modelPluginID="library_constrained" modelName="Library" importerID="org.eclipse.emf.importer.rose">
6
  <foreignModel>library.ecore</foreignModel>
7
  <foreignModel>C:\library.mdl</foreignModel>
8
  <genPackages prefix="Library" basePackage="org.eclipse.example" disposableProviderFactory="true"
7
  <genPackages prefix="Library" basePackage="org.eclipse.example" disposableProviderFactory="true"
9
      ecorePackage="library.ecore#/">
8
      ecorePackage="library.ecore#/">
10
    <genEnums ecoreEnum="library.ecore#//BookCategory">
9
    <genEnums ecoreEnum="library.ecore#//BookCategory">
Lines 12-24 Link Here
12
      <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/ScienceFiction"/>
11
      <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/ScienceFiction"/>
13
      <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Biography"/>
12
      <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Biography"/>
14
    </genEnums>
13
    </genEnums>
15
    <genClasses ecoreClass="library.ecore#//Book">
16
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/title"/>
17
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/pages"/>
18
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/category"/>
19
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Book/author"/>
20
      <genFeatures children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Book/reviews"/>
21
    </genClasses>
22
    <genClasses ecoreClass="library.ecore#//Library">
14
    <genClasses ecoreClass="library.ecore#//Library">
23
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/name"/>
15
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/name"/>
24
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/writers"/>
16
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/writers"/>
Lines 29-34 Link Here
29
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Writer/books"/>
21
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Writer/books"/>
30
      <genFeatures children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Writer/opinions"/>
22
      <genFeatures children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Writer/opinions"/>
31
    </genClasses>
23
    </genClasses>
24
    <genClasses ecoreClass="library.ecore#//Book">
25
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/title"/>
26
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/pages"/>
27
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/category"/>
28
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Book/author"/>
29
      <genFeatures children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Book/reviews"/>
30
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Book/chapters"/>
31
    </genClasses>
32
    <genClasses ecoreClass="library.ecore#//Review">
32
    <genClasses ecoreClass="library.ecore#//Review">
33
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Review/title"/>
33
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Review/title"/>
34
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Review/positive"/>
34
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Review/positive"/>
Lines 40-44 Link Here
40
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Opinion/writer"/>
40
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Opinion/writer"/>
41
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Opinion/book"/>
41
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Opinion/book"/>
42
    </genClasses>
42
    </genClasses>
43
    <genClasses ecoreClass="library.ecore#//Chapter">
44
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Chapter/name"/>
45
    </genClasses>
43
  </genPackages>
46
  </genPackages>
44
</genmodel:GenModel>
47
</genmodel:GenModel>

Return to bug 155955