Lines 34-90
Link Here
|
34 |
protected final String TEXT_15 = NL + "\t\t\tsemanticHint = "; |
34 |
protected final String TEXT_15 = NL + "\t\t\tsemanticHint = "; |
35 |
protected final String TEXT_16 = ".getType("; |
35 |
protected final String TEXT_16 = ".getType("; |
36 |
protected final String TEXT_17 = ".VISUAL_ID);" + NL + "\t\t\tview.setType(semanticHint);" + NL + "\t\t}"; |
36 |
protected final String TEXT_17 = ".VISUAL_ID);" + NL + "\t\t\tview.setType(semanticHint);" + NL + "\t\t}"; |
37 |
protected final String TEXT_18 = NL + "\t\tsuper.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);" + NL + "\t\tif (!"; |
37 |
protected final String TEXT_18 = NL + "\t\tsuper.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);"; |
38 |
protected final String TEXT_19 = ".MODEL_ID.equals("; |
38 |
protected final String TEXT_19 = NL + "\t\tsetupCompartmentTitle(view);" + NL + "\t\tsetupCompartmentCollapsed(view);"; |
39 |
protected final String TEXT_20 = ".getModelID(containerView))) {" + NL + "\t\t\t"; |
39 |
protected final String TEXT_20 = "\t\t" + NL + "\t\tif (!"; |
40 |
protected final String TEXT_21 = " shortcutAnnotation = "; |
40 |
protected final String TEXT_21 = ".MODEL_ID.equals("; |
41 |
protected final String TEXT_22 = ".eINSTANCE.createEAnnotation();" + NL + "\t\t\tshortcutAnnotation.setSource(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\t\tshortcutAnnotation.getDetails().put(\"modelID\", "; |
41 |
protected final String TEXT_22 = ".getModelID(containerView))) {" + NL + "\t\t\t"; |
42 |
protected final String TEXT_23 = ".MODEL_ID); //$NON-NLS-1$" + NL + "\t\t\tview.getEAnnotations().add(shortcutAnnotation);" + NL + "\t\t}"; |
42 |
protected final String TEXT_23 = " shortcutAnnotation = "; |
43 |
protected final String TEXT_24 = NL + "\t\t"; |
43 |
protected final String TEXT_24 = ".eINSTANCE.createEAnnotation();" + NL + "\t\t\tshortcutAnnotation.setSource(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\t\tshortcutAnnotation.getDetails().put(\"modelID\", "; |
44 |
protected final String TEXT_25 = ".setStructuralFeatureValue(view, "; |
44 |
protected final String TEXT_25 = ".MODEL_ID); //$NON-NLS-1$" + NL + "\t\t\tview.getEAnnotations().add(shortcutAnnotation);" + NL + "\t\t}"; |
45 |
protected final String TEXT_26 = ".eINSTANCE.getLineStyle_LineColor()," + NL + "\t\t\t"; |
45 |
protected final String TEXT_26 = NL + "\t\t"; |
46 |
protected final String TEXT_27 = ".colorToInteger("; |
46 |
protected final String TEXT_27 = ".setStructuralFeatureValue(view, "; |
47 |
protected final String TEXT_28 = "."; |
47 |
protected final String TEXT_28 = ".eINSTANCE.getLineStyle_LineColor()," + NL + "\t\t\t"; |
48 |
protected final String TEXT_29 = "));"; |
48 |
protected final String TEXT_29 = ".colorToInteger("; |
49 |
protected final String TEXT_30 = NL + "\t\t"; |
49 |
protected final String TEXT_30 = "."; |
50 |
protected final String TEXT_31 = ".setStructuralFeatureValue(view, "; |
50 |
protected final String TEXT_31 = "));"; |
51 |
protected final String TEXT_32 = ".eINSTANCE.getFillStyle_FillColor()," + NL + "\t\t\t"; |
51 |
protected final String TEXT_32 = NL + "\t\t"; |
52 |
protected final String TEXT_33 = ".colorToInteger("; |
52 |
protected final String TEXT_33 = ".setStructuralFeatureValue(view, "; |
53 |
protected final String TEXT_34 = "."; |
53 |
protected final String TEXT_34 = ".eINSTANCE.getFillStyle_FillColor()," + NL + "\t\t\t"; |
54 |
protected final String TEXT_35 = "));"; |
54 |
protected final String TEXT_35 = ".colorToInteger("; |
55 |
protected final String TEXT_36 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, "; |
55 |
protected final String TEXT_36 = "."; |
56 |
protected final String TEXT_37 = ".getType("; |
56 |
protected final String TEXT_37 = "));"; |
57 |
protected final String TEXT_38 = ".VISUAL_ID)," + NL + "\t\t\t"; |
57 |
protected final String TEXT_38 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, "; |
58 |
protected final String TEXT_39 = ".APPEND, true, getPreferencesHint());"; |
58 |
protected final String TEXT_39 = ".getType("; |
59 |
protected final String TEXT_40 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, "; |
59 |
protected final String TEXT_40 = ".VISUAL_ID)," + NL + "\t\t\t"; |
60 |
protected final String TEXT_41 = ".getType("; |
60 |
protected final String TEXT_41 = ".APPEND, true, getPreferencesHint());"; |
61 |
protected final String TEXT_42 = ".VISUAL_ID)," + NL + "\t\t\t"; |
61 |
protected final String TEXT_42 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, "; |
62 |
protected final String TEXT_43 = ".APPEND, true, getPreferencesHint());"; |
62 |
protected final String TEXT_43 = ".getType("; |
63 |
protected final String TEXT_44 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, "; |
63 |
protected final String TEXT_44 = ".VISUAL_ID)," + NL + "\t\t\t"; |
64 |
protected final String TEXT_45 = ".getType("; |
64 |
protected final String TEXT_45 = ".APPEND, true, getPreferencesHint());"; |
65 |
protected final String TEXT_46 = ".VISUAL_ID)," + NL + "\t\t\t"; |
65 |
protected final String TEXT_46 = NL + "\t\tgetViewService().createNode(semanticAdapter, view, "; |
66 |
protected final String TEXT_47 = ".APPEND, true, getPreferencesHint());"; |
66 |
protected final String TEXT_47 = ".getType("; |
67 |
protected final String TEXT_48 = NL + "\t}"; |
67 |
protected final String TEXT_48 = ".VISUAL_ID)," + NL + "\t\t\t"; |
68 |
protected final String TEXT_49 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
68 |
protected final String TEXT_49 = ".APPEND, true, getPreferencesHint());"; |
69 |
protected final String TEXT_50 = " createStyles(View view) {" + NL + "\t\t"; |
69 |
protected final String TEXT_50 = NL + "\t}"; |
70 |
protected final String TEXT_51 = " styles = super.createStyles(view);" + NL + "\t\tstyles.add("; |
70 |
protected final String TEXT_51 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
71 |
protected final String TEXT_52 = ".eINSTANCE.createShapeStyle());" + NL + "\t\treturn styles;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
71 |
protected final String TEXT_52 = " createStyles(View view) {" + NL + "\t\t"; |
72 |
protected final String TEXT_53 = " createLayoutConstraint() {" + NL + "\t\treturn "; |
72 |
protected final String TEXT_53 = " styles = super.createStyles(view);" + NL + "\t\tstyles.add("; |
73 |
protected final String TEXT_54 = ".eINSTANCE.createBounds();" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeFromPreferences(View view) {" + NL + "\t\tsuper.initializeFromPreferences(view);" + NL + "" + NL + "\t\t"; |
73 |
protected final String TEXT_54 = ".eINSTANCE.createShapeStyle());" + NL + "\t\treturn styles;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
74 |
protected final String TEXT_55 = " store = ("; |
74 |
protected final String TEXT_55 = " createLayoutConstraint() {" + NL + "\t\treturn "; |
75 |
protected final String TEXT_56 = ") getPreferencesHint().getPreferenceStore();" + NL + "" + NL + "\t\t// fill color" + NL + "\t\t"; |
75 |
protected final String TEXT_56 = ".eINSTANCE.createBounds();" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void initializeFromPreferences(View view) {" + NL + "\t\tsuper.initializeFromPreferences(view);" + NL + "" + NL + "\t\t"; |
76 |
protected final String TEXT_57 = " fillRGB = "; |
76 |
protected final String TEXT_57 = " store = ("; |
77 |
protected final String TEXT_58 = ".getColor(store, "; |
77 |
protected final String TEXT_58 = ") getPreferencesHint().getPreferenceStore();" + NL + "" + NL + "\t\t// fill color" + NL + "\t\t"; |
78 |
protected final String TEXT_59 = ".PREF_FILL_COLOR);" + NL + "\t\t"; |
78 |
protected final String TEXT_59 = " fillRGB = "; |
79 |
protected final String TEXT_60 = ".setStructuralFeatureValue(view, "; |
79 |
protected final String TEXT_60 = ".getColor(store, "; |
80 |
protected final String TEXT_61 = ".eINSTANCE.getFillStyle_FillColor(), "; |
80 |
protected final String TEXT_61 = ".PREF_FILL_COLOR);" + NL + "\t\t"; |
81 |
protected final String TEXT_62 = ".RGBToInteger(fillRGB));" + NL + "\t}"; |
81 |
protected final String TEXT_62 = ".setStructuralFeatureValue(view, "; |
82 |
protected final String TEXT_63 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
82 |
protected final String TEXT_63 = ".eINSTANCE.getFillStyle_FillColor(), "; |
83 |
protected final String TEXT_64 = " getMeasurementUnit() {" + NL + "\t\treturn "; |
83 |
protected final String TEXT_64 = ".RGBToInteger(fillRGB));" + NL + "\t}"; |
84 |
protected final String TEXT_65 = "."; |
84 |
protected final String TEXT_65 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
85 |
protected final String TEXT_66 = "_LITERAL;" + NL + "\t}"; |
85 |
protected final String TEXT_66 = " getMeasurementUnit() {" + NL + "\t\treturn "; |
86 |
protected final String TEXT_67 = NL + "}"; |
86 |
protected final String TEXT_67 = "."; |
87 |
protected final String TEXT_68 = NL; |
87 |
protected final String TEXT_68 = "_LITERAL;" + NL + "\t}"; |
|
|
88 |
protected final String TEXT_69 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setupCompartmentTitle(View view) {" + NL + "\t\t"; |
89 |
protected final String TEXT_70 = " titleStyle = ("; |
90 |
protected final String TEXT_71 = ")view.getStyle("; |
91 |
protected final String TEXT_72 = ".eINSTANCE.getTitleStyle());"; |
92 |
protected final String TEXT_73 = "\t\t" + NL + "\t\tif (titleStyle == null){" + NL + "\t\t\ttitleStyle = ("; |
93 |
protected final String TEXT_74 = ") view.createStyle("; |
94 |
protected final String TEXT_75 = ".eINSTANCE.getTitleStyle());" + NL + "\t\t}" + NL + "\t\ttitleStyle.setShowTitle(true);"; |
95 |
protected final String TEXT_76 = NL + "\t\tif (titleStyle != null){" + NL + "\t\t\tview.getStyles().remove(titleStyle);" + NL + "\t\t}"; |
96 |
protected final String TEXT_77 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setupCompartmentCollapsed(View view) {" + NL + "\t\t"; |
97 |
protected final String TEXT_78 = " drawerStyle = ("; |
98 |
protected final String TEXT_79 = ")view.getStyle("; |
99 |
protected final String TEXT_80 = ".eINSTANCE.getDrawerStyle());"; |
100 |
protected final String TEXT_81 = "\t\t" + NL + "\t\tif (drawerStyle == null){" + NL + "\t\t\tdrawerStyle = ("; |
101 |
protected final String TEXT_82 = ") view.createStyle("; |
102 |
protected final String TEXT_83 = ".eINSTANCE.getDrawerStyle());" + NL + "\t\t}" + NL + "\t\tdrawerStyle.setCollapsed(false);"; |
103 |
protected final String TEXT_84 = NL + "\t\tif (drawerStyle != null){" + NL + "\t\t\tview.getStyles().remove(drawerStyle);" + NL + "\t\t}"; |
104 |
protected final String TEXT_85 = NL + "\t}" + NL; |
105 |
protected final String TEXT_86 = NL + "}"; |
106 |
protected final String TEXT_87 = NL; |
88 |
|
107 |
|
89 |
public String generate(Object argument) |
108 |
public String generate(Object argument) |
90 |
{ |
109 |
{ |
Lines 158-231
Link Here
|
158 |
stringBuffer.append(TEXT_17); |
177 |
stringBuffer.append(TEXT_17); |
159 |
/* [--] importmant for the create shortcut functionality*/ |
178 |
/* [--] importmant for the create shortcut functionality*/ |
160 |
stringBuffer.append(TEXT_18); |
179 |
stringBuffer.append(TEXT_18); |
161 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); |
180 |
|
|
|
181 |
if (isCompartment){ |
182 |
|
162 |
stringBuffer.append(TEXT_19); |
183 |
stringBuffer.append(TEXT_19); |
163 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
184 |
|
|
|
185 |
} |
186 |
|
164 |
stringBuffer.append(TEXT_20); |
187 |
stringBuffer.append(TEXT_20); |
165 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation")); |
188 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); |
166 |
stringBuffer.append(TEXT_21); |
189 |
stringBuffer.append(TEXT_21); |
167 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EcoreFactory")); |
190 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
168 |
stringBuffer.append(TEXT_22); |
191 |
stringBuffer.append(TEXT_22); |
169 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); |
192 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation")); |
170 |
stringBuffer.append(TEXT_23); |
193 |
stringBuffer.append(TEXT_23); |
|
|
194 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EcoreFactory")); |
195 |
stringBuffer.append(TEXT_24); |
196 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartQualifiedClassName())); |
197 |
stringBuffer.append(TEXT_25); |
171 |
|
198 |
|
172 |
} |
199 |
} |
173 |
|
200 |
|
174 |
ColorAttributes colorAttrs = genElement.getViewmap() != null ? (ColorAttributes) genElement.getViewmap().find(ColorAttributes.class) : null; |
201 |
ColorAttributes colorAttrs = genElement.getViewmap() != null ? (ColorAttributes) genElement.getViewmap().find(ColorAttributes.class) : null; |
175 |
if (colorAttrs != null && colorAttrs.getForegroundColor() != null && colorAttrs.getForegroundColor().trim().length() > 0) { |
202 |
if (colorAttrs != null && colorAttrs.getForegroundColor() != null && colorAttrs.getForegroundColor().trim().length() > 0) { |
176 |
stringBuffer.append(TEXT_24); |
203 |
stringBuffer.append(TEXT_26); |
177 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
204 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
178 |
stringBuffer.append(TEXT_25); |
205 |
stringBuffer.append(TEXT_27); |
179 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
206 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
180 |
stringBuffer.append(TEXT_26); |
207 |
stringBuffer.append(TEXT_28); |
181 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities")); |
208 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities")); |
182 |
stringBuffer.append(TEXT_27); |
209 |
stringBuffer.append(TEXT_29); |
183 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants")); |
210 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants")); |
184 |
stringBuffer.append(TEXT_28); |
211 |
stringBuffer.append(TEXT_30); |
185 |
stringBuffer.append(colorAttrs.getForegroundColor()); |
212 |
stringBuffer.append(colorAttrs.getForegroundColor()); |
186 |
stringBuffer.append(TEXT_29); |
213 |
stringBuffer.append(TEXT_31); |
187 |
|
214 |
|
188 |
} |
215 |
} |
189 |
if (isNode) { |
216 |
if (isNode) { |
190 |
GenNode genNode = (GenNode) genElement; |
217 |
GenNode genNode = (GenNode) genElement; |
191 |
if (colorAttrs != null && colorAttrs.getBackgroundColor() != null && colorAttrs.getBackgroundColor().trim().length() > 0) { |
218 |
if (colorAttrs != null && colorAttrs.getBackgroundColor() != null && colorAttrs.getBackgroundColor().trim().length() > 0) { |
192 |
stringBuffer.append(TEXT_30); |
219 |
stringBuffer.append(TEXT_32); |
193 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
220 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
194 |
stringBuffer.append(TEXT_31); |
221 |
stringBuffer.append(TEXT_33); |
195 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
222 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
196 |
stringBuffer.append(TEXT_32); |
223 |
stringBuffer.append(TEXT_34); |
197 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities")); |
224 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities")); |
198 |
stringBuffer.append(TEXT_33); |
225 |
stringBuffer.append(TEXT_35); |
199 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants")); |
226 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ColorConstants")); |
200 |
stringBuffer.append(TEXT_34); |
227 |
stringBuffer.append(TEXT_36); |
201 |
stringBuffer.append(colorAttrs.getBackgroundColor()); |
228 |
stringBuffer.append(colorAttrs.getBackgroundColor()); |
202 |
stringBuffer.append(TEXT_35); |
229 |
stringBuffer.append(TEXT_37); |
203 |
|
230 |
|
204 |
} |
231 |
} |
205 |
List labels = genNode.getLabels(); |
232 |
List labels = genNode.getLabels(); |
206 |
for (int j = 0; j < labels.size(); j++) { |
233 |
for (int j = 0; j < labels.size(); j++) { |
207 |
GenNodeLabel label = (GenNodeLabel) labels.get(j); |
234 |
GenNodeLabel label = (GenNodeLabel) labels.get(j); |
208 |
|
235 |
|
209 |
stringBuffer.append(TEXT_36); |
236 |
stringBuffer.append(TEXT_38); |
210 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
237 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
211 |
stringBuffer.append(TEXT_37); |
238 |
stringBuffer.append(TEXT_39); |
212 |
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); |
239 |
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); |
213 |
stringBuffer.append(TEXT_38); |
240 |
stringBuffer.append(TEXT_40); |
214 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
241 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
215 |
stringBuffer.append(TEXT_39); |
242 |
stringBuffer.append(TEXT_41); |
216 |
|
243 |
|
217 |
} |
244 |
} |
218 |
List genChildContainers = genNode.getCompartments(); |
245 |
List genChildContainers = genNode.getCompartments(); |
219 |
for (int j = 0; j < genChildContainers.size(); j++) { |
246 |
for (int j = 0; j < genChildContainers.size(); j++) { |
220 |
GenCompartment genChildContainer = (GenCompartment) genChildContainers.get(j); |
247 |
GenCompartment genChildContainer = (GenCompartment) genChildContainers.get(j); |
221 |
|
248 |
|
222 |
stringBuffer.append(TEXT_40); |
249 |
stringBuffer.append(TEXT_42); |
223 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
250 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
224 |
stringBuffer.append(TEXT_41); |
251 |
stringBuffer.append(TEXT_43); |
225 |
stringBuffer.append(importManager.getImportedName(genChildContainer.getEditPartQualifiedClassName())); |
252 |
stringBuffer.append(importManager.getImportedName(genChildContainer.getEditPartQualifiedClassName())); |
226 |
stringBuffer.append(TEXT_42); |
253 |
stringBuffer.append(TEXT_44); |
227 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
254 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
228 |
stringBuffer.append(TEXT_43); |
255 |
stringBuffer.append(TEXT_45); |
229 |
|
256 |
|
230 |
} |
257 |
} |
231 |
} else if (isLink) { |
258 |
} else if (isLink) { |
Lines 234-292
Link Here
|
234 |
for (int j = 0; j < labels.size(); j++) { |
261 |
for (int j = 0; j < labels.size(); j++) { |
235 |
GenLinkLabel label = (GenLinkLabel) labels.get(j); |
262 |
GenLinkLabel label = (GenLinkLabel) labels.get(j); |
236 |
|
263 |
|
237 |
stringBuffer.append(TEXT_44); |
264 |
stringBuffer.append(TEXT_46); |
238 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
265 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
239 |
stringBuffer.append(TEXT_45); |
266 |
stringBuffer.append(TEXT_47); |
240 |
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); |
267 |
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); |
241 |
stringBuffer.append(TEXT_46); |
268 |
stringBuffer.append(TEXT_48); |
242 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
269 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
243 |
stringBuffer.append(TEXT_47); |
270 |
stringBuffer.append(TEXT_49); |
244 |
|
271 |
|
245 |
} |
272 |
} |
246 |
} |
273 |
} |
247 |
|
274 |
|
248 |
stringBuffer.append(TEXT_48); |
|
|
249 |
if (isCompartmentWithOwnBounds) { |
250 |
stringBuffer.append(TEXT_49); |
251 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
252 |
stringBuffer.append(TEXT_50); |
275 |
stringBuffer.append(TEXT_50); |
253 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
276 |
if (isCompartmentWithOwnBounds) { |
254 |
stringBuffer.append(TEXT_51); |
277 |
stringBuffer.append(TEXT_51); |
255 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); |
278 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
256 |
stringBuffer.append(TEXT_52); |
279 |
stringBuffer.append(TEXT_52); |
257 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LayoutConstraint")); |
280 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
258 |
stringBuffer.append(TEXT_53); |
281 |
stringBuffer.append(TEXT_53); |
259 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); |
282 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); |
260 |
stringBuffer.append(TEXT_54); |
283 |
stringBuffer.append(TEXT_54); |
261 |
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore")); |
284 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LayoutConstraint")); |
262 |
stringBuffer.append(TEXT_55); |
285 |
stringBuffer.append(TEXT_55); |
263 |
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore")); |
286 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); |
264 |
stringBuffer.append(TEXT_56); |
287 |
stringBuffer.append(TEXT_56); |
265 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.RGB")); |
288 |
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore")); |
266 |
stringBuffer.append(TEXT_57); |
289 |
stringBuffer.append(TEXT_57); |
267 |
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter")); |
290 |
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.IPreferenceStore")); |
268 |
stringBuffer.append(TEXT_58); |
291 |
stringBuffer.append(TEXT_58); |
269 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants")); |
292 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.RGB")); |
270 |
stringBuffer.append(TEXT_59); |
293 |
stringBuffer.append(TEXT_59); |
271 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
294 |
stringBuffer.append(importManager.getImportedName("org.eclipse.jface.preference.PreferenceConverter")); |
272 |
stringBuffer.append(TEXT_60); |
295 |
stringBuffer.append(TEXT_60); |
273 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
296 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants")); |
274 |
stringBuffer.append(TEXT_61); |
297 |
stringBuffer.append(TEXT_61); |
275 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities")); |
298 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.diagram.core.util.ViewUtil")); |
276 |
stringBuffer.append(TEXT_62); |
299 |
stringBuffer.append(TEXT_62); |
|
|
300 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
301 |
stringBuffer.append(TEXT_63); |
302 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.draw2d.ui.figures.FigureUtilities")); |
303 |
stringBuffer.append(TEXT_64); |
277 |
} |
304 |
} |
278 |
if (isDiagram && genDiagram.getUnits() != null && genDiagram.getUnits().trim().length() > 0) { |
305 |
if (isDiagram && genDiagram.getUnits() != null && genDiagram.getUnits().trim().length() > 0) { |
279 |
stringBuffer.append(TEXT_63); |
306 |
stringBuffer.append(TEXT_65); |
280 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.MeasurementUnit")); |
307 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.MeasurementUnit")); |
281 |
stringBuffer.append(TEXT_64); |
308 |
stringBuffer.append(TEXT_66); |
282 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.MeasurementUnit")); |
309 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.MeasurementUnit")); |
283 |
stringBuffer.append(TEXT_65); |
310 |
stringBuffer.append(TEXT_67); |
284 |
stringBuffer.append(genDiagram.getUnits().toUpperCase()); |
311 |
stringBuffer.append(genDiagram.getUnits().toUpperCase()); |
285 |
stringBuffer.append(TEXT_66); |
312 |
stringBuffer.append(TEXT_68); |
286 |
} |
313 |
} |
287 |
stringBuffer.append(TEXT_67); |
314 |
|
|
|
315 |
if (isCompartment) { |
316 |
String titleStyleFQN = importManager.getImportedName("org.eclipse.gmf.runtime.notation.TitleStyle"); |
317 |
String drawerStyleFQN = importManager.getImportedName("org.eclipse.gmf.runtime.notation.DrawerStyle"); |
318 |
String notationPackageFQN = importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage"); |
319 |
GenCompartment genCompartment = (GenCompartment)genElement; |
320 |
|
321 |
stringBuffer.append(TEXT_69); |
322 |
stringBuffer.append(titleStyleFQN); |
323 |
stringBuffer.append(TEXT_70); |
324 |
stringBuffer.append(titleStyleFQN); |
325 |
stringBuffer.append(TEXT_71); |
326 |
stringBuffer.append(notationPackageFQN); |
327 |
stringBuffer.append(TEXT_72); |
328 |
|
329 |
if(genCompartment.isNeedsTitle()){ |
330 |
|
331 |
stringBuffer.append(TEXT_73); |
332 |
stringBuffer.append(titleStyleFQN); |
333 |
stringBuffer.append(TEXT_74); |
334 |
stringBuffer.append(notationPackageFQN); |
335 |
stringBuffer.append(TEXT_75); |
336 |
} else { |
337 |
stringBuffer.append(TEXT_76); |
338 |
} |
339 |
stringBuffer.append(TEXT_77); |
340 |
stringBuffer.append(drawerStyleFQN); |
341 |
stringBuffer.append(TEXT_78); |
342 |
stringBuffer.append(drawerStyleFQN); |
343 |
stringBuffer.append(TEXT_79); |
344 |
stringBuffer.append(notationPackageFQN); |
345 |
stringBuffer.append(TEXT_80); |
346 |
|
347 |
if(genCompartment.isCanCollapse()){ |
348 |
|
349 |
stringBuffer.append(TEXT_81); |
350 |
stringBuffer.append(drawerStyleFQN); |
351 |
stringBuffer.append(TEXT_82); |
352 |
stringBuffer.append(notationPackageFQN); |
353 |
stringBuffer.append(TEXT_83); |
354 |
} else { |
355 |
stringBuffer.append(TEXT_84); |
356 |
} |
357 |
stringBuffer.append(TEXT_85); |
358 |
} |
359 |
stringBuffer.append(TEXT_86); |
288 |
importManager.emitSortedImports(); |
360 |
importManager.emitSortedImports(); |
289 |
stringBuffer.append(TEXT_68); |
361 |
stringBuffer.append(TEXT_87); |
290 |
return stringBuffer.toString(); |
362 |
return stringBuffer.toString(); |
291 |
} |
363 |
} |
292 |
} |
364 |
} |