1 | /* |
2 | *Copyright 2007, SDQ, IPD, University of Karlsruhe |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.usage.part; |
5 | |
6 | import org.eclipse.core.runtime.Platform; |
7 | import org.eclipse.emf.ecore.EAnnotation; |
8 | import org.eclipse.emf.ecore.EObject; |
9 | import org.eclipse.gmf.runtime.notation.Diagram; |
10 | import org.eclipse.gmf.runtime.notation.View; |
11 | |
12 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchEditPart; |
13 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchTransitionBranchProbabilityEditPart; |
14 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchTransitionEditPart; |
15 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchUsageBranchTransitionsCompartmentEditPart; |
16 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadEditPart; |
17 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadPopulationEditPart; |
18 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadThinkTimeLabelEditPart; |
19 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadTitleLabelEditPart; |
20 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ComponentExternalCallNameLabelEditPart; |
21 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.DelayEditPart; |
22 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.DelayEntityNameEditPart; |
23 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.DelayLabelSpecEditPart; |
24 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.EntryLevelSystemCallEditPart; |
25 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.EntryLevelSystemCallParameterUsageEditPart; |
26 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.LoopEditPart; |
27 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.OpenWorkloadEditPart; |
28 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.OpenWorkloadSpecLabelEditPart; |
29 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour2EditPart; |
30 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour3EditPart; |
31 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourEditPart; |
32 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourScenarioBehaviourStepsCompartment2EditPart; |
33 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourScenarioBehaviourStepsCompartment3EditPart; |
34 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourScenarioBehaviourStepsCompartmentEditPart; |
35 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.StartEditPart; |
36 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.StopEditPart; |
37 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageLoopIterationsLabelEditPart; |
38 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenario2EditPart; |
39 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioEditPart; |
40 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioLabelEditPart; |
41 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioUsageScenarioCompartmentEditPart; |
42 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableCharacterisationEditPart; |
43 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableUsageEditPart; |
44 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableUsageVariableCharacterisationEditPart; |
45 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.WrappingLabelEditPart; |
46 | import de.uka.ipd.sdq.pcm.parameter.ParameterPackage; |
47 | import de.uka.ipd.sdq.pcm.usagemodel.UsageModel; |
48 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage; |
49 | |
50 | /** |
51 | * This registry is used to determine which type of visual object should be |
52 | * created for the corresponding Diagram, Node, ChildNode or Link represented |
53 | * by a domain model object. |
54 | * |
55 | * @generated |
56 | */ |
57 | public class PalladioComponentModelVisualIDRegistry { |
58 | |
59 | /** |
60 | * @generated |
61 | */ |
62 | private static final String DEBUG_KEY = "de.uka.ipd.sdq.pcm.gmf.usage/debug/visualID"; //$NON-NLS-1$ |
63 | |
64 | /** |
65 | * @generated |
66 | */ |
67 | public static int getVisualID(View view) { |
68 | if (view instanceof Diagram) { |
69 | if (UsageScenarioEditPart.MODEL_ID.equals(view.getType())) { |
70 | return UsageScenarioEditPart.VISUAL_ID; |
71 | } else { |
72 | return -1; |
73 | } |
74 | } |
75 | return de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry |
76 | .getVisualID(view.getType()); |
77 | } |
78 | |
79 | /** |
80 | * @generated |
81 | */ |
82 | public static String getModelID(View view) { |
83 | View diagram = view.getDiagram(); |
84 | while (view != diagram) { |
85 | EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$ |
86 | if (annotation != null) { |
87 | return (String) annotation.getDetails().get("modelID"); //$NON-NLS-1$ |
88 | } |
89 | view = (View) view.eContainer(); |
90 | } |
91 | return diagram != null ? diagram.getType() : null; |
92 | } |
93 | |
94 | /** |
95 | * @generated |
96 | */ |
97 | public static int getVisualID(String type) { |
98 | try { |
99 | return Integer.parseInt(type); |
100 | } catch (NumberFormatException e) { |
101 | if (Boolean.TRUE.toString().equalsIgnoreCase( |
102 | Platform.getDebugOption(DEBUG_KEY))) { |
103 | PalladioComponentModelUsageDiagramEditorPlugin.getInstance() |
104 | .logError( |
105 | "Unable to parse view type as a visualID number: " |
106 | + type); |
107 | } |
108 | } |
109 | return -1; |
110 | } |
111 | |
112 | /** |
113 | * @generated |
114 | */ |
115 | public static String getType(int visualID) { |
116 | return String.valueOf(visualID); |
117 | } |
118 | |
119 | /** |
120 | * @generated |
121 | */ |
122 | public static int getDiagramVisualID(EObject domainElement) { |
123 | if (domainElement == null) { |
124 | return -1; |
125 | } |
126 | if (UsagemodelPackage.eINSTANCE.getUsageModel().isSuperTypeOf( |
127 | domainElement.eClass()) |
128 | && isDiagram((UsageModel) domainElement)) { |
129 | return UsageScenarioEditPart.VISUAL_ID; |
130 | } |
131 | return -1; |
132 | } |
133 | |
134 | /** |
135 | * @generated |
136 | */ |
137 | public static int getNodeVisualID(View containerView, EObject domainElement) { |
138 | if (domainElement == null) { |
139 | return -1; |
140 | } |
141 | String containerModelID = de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry |
142 | .getModelID(containerView); |
143 | if (!UsageScenarioEditPart.MODEL_ID.equals(containerModelID)) { |
144 | return -1; |
145 | } |
146 | int containerVisualID; |
147 | if (UsageScenarioEditPart.MODEL_ID.equals(containerModelID)) { |
148 | containerVisualID = de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry |
149 | .getVisualID(containerView); |
150 | } else { |
151 | if (containerView instanceof Diagram) { |
152 | containerVisualID = UsageScenarioEditPart.VISUAL_ID; |
153 | } else { |
154 | return -1; |
155 | } |
156 | } |
157 | switch (containerVisualID) { |
158 | case LoopEditPart.VISUAL_ID: |
159 | if (UsagemodelPackage.eINSTANCE.getScenarioBehaviour() |
160 | .isSuperTypeOf(domainElement.eClass())) { |
161 | return ScenarioBehaviour2EditPart.VISUAL_ID; |
162 | } |
163 | break; |
164 | case BranchTransitionEditPart.VISUAL_ID: |
165 | if (UsagemodelPackage.eINSTANCE.getScenarioBehaviour() |
166 | .isSuperTypeOf(domainElement.eClass())) { |
167 | return ScenarioBehaviour3EditPart.VISUAL_ID; |
168 | } |
169 | break; |
170 | case UsageScenarioUsageScenarioCompartmentEditPart.VISUAL_ID: |
171 | if (UsagemodelPackage.eINSTANCE.getScenarioBehaviour() |
172 | .isSuperTypeOf(domainElement.eClass())) { |
173 | return ScenarioBehaviourEditPart.VISUAL_ID; |
174 | } |
175 | if (UsagemodelPackage.eINSTANCE.getClosedWorkload().isSuperTypeOf( |
176 | domainElement.eClass())) { |
177 | return ClosedWorkloadEditPart.VISUAL_ID; |
178 | } |
179 | if (UsagemodelPackage.eINSTANCE.getOpenWorkload().isSuperTypeOf( |
180 | domainElement.eClass())) { |
181 | return OpenWorkloadEditPart.VISUAL_ID; |
182 | } |
183 | break; |
184 | case ScenarioBehaviourScenarioBehaviourStepsCompartmentEditPart.VISUAL_ID: |
185 | if (UsagemodelPackage.eINSTANCE.getStart().isSuperTypeOf( |
186 | domainElement.eClass())) { |
187 | return StartEditPart.VISUAL_ID; |
188 | } |
189 | if (UsagemodelPackage.eINSTANCE.getStop().isSuperTypeOf( |
190 | domainElement.eClass())) { |
191 | return StopEditPart.VISUAL_ID; |
192 | } |
193 | if (UsagemodelPackage.eINSTANCE.getEntryLevelSystemCall() |
194 | .isSuperTypeOf(domainElement.eClass())) { |
195 | return EntryLevelSystemCallEditPart.VISUAL_ID; |
196 | } |
197 | if (UsagemodelPackage.eINSTANCE.getLoop().isSuperTypeOf( |
198 | domainElement.eClass())) { |
199 | return LoopEditPart.VISUAL_ID; |
200 | } |
201 | if (UsagemodelPackage.eINSTANCE.getBranch().isSuperTypeOf( |
202 | domainElement.eClass())) { |
203 | return BranchEditPart.VISUAL_ID; |
204 | } |
205 | if (UsagemodelPackage.eINSTANCE.getDelay().isSuperTypeOf( |
206 | domainElement.eClass())) { |
207 | return DelayEditPart.VISUAL_ID; |
208 | } |
209 | break; |
210 | case EntryLevelSystemCallParameterUsageEditPart.VISUAL_ID: |
211 | if (ParameterPackage.eINSTANCE.getVariableUsage().isSuperTypeOf( |
212 | domainElement.eClass())) { |
213 | return VariableUsageEditPart.VISUAL_ID; |
214 | } |
215 | break; |
216 | case VariableUsageVariableCharacterisationEditPart.VISUAL_ID: |
217 | if (ParameterPackage.eINSTANCE.getVariableCharacterisation() |
218 | .isSuperTypeOf(domainElement.eClass())) { |
219 | return VariableCharacterisationEditPart.VISUAL_ID; |
220 | } |
221 | break; |
222 | case ScenarioBehaviourScenarioBehaviourStepsCompartment2EditPart.VISUAL_ID: |
223 | if (UsagemodelPackage.eINSTANCE.getStart().isSuperTypeOf( |
224 | domainElement.eClass())) { |
225 | return StartEditPart.VISUAL_ID; |
226 | } |
227 | if (UsagemodelPackage.eINSTANCE.getStop().isSuperTypeOf( |
228 | domainElement.eClass())) { |
229 | return StopEditPart.VISUAL_ID; |
230 | } |
231 | if (UsagemodelPackage.eINSTANCE.getEntryLevelSystemCall() |
232 | .isSuperTypeOf(domainElement.eClass())) { |
233 | return EntryLevelSystemCallEditPart.VISUAL_ID; |
234 | } |
235 | if (UsagemodelPackage.eINSTANCE.getLoop().isSuperTypeOf( |
236 | domainElement.eClass())) { |
237 | return LoopEditPart.VISUAL_ID; |
238 | } |
239 | if (UsagemodelPackage.eINSTANCE.getBranch().isSuperTypeOf( |
240 | domainElement.eClass())) { |
241 | return BranchEditPart.VISUAL_ID; |
242 | } |
243 | if (UsagemodelPackage.eINSTANCE.getDelay().isSuperTypeOf( |
244 | domainElement.eClass())) { |
245 | return DelayEditPart.VISUAL_ID; |
246 | } |
247 | break; |
248 | case BranchUsageBranchTransitionsCompartmentEditPart.VISUAL_ID: |
249 | if (UsagemodelPackage.eINSTANCE.getBranchTransition() |
250 | .isSuperTypeOf(domainElement.eClass())) { |
251 | return BranchTransitionEditPart.VISUAL_ID; |
252 | } |
253 | break; |
254 | case ScenarioBehaviourScenarioBehaviourStepsCompartment3EditPart.VISUAL_ID: |
255 | if (UsagemodelPackage.eINSTANCE.getStart().isSuperTypeOf( |
256 | domainElement.eClass())) { |
257 | return StartEditPart.VISUAL_ID; |
258 | } |
259 | if (UsagemodelPackage.eINSTANCE.getStop().isSuperTypeOf( |
260 | domainElement.eClass())) { |
261 | return StopEditPart.VISUAL_ID; |
262 | } |
263 | if (UsagemodelPackage.eINSTANCE.getEntryLevelSystemCall() |
264 | .isSuperTypeOf(domainElement.eClass())) { |
265 | return EntryLevelSystemCallEditPart.VISUAL_ID; |
266 | } |
267 | if (UsagemodelPackage.eINSTANCE.getLoop().isSuperTypeOf( |
268 | domainElement.eClass())) { |
269 | return LoopEditPart.VISUAL_ID; |
270 | } |
271 | if (UsagemodelPackage.eINSTANCE.getBranch().isSuperTypeOf( |
272 | domainElement.eClass())) { |
273 | return BranchEditPart.VISUAL_ID; |
274 | } |
275 | if (UsagemodelPackage.eINSTANCE.getDelay().isSuperTypeOf( |
276 | domainElement.eClass())) { |
277 | return DelayEditPart.VISUAL_ID; |
278 | } |
279 | break; |
280 | case UsageScenarioEditPart.VISUAL_ID: |
281 | if (UsagemodelPackage.eINSTANCE.getUsageScenario().isSuperTypeOf( |
282 | domainElement.eClass())) { |
283 | return UsageScenario2EditPart.VISUAL_ID; |
284 | } |
285 | break; |
286 | } |
287 | return -1; |
288 | } |
289 | |
290 | /** |
291 | * @generated |
292 | */ |
293 | public static boolean canCreateNode(View containerView, int nodeVisualID) { |
294 | String containerModelID = de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry |
295 | .getModelID(containerView); |
296 | if (!UsageScenarioEditPart.MODEL_ID.equals(containerModelID)) { |
297 | return false; |
298 | } |
299 | int containerVisualID; |
300 | if (UsageScenarioEditPart.MODEL_ID.equals(containerModelID)) { |
301 | containerVisualID = de.uka.ipd.sdq.pcm.gmf.usage.part.PalladioComponentModelVisualIDRegistry |
302 | .getVisualID(containerView); |
303 | } else { |
304 | if (containerView instanceof Diagram) { |
305 | containerVisualID = UsageScenarioEditPart.VISUAL_ID; |
306 | } else { |
307 | return false; |
308 | } |
309 | } |
310 | switch (containerVisualID) { |
311 | case UsageScenario2EditPart.VISUAL_ID: |
312 | if (UsageScenarioLabelEditPart.VISUAL_ID == nodeVisualID) { |
313 | return true; |
314 | } |
315 | if (UsageScenarioUsageScenarioCompartmentEditPart.VISUAL_ID == nodeVisualID) { |
316 | return true; |
317 | } |
318 | break; |
319 | case ScenarioBehaviourEditPart.VISUAL_ID: |
320 | if (ScenarioBehaviourScenarioBehaviourStepsCompartmentEditPart.VISUAL_ID == nodeVisualID) { |
321 | return true; |
322 | } |
323 | break; |
324 | case EntryLevelSystemCallEditPart.VISUAL_ID: |
325 | if (ComponentExternalCallNameLabelEditPart.VISUAL_ID == nodeVisualID) { |
326 | return true; |
327 | } |
328 | if (EntryLevelSystemCallParameterUsageEditPart.VISUAL_ID == nodeVisualID) { |
329 | return true; |
330 | } |
331 | break; |
332 | case VariableUsageEditPart.VISUAL_ID: |
333 | if (WrappingLabelEditPart.VISUAL_ID == nodeVisualID) { |
334 | return true; |
335 | } |
336 | if (VariableUsageVariableCharacterisationEditPart.VISUAL_ID == nodeVisualID) { |
337 | return true; |
338 | } |
339 | break; |
340 | case LoopEditPart.VISUAL_ID: |
341 | if (UsageLoopIterationsLabelEditPart.VISUAL_ID == nodeVisualID) { |
342 | return true; |
343 | } |
344 | if (ScenarioBehaviour2EditPart.VISUAL_ID == nodeVisualID) { |
345 | return true; |
346 | } |
347 | break; |
348 | case ScenarioBehaviour2EditPart.VISUAL_ID: |
349 | if (ScenarioBehaviourScenarioBehaviourStepsCompartment2EditPart.VISUAL_ID == nodeVisualID) { |
350 | return true; |
351 | } |
352 | break; |
353 | case BranchEditPart.VISUAL_ID: |
354 | if (BranchUsageBranchTransitionsCompartmentEditPart.VISUAL_ID == nodeVisualID) { |
355 | return true; |
356 | } |
357 | break; |
358 | case BranchTransitionEditPart.VISUAL_ID: |
359 | if (BranchTransitionBranchProbabilityEditPart.VISUAL_ID == nodeVisualID) { |
360 | return true; |
361 | } |
362 | if (ScenarioBehaviour3EditPart.VISUAL_ID == nodeVisualID) { |
363 | return true; |
364 | } |
365 | break; |
366 | case ScenarioBehaviour3EditPart.VISUAL_ID: |
367 | if (ScenarioBehaviourScenarioBehaviourStepsCompartment3EditPart.VISUAL_ID == nodeVisualID) { |
368 | return true; |
369 | } |
370 | break; |
371 | case DelayEditPart.VISUAL_ID: |
372 | if (DelayEntityNameEditPart.VISUAL_ID == nodeVisualID) { |
373 | return true; |
374 | } |
375 | if (DelayLabelSpecEditPart.VISUAL_ID == nodeVisualID) { |
376 | return true; |
377 | } |
378 | break; |
379 | case ClosedWorkloadEditPart.VISUAL_ID: |
380 | if (ClosedWorkloadPopulationEditPart.VISUAL_ID == nodeVisualID) { |
381 | return true; |
382 | } |
383 | if (ClosedWorkloadTitleLabelEditPart.VISUAL_ID == nodeVisualID) { |
384 | return true; |
385 | } |
386 | if (ClosedWorkloadThinkTimeLabelEditPart.VISUAL_ID == nodeVisualID) { |
387 | return true; |
388 | } |
389 | break; |
390 | case OpenWorkloadEditPart.VISUAL_ID: |
391 | if (OpenWorkloadSpecLabelEditPart.VISUAL_ID == nodeVisualID) { |
392 | return true; |
393 | } |
394 | break; |
395 | case UsageScenarioUsageScenarioCompartmentEditPart.VISUAL_ID: |
396 | if (ScenarioBehaviourEditPart.VISUAL_ID == nodeVisualID) { |
397 | return true; |
398 | } |
399 | if (ClosedWorkloadEditPart.VISUAL_ID == nodeVisualID) { |
400 | return true; |
401 | } |
402 | if (OpenWorkloadEditPart.VISUAL_ID == nodeVisualID) { |
403 | return true; |
404 | } |
405 | break; |
406 | case ScenarioBehaviourScenarioBehaviourStepsCompartmentEditPart.VISUAL_ID: |
407 | if (StartEditPart.VISUAL_ID == nodeVisualID) { |
408 | return true; |
409 | } |
410 | if (StopEditPart.VISUAL_ID == nodeVisualID) { |
411 | return true; |
412 | } |
413 | if (EntryLevelSystemCallEditPart.VISUAL_ID == nodeVisualID) { |
414 | return true; |
415 | } |
416 | if (LoopEditPart.VISUAL_ID == nodeVisualID) { |
417 | return true; |
418 | } |
419 | if (BranchEditPart.VISUAL_ID == nodeVisualID) { |
420 | return true; |
421 | } |
422 | if (DelayEditPart.VISUAL_ID == nodeVisualID) { |
423 | return true; |
424 | } |
425 | break; |
426 | case EntryLevelSystemCallParameterUsageEditPart.VISUAL_ID: |
427 | if (VariableUsageEditPart.VISUAL_ID == nodeVisualID) { |
428 | return true; |
429 | } |
430 | break; |
431 | case VariableUsageVariableCharacterisationEditPart.VISUAL_ID: |
432 | if (VariableCharacterisationEditPart.VISUAL_ID == nodeVisualID) { |
433 | return true; |
434 | } |
435 | break; |
436 | case ScenarioBehaviourScenarioBehaviourStepsCompartment2EditPart.VISUAL_ID: |
437 | if (StartEditPart.VISUAL_ID == nodeVisualID) { |
438 | return true; |
439 | } |
440 | if (StopEditPart.VISUAL_ID == nodeVisualID) { |
441 | return true; |
442 | } |
443 | if (EntryLevelSystemCallEditPart.VISUAL_ID == nodeVisualID) { |
444 | return true; |
445 | } |
446 | if (LoopEditPart.VISUAL_ID == nodeVisualID) { |
447 | return true; |
448 | } |
449 | if (BranchEditPart.VISUAL_ID == nodeVisualID) { |
450 | return true; |
451 | } |
452 | if (DelayEditPart.VISUAL_ID == nodeVisualID) { |
453 | return true; |
454 | } |
455 | break; |
456 | case BranchUsageBranchTransitionsCompartmentEditPart.VISUAL_ID: |
457 | if (BranchTransitionEditPart.VISUAL_ID == nodeVisualID) { |
458 | return true; |
459 | } |
460 | break; |
461 | case ScenarioBehaviourScenarioBehaviourStepsCompartment3EditPart.VISUAL_ID: |
462 | if (StartEditPart.VISUAL_ID == nodeVisualID) { |
463 | return true; |
464 | } |
465 | if (StopEditPart.VISUAL_ID == nodeVisualID) { |
466 | return true; |
467 | } |
468 | if (EntryLevelSystemCallEditPart.VISUAL_ID == nodeVisualID) { |
469 | return true; |
470 | } |
471 | if (LoopEditPart.VISUAL_ID == nodeVisualID) { |
472 | return true; |
473 | } |
474 | if (BranchEditPart.VISUAL_ID == nodeVisualID) { |
475 | return true; |
476 | } |
477 | if (DelayEditPart.VISUAL_ID == nodeVisualID) { |
478 | return true; |
479 | } |
480 | break; |
481 | case UsageScenarioEditPart.VISUAL_ID: |
482 | if (UsageScenario2EditPart.VISUAL_ID == nodeVisualID) { |
483 | return true; |
484 | } |
485 | break; |
486 | } |
487 | return false; |
488 | } |
489 | |
490 | /** |
491 | * @generated |
492 | */ |
493 | public static int getLinkWithClassVisualID(EObject domainElement) { |
494 | if (domainElement == null) { |
495 | return -1; |
496 | } |
497 | return -1; |
498 | } |
499 | |
500 | /** |
501 | * User can change implementation of this method to handle some specific |
502 | * situations not covered by default logic. |
503 | * |
504 | * @generated |
505 | */ |
506 | private static boolean isDiagram(UsageModel element) { |
507 | return true; |
508 | } |
509 | } |