1 | /* |
2 | * Copyright 2007, SDQ, IPD, University of Karlsruhe |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.usage.part; |
5 | |
6 | import java.util.Collection; |
7 | import java.util.Collections; |
8 | import java.util.Iterator; |
9 | import java.util.LinkedList; |
10 | import java.util.List; |
11 | import java.util.Map; |
12 | |
13 | import org.eclipse.emf.ecore.EStructuralFeature; |
14 | import org.eclipse.emf.ecore.util.EcoreUtil; |
15 | import org.eclipse.gmf.runtime.notation.View; |
16 | |
17 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.AbstractUserActionSuccessorEditPart; |
18 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchEditPart; |
19 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchTransitionEditPart; |
20 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.BranchUsageBranchTransitionsCompartmentEditPart; |
21 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ClosedWorkloadEditPart; |
22 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.DelayEditPart; |
23 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.EntryLevelSystemCallEditPart; |
24 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.EntryLevelSystemCallParameterUsageEditPart; |
25 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.LoopEditPart; |
26 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.OpenWorkloadEditPart; |
27 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour2EditPart; |
28 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviour3EditPart; |
29 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourEditPart; |
30 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourScenarioBehaviourStepsCompartment2EditPart; |
31 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourScenarioBehaviourStepsCompartment3EditPart; |
32 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.ScenarioBehaviourScenarioBehaviourStepsCompartmentEditPart; |
33 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.StartEditPart; |
34 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.StopEditPart; |
35 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenario2EditPart; |
36 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioEditPart; |
37 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.UsageScenarioUsageScenarioCompartmentEditPart; |
38 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableCharacterisationEditPart; |
39 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableUsageEditPart; |
40 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.parts.VariableUsageVariableCharacterisationEditPart; |
41 | import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelElementTypes; |
42 | import de.uka.ipd.sdq.pcm.parameter.VariableCharacterisation; |
43 | import de.uka.ipd.sdq.pcm.parameter.VariableUsage; |
44 | import de.uka.ipd.sdq.pcm.usagemodel.AbstractUserAction; |
45 | import de.uka.ipd.sdq.pcm.usagemodel.Branch; |
46 | import de.uka.ipd.sdq.pcm.usagemodel.BranchTransition; |
47 | import de.uka.ipd.sdq.pcm.usagemodel.Delay; |
48 | import de.uka.ipd.sdq.pcm.usagemodel.EntryLevelSystemCall; |
49 | import de.uka.ipd.sdq.pcm.usagemodel.Loop; |
50 | import de.uka.ipd.sdq.pcm.usagemodel.ScenarioBehaviour; |
51 | import de.uka.ipd.sdq.pcm.usagemodel.Start; |
52 | import de.uka.ipd.sdq.pcm.usagemodel.Stop; |
53 | import de.uka.ipd.sdq.pcm.usagemodel.UsageModel; |
54 | import de.uka.ipd.sdq.pcm.usagemodel.UsageScenario; |
55 | import de.uka.ipd.sdq.pcm.usagemodel.UsagemodelPackage; |
56 | import de.uka.ipd.sdq.pcm.usagemodel.Workload; |
57 | |
58 | /** |
59 | * @generated |
60 | */ |
61 | public class PalladioComponentModelDiagramUpdater { |
62 | |
63 | /** |
64 | * @generated |
65 | */ |
66 | public static List getSemanticChildren(View view) { |
67 | switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) { |
68 | case LoopEditPart.VISUAL_ID: |
69 | return getLoop_3005SemanticChildren(view); |
70 | case BranchTransitionEditPart.VISUAL_ID: |
71 | return getBranchTransition_3009SemanticChildren(view); |
72 | case UsageScenarioUsageScenarioCompartmentEditPart.VISUAL_ID: |
73 | return getUsageScenarioUsageScenarioCompartment_7012SemanticChildren(view); |
74 | case ScenarioBehaviourScenarioBehaviourStepsCompartmentEditPart.VISUAL_ID: |
75 | return getScenarioBehaviourScenarioBehaviourStepsCompartment_7013SemanticChildren(view); |
76 | case EntryLevelSystemCallParameterUsageEditPart.VISUAL_ID: |
77 | return getEntryLevelSystemCallSystemCallVariableUsageCompartment_7002SemanticChildren(view); |
78 | case VariableUsageVariableCharacterisationEditPart.VISUAL_ID: |
79 | return getVariableUsageVariableCharacterisation_7011SemanticChildren(view); |
80 | case ScenarioBehaviourScenarioBehaviourStepsCompartment2EditPart.VISUAL_ID: |
81 | return getScenarioBehaviourScenarioBehaviourStepsCompartment_7005SemanticChildren(view); |
82 | case BranchUsageBranchTransitionsCompartmentEditPart.VISUAL_ID: |
83 | return getBranchUsageBranchTransitionsCompartment_7009SemanticChildren(view); |
84 | case ScenarioBehaviourScenarioBehaviourStepsCompartment3EditPart.VISUAL_ID: |
85 | return getScenarioBehaviourScenarioBehaviourStepsCompartment_7008SemanticChildren(view); |
86 | case UsageScenarioEditPart.VISUAL_ID: |
87 | return getUsageModel_1000SemanticChildren(view); |
88 | } |
89 | return Collections.EMPTY_LIST; |
90 | } |
91 | |
92 | /** |
93 | * @generated |
94 | */ |
95 | public static List getLoop_3005SemanticChildren(View view) { |
96 | if (!view.isSetElement()) { |
97 | return Collections.EMPTY_LIST; |
98 | } |
99 | Loop modelElement = (Loop) view.getElement(); |
100 | List result = new LinkedList(); |
101 | { |
102 | ScenarioBehaviour childElement = modelElement |
103 | .getBodyBehaviour_Loop(); |
104 | int visualID = PalladioComponentModelVisualIDRegistry |
105 | .getNodeVisualID(view, childElement); |
106 | if (visualID == ScenarioBehaviour2EditPart.VISUAL_ID) { |
107 | result.add(new PalladioComponentModelNodeDescriptor( |
108 | childElement, visualID)); |
109 | } |
110 | } |
111 | return result; |
112 | } |
113 | |
114 | /** |
115 | * @generated |
116 | */ |
117 | public static List getBranchTransition_3009SemanticChildren(View view) { |
118 | if (!view.isSetElement()) { |
119 | return Collections.EMPTY_LIST; |
120 | } |
121 | BranchTransition modelElement = (BranchTransition) view.getElement(); |
122 | List result = new LinkedList(); |
123 | { |
124 | ScenarioBehaviour childElement = modelElement |
125 | .getBranchedBehaviour_BranchTransition(); |
126 | int visualID = PalladioComponentModelVisualIDRegistry |
127 | .getNodeVisualID(view, childElement); |
128 | if (visualID == ScenarioBehaviour3EditPart.VISUAL_ID) { |
129 | result.add(new PalladioComponentModelNodeDescriptor( |
130 | childElement, visualID)); |
131 | } |
132 | } |
133 | return result; |
134 | } |
135 | |
136 | /** |
137 | * @generated |
138 | */ |
139 | public static List getUsageScenarioUsageScenarioCompartment_7012SemanticChildren( |
140 | View view) { |
141 | if (false == view.eContainer() instanceof View) { |
142 | return Collections.EMPTY_LIST; |
143 | } |
144 | View containerView = (View) view.eContainer(); |
145 | if (!containerView.isSetElement()) { |
146 | return Collections.EMPTY_LIST; |
147 | } |
148 | UsageScenario modelElement = (UsageScenario) containerView.getElement(); |
149 | List result = new LinkedList(); |
150 | { |
151 | ScenarioBehaviour childElement = modelElement |
152 | .getScenarioBehaviour_UsageScenario(); |
153 | int visualID = PalladioComponentModelVisualIDRegistry |
154 | .getNodeVisualID(view, childElement); |
155 | if (visualID == ScenarioBehaviourEditPart.VISUAL_ID) { |
156 | result.add(new PalladioComponentModelNodeDescriptor( |
157 | childElement, visualID)); |
158 | } |
159 | } |
160 | { |
161 | Workload childElement = modelElement.getWorkload_UsageScenario(); |
162 | int visualID = PalladioComponentModelVisualIDRegistry |
163 | .getNodeVisualID(view, childElement); |
164 | if (visualID == ClosedWorkloadEditPart.VISUAL_ID) { |
165 | result.add(new PalladioComponentModelNodeDescriptor( |
166 | childElement, visualID)); |
167 | } |
168 | if (visualID == OpenWorkloadEditPart.VISUAL_ID) { |
169 | result.add(new PalladioComponentModelNodeDescriptor( |
170 | childElement, visualID)); |
171 | } |
172 | } |
173 | return result; |
174 | } |
175 | |
176 | /** |
177 | * @generated |
178 | */ |
179 | public static List getScenarioBehaviourScenarioBehaviourStepsCompartment_7013SemanticChildren( |
180 | View view) { |
181 | if (false == view.eContainer() instanceof View) { |
182 | return Collections.EMPTY_LIST; |
183 | } |
184 | View containerView = (View) view.eContainer(); |
185 | if (!containerView.isSetElement()) { |
186 | return Collections.EMPTY_LIST; |
187 | } |
188 | ScenarioBehaviour modelElement = (ScenarioBehaviour) containerView |
189 | .getElement(); |
190 | List result = new LinkedList(); |
191 | for (Iterator it = modelElement.getActions_ScenarioBehaviour() |
192 | .iterator(); it.hasNext();) { |
193 | AbstractUserAction childElement = (AbstractUserAction) it.next(); |
194 | int visualID = PalladioComponentModelVisualIDRegistry |
195 | .getNodeVisualID(view, childElement); |
196 | if (visualID == StartEditPart.VISUAL_ID) { |
197 | result.add(new PalladioComponentModelNodeDescriptor( |
198 | childElement, visualID)); |
199 | continue; |
200 | } |
201 | if (visualID == StopEditPart.VISUAL_ID) { |
202 | result.add(new PalladioComponentModelNodeDescriptor( |
203 | childElement, visualID)); |
204 | continue; |
205 | } |
206 | if (visualID == EntryLevelSystemCallEditPart.VISUAL_ID) { |
207 | result.add(new PalladioComponentModelNodeDescriptor( |
208 | childElement, visualID)); |
209 | continue; |
210 | } |
211 | if (visualID == LoopEditPart.VISUAL_ID) { |
212 | result.add(new PalladioComponentModelNodeDescriptor( |
213 | childElement, visualID)); |
214 | continue; |
215 | } |
216 | if (visualID == BranchEditPart.VISUAL_ID) { |
217 | result.add(new PalladioComponentModelNodeDescriptor( |
218 | childElement, visualID)); |
219 | continue; |
220 | } |
221 | if (visualID == DelayEditPart.VISUAL_ID) { |
222 | result.add(new PalladioComponentModelNodeDescriptor( |
223 | childElement, visualID)); |
224 | continue; |
225 | } |
226 | } |
227 | return result; |
228 | } |
229 | |
230 | /** |
231 | * @generated |
232 | */ |
233 | public static List getEntryLevelSystemCallSystemCallVariableUsageCompartment_7002SemanticChildren( |
234 | View view) { |
235 | if (false == view.eContainer() instanceof View) { |
236 | return Collections.EMPTY_LIST; |
237 | } |
238 | View containerView = (View) view.eContainer(); |
239 | if (!containerView.isSetElement()) { |
240 | return Collections.EMPTY_LIST; |
241 | } |
242 | EntryLevelSystemCall modelElement = (EntryLevelSystemCall) containerView |
243 | .getElement(); |
244 | List result = new LinkedList(); |
245 | for (Iterator it = modelElement |
246 | .getInputParameterUsages_EntryLevelSystemCall().iterator(); it |
247 | .hasNext();) { |
248 | VariableUsage childElement = (VariableUsage) it.next(); |
249 | int visualID = PalladioComponentModelVisualIDRegistry |
250 | .getNodeVisualID(view, childElement); |
251 | if (visualID == VariableUsageEditPart.VISUAL_ID) { |
252 | result.add(new PalladioComponentModelNodeDescriptor( |
253 | childElement, visualID)); |
254 | continue; |
255 | } |
256 | } |
257 | return result; |
258 | } |
259 | |
260 | /** |
261 | * @generated |
262 | */ |
263 | public static List getVariableUsageVariableCharacterisation_7011SemanticChildren( |
264 | View view) { |
265 | if (false == view.eContainer() instanceof View) { |
266 | return Collections.EMPTY_LIST; |
267 | } |
268 | View containerView = (View) view.eContainer(); |
269 | if (!containerView.isSetElement()) { |
270 | return Collections.EMPTY_LIST; |
271 | } |
272 | VariableUsage modelElement = (VariableUsage) containerView.getElement(); |
273 | List result = new LinkedList(); |
274 | for (Iterator it = modelElement |
275 | .getVariableCharacterisation_VariableUsage().iterator(); it |
276 | .hasNext();) { |
277 | VariableCharacterisation childElement = (VariableCharacterisation) it |
278 | .next(); |
279 | int visualID = PalladioComponentModelVisualIDRegistry |
280 | .getNodeVisualID(view, childElement); |
281 | if (visualID == VariableCharacterisationEditPart.VISUAL_ID) { |
282 | result.add(new PalladioComponentModelNodeDescriptor( |
283 | childElement, visualID)); |
284 | continue; |
285 | } |
286 | } |
287 | return result; |
288 | } |
289 | |
290 | /** |
291 | * @generated |
292 | */ |
293 | public static List getScenarioBehaviourScenarioBehaviourStepsCompartment_7005SemanticChildren( |
294 | View view) { |
295 | if (false == view.eContainer() instanceof View) { |
296 | return Collections.EMPTY_LIST; |
297 | } |
298 | View containerView = (View) view.eContainer(); |
299 | if (!containerView.isSetElement()) { |
300 | return Collections.EMPTY_LIST; |
301 | } |
302 | ScenarioBehaviour modelElement = (ScenarioBehaviour) containerView |
303 | .getElement(); |
304 | List result = new LinkedList(); |
305 | for (Iterator it = modelElement.getActions_ScenarioBehaviour() |
306 | .iterator(); it.hasNext();) { |
307 | AbstractUserAction childElement = (AbstractUserAction) it.next(); |
308 | int visualID = PalladioComponentModelVisualIDRegistry |
309 | .getNodeVisualID(view, childElement); |
310 | if (visualID == StartEditPart.VISUAL_ID) { |
311 | result.add(new PalladioComponentModelNodeDescriptor( |
312 | childElement, visualID)); |
313 | continue; |
314 | } |
315 | if (visualID == StopEditPart.VISUAL_ID) { |
316 | result.add(new PalladioComponentModelNodeDescriptor( |
317 | childElement, visualID)); |
318 | continue; |
319 | } |
320 | if (visualID == EntryLevelSystemCallEditPart.VISUAL_ID) { |
321 | result.add(new PalladioComponentModelNodeDescriptor( |
322 | childElement, visualID)); |
323 | continue; |
324 | } |
325 | if (visualID == LoopEditPart.VISUAL_ID) { |
326 | result.add(new PalladioComponentModelNodeDescriptor( |
327 | childElement, visualID)); |
328 | continue; |
329 | } |
330 | if (visualID == BranchEditPart.VISUAL_ID) { |
331 | result.add(new PalladioComponentModelNodeDescriptor( |
332 | childElement, visualID)); |
333 | continue; |
334 | } |
335 | if (visualID == DelayEditPart.VISUAL_ID) { |
336 | result.add(new PalladioComponentModelNodeDescriptor( |
337 | childElement, visualID)); |
338 | continue; |
339 | } |
340 | } |
341 | return result; |
342 | } |
343 | |
344 | /** |
345 | * @generated |
346 | */ |
347 | public static List getBranchUsageBranchTransitionsCompartment_7009SemanticChildren( |
348 | View view) { |
349 | if (false == view.eContainer() instanceof View) { |
350 | return Collections.EMPTY_LIST; |
351 | } |
352 | View containerView = (View) view.eContainer(); |
353 | if (!containerView.isSetElement()) { |
354 | return Collections.EMPTY_LIST; |
355 | } |
356 | Branch modelElement = (Branch) containerView.getElement(); |
357 | List result = new LinkedList(); |
358 | for (Iterator it = modelElement.getBranchTransitions_Branch() |
359 | .iterator(); it.hasNext();) { |
360 | BranchTransition childElement = (BranchTransition) it.next(); |
361 | int visualID = PalladioComponentModelVisualIDRegistry |
362 | .getNodeVisualID(view, childElement); |
363 | if (visualID == BranchTransitionEditPart.VISUAL_ID) { |
364 | result.add(new PalladioComponentModelNodeDescriptor( |
365 | childElement, visualID)); |
366 | continue; |
367 | } |
368 | } |
369 | return result; |
370 | } |
371 | |
372 | /** |
373 | * @generated |
374 | */ |
375 | public static List getScenarioBehaviourScenarioBehaviourStepsCompartment_7008SemanticChildren( |
376 | View view) { |
377 | if (false == view.eContainer() instanceof View) { |
378 | return Collections.EMPTY_LIST; |
379 | } |
380 | View containerView = (View) view.eContainer(); |
381 | if (!containerView.isSetElement()) { |
382 | return Collections.EMPTY_LIST; |
383 | } |
384 | ScenarioBehaviour modelElement = (ScenarioBehaviour) containerView |
385 | .getElement(); |
386 | List result = new LinkedList(); |
387 | for (Iterator it = modelElement.getActions_ScenarioBehaviour() |
388 | .iterator(); it.hasNext();) { |
389 | AbstractUserAction childElement = (AbstractUserAction) it.next(); |
390 | int visualID = PalladioComponentModelVisualIDRegistry |
391 | .getNodeVisualID(view, childElement); |
392 | if (visualID == StartEditPart.VISUAL_ID) { |
393 | result.add(new PalladioComponentModelNodeDescriptor( |
394 | childElement, visualID)); |
395 | continue; |
396 | } |
397 | if (visualID == StopEditPart.VISUAL_ID) { |
398 | result.add(new PalladioComponentModelNodeDescriptor( |
399 | childElement, visualID)); |
400 | continue; |
401 | } |
402 | if (visualID == EntryLevelSystemCallEditPart.VISUAL_ID) { |
403 | result.add(new PalladioComponentModelNodeDescriptor( |
404 | childElement, visualID)); |
405 | continue; |
406 | } |
407 | if (visualID == LoopEditPart.VISUAL_ID) { |
408 | result.add(new PalladioComponentModelNodeDescriptor( |
409 | childElement, visualID)); |
410 | continue; |
411 | } |
412 | if (visualID == BranchEditPart.VISUAL_ID) { |
413 | result.add(new PalladioComponentModelNodeDescriptor( |
414 | childElement, visualID)); |
415 | continue; |
416 | } |
417 | if (visualID == DelayEditPart.VISUAL_ID) { |
418 | result.add(new PalladioComponentModelNodeDescriptor( |
419 | childElement, visualID)); |
420 | continue; |
421 | } |
422 | } |
423 | return result; |
424 | } |
425 | |
426 | /** |
427 | * @generated |
428 | */ |
429 | public static List getUsageModel_1000SemanticChildren(View view) { |
430 | if (!view.isSetElement()) { |
431 | return Collections.EMPTY_LIST; |
432 | } |
433 | UsageModel modelElement = (UsageModel) view.getElement(); |
434 | List result = new LinkedList(); |
435 | for (Iterator it = modelElement.getUsageScenario_UsageModel() |
436 | .iterator(); it.hasNext();) { |
437 | UsageScenario childElement = (UsageScenario) it.next(); |
438 | int visualID = PalladioComponentModelVisualIDRegistry |
439 | .getNodeVisualID(view, childElement); |
440 | if (visualID == UsageScenario2EditPart.VISUAL_ID) { |
441 | result.add(new PalladioComponentModelNodeDescriptor( |
442 | childElement, visualID)); |
443 | continue; |
444 | } |
445 | } |
446 | return result; |
447 | } |
448 | |
449 | /** |
450 | * @generated |
451 | */ |
452 | public static List getContainedLinks(View view) { |
453 | switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) { |
454 | case UsageScenarioEditPart.VISUAL_ID: |
455 | return getUsageModel_1000ContainedLinks(view); |
456 | case UsageScenario2EditPart.VISUAL_ID: |
457 | return getUsageScenario_2004ContainedLinks(view); |
458 | case ScenarioBehaviourEditPart.VISUAL_ID: |
459 | return getScenarioBehaviour_3014ContainedLinks(view); |
460 | case StartEditPart.VISUAL_ID: |
461 | return getStart_3001ContainedLinks(view); |
462 | case StopEditPart.VISUAL_ID: |
463 | return getStop_3002ContainedLinks(view); |
464 | case EntryLevelSystemCallEditPart.VISUAL_ID: |
465 | return getEntryLevelSystemCall_3003ContainedLinks(view); |
466 | case VariableUsageEditPart.VISUAL_ID: |
467 | return getVariableUsage_3012ContainedLinks(view); |
468 | case VariableCharacterisationEditPart.VISUAL_ID: |
469 | return getVariableCharacterisation_3013ContainedLinks(view); |
470 | case LoopEditPart.VISUAL_ID: |
471 | return getLoop_3005ContainedLinks(view); |
472 | case ScenarioBehaviour2EditPart.VISUAL_ID: |
473 | return getScenarioBehaviour_3007ContainedLinks(view); |
474 | case BranchEditPart.VISUAL_ID: |
475 | return getBranch_3008ContainedLinks(view); |
476 | case BranchTransitionEditPart.VISUAL_ID: |
477 | return getBranchTransition_3009ContainedLinks(view); |
478 | case ScenarioBehaviour3EditPart.VISUAL_ID: |
479 | return getScenarioBehaviour_3010ContainedLinks(view); |
480 | case DelayEditPart.VISUAL_ID: |
481 | return getDelay_3017ContainedLinks(view); |
482 | case ClosedWorkloadEditPart.VISUAL_ID: |
483 | return getClosedWorkload_3015ContainedLinks(view); |
484 | case OpenWorkloadEditPart.VISUAL_ID: |
485 | return getOpenWorkload_3016ContainedLinks(view); |
486 | } |
487 | return Collections.EMPTY_LIST; |
488 | } |
489 | |
490 | /** |
491 | * @generated |
492 | */ |
493 | public static List getIncomingLinks(View view) { |
494 | switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) { |
495 | case UsageScenario2EditPart.VISUAL_ID: |
496 | return getUsageScenario_2004IncomingLinks(view); |
497 | case ScenarioBehaviourEditPart.VISUAL_ID: |
498 | return getScenarioBehaviour_3014IncomingLinks(view); |
499 | case StartEditPart.VISUAL_ID: |
500 | return getStart_3001IncomingLinks(view); |
501 | case StopEditPart.VISUAL_ID: |
502 | return getStop_3002IncomingLinks(view); |
503 | case EntryLevelSystemCallEditPart.VISUAL_ID: |
504 | return getEntryLevelSystemCall_3003IncomingLinks(view); |
505 | case VariableUsageEditPart.VISUAL_ID: |
506 | return getVariableUsage_3012IncomingLinks(view); |
507 | case VariableCharacterisationEditPart.VISUAL_ID: |
508 | return getVariableCharacterisation_3013IncomingLinks(view); |
509 | case LoopEditPart.VISUAL_ID: |
510 | return getLoop_3005IncomingLinks(view); |
511 | case ScenarioBehaviour2EditPart.VISUAL_ID: |
512 | return getScenarioBehaviour_3007IncomingLinks(view); |
513 | case BranchEditPart.VISUAL_ID: |
514 | return getBranch_3008IncomingLinks(view); |
515 | case BranchTransitionEditPart.VISUAL_ID: |
516 | return getBranchTransition_3009IncomingLinks(view); |
517 | case ScenarioBehaviour3EditPart.VISUAL_ID: |
518 | return getScenarioBehaviour_3010IncomingLinks(view); |
519 | case DelayEditPart.VISUAL_ID: |
520 | return getDelay_3017IncomingLinks(view); |
521 | case ClosedWorkloadEditPart.VISUAL_ID: |
522 | return getClosedWorkload_3015IncomingLinks(view); |
523 | case OpenWorkloadEditPart.VISUAL_ID: |
524 | return getOpenWorkload_3016IncomingLinks(view); |
525 | } |
526 | return Collections.EMPTY_LIST; |
527 | } |
528 | |
529 | /** |
530 | * @generated |
531 | */ |
532 | public static List getOutgoingLinks(View view) { |
533 | switch (PalladioComponentModelVisualIDRegistry.getVisualID(view)) { |
534 | case UsageScenario2EditPart.VISUAL_ID: |
535 | return getUsageScenario_2004OutgoingLinks(view); |
536 | case ScenarioBehaviourEditPart.VISUAL_ID: |
537 | return getScenarioBehaviour_3014OutgoingLinks(view); |
538 | case StartEditPart.VISUAL_ID: |
539 | return getStart_3001OutgoingLinks(view); |
540 | case StopEditPart.VISUAL_ID: |
541 | return getStop_3002OutgoingLinks(view); |
542 | case EntryLevelSystemCallEditPart.VISUAL_ID: |
543 | return getEntryLevelSystemCall_3003OutgoingLinks(view); |
544 | case VariableUsageEditPart.VISUAL_ID: |
545 | return getVariableUsage_3012OutgoingLinks(view); |
546 | case VariableCharacterisationEditPart.VISUAL_ID: |
547 | return getVariableCharacterisation_3013OutgoingLinks(view); |
548 | case LoopEditPart.VISUAL_ID: |
549 | return getLoop_3005OutgoingLinks(view); |
550 | case ScenarioBehaviour2EditPart.VISUAL_ID: |
551 | return getScenarioBehaviour_3007OutgoingLinks(view); |
552 | case BranchEditPart.VISUAL_ID: |
553 | return getBranch_3008OutgoingLinks(view); |
554 | case BranchTransitionEditPart.VISUAL_ID: |
555 | return getBranchTransition_3009OutgoingLinks(view); |
556 | case ScenarioBehaviour3EditPart.VISUAL_ID: |
557 | return getScenarioBehaviour_3010OutgoingLinks(view); |
558 | case DelayEditPart.VISUAL_ID: |
559 | return getDelay_3017OutgoingLinks(view); |
560 | case ClosedWorkloadEditPart.VISUAL_ID: |
561 | return getClosedWorkload_3015OutgoingLinks(view); |
562 | case OpenWorkloadEditPart.VISUAL_ID: |
563 | return getOpenWorkload_3016OutgoingLinks(view); |
564 | } |
565 | return Collections.EMPTY_LIST; |
566 | } |
567 | |
568 | /** |
569 | * @generated |
570 | */ |
571 | public static List getUsageModel_1000ContainedLinks(View view) { |
572 | return Collections.EMPTY_LIST; |
573 | } |
574 | |
575 | /** |
576 | * @generated |
577 | */ |
578 | public static List getUsageScenario_2004ContainedLinks(View view) { |
579 | return Collections.EMPTY_LIST; |
580 | } |
581 | |
582 | /** |
583 | * @generated |
584 | */ |
585 | public static List getScenarioBehaviour_3014ContainedLinks(View view) { |
586 | return Collections.EMPTY_LIST; |
587 | } |
588 | |
589 | /** |
590 | * @generated |
591 | */ |
592 | public static List getStart_3001ContainedLinks(View view) { |
593 | Start modelElement = (Start) view.getElement(); |
594 | List result = new LinkedList(); |
595 | result |
596 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
597 | return result; |
598 | } |
599 | |
600 | /** |
601 | * @generated |
602 | */ |
603 | public static List getStop_3002ContainedLinks(View view) { |
604 | Stop modelElement = (Stop) view.getElement(); |
605 | List result = new LinkedList(); |
606 | result |
607 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
608 | return result; |
609 | } |
610 | |
611 | /** |
612 | * @generated |
613 | */ |
614 | public static List getEntryLevelSystemCall_3003ContainedLinks(View view) { |
615 | EntryLevelSystemCall modelElement = (EntryLevelSystemCall) view |
616 | .getElement(); |
617 | List result = new LinkedList(); |
618 | result |
619 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
620 | return result; |
621 | } |
622 | |
623 | /** |
624 | * @generated |
625 | */ |
626 | public static List getVariableUsage_3012ContainedLinks(View view) { |
627 | return Collections.EMPTY_LIST; |
628 | } |
629 | |
630 | /** |
631 | * @generated |
632 | */ |
633 | public static List getVariableCharacterisation_3013ContainedLinks(View view) { |
634 | return Collections.EMPTY_LIST; |
635 | } |
636 | |
637 | /** |
638 | * @generated |
639 | */ |
640 | public static List getLoop_3005ContainedLinks(View view) { |
641 | Loop modelElement = (Loop) view.getElement(); |
642 | List result = new LinkedList(); |
643 | result |
644 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
645 | return result; |
646 | } |
647 | |
648 | /** |
649 | * @generated |
650 | */ |
651 | public static List getScenarioBehaviour_3007ContainedLinks(View view) { |
652 | return Collections.EMPTY_LIST; |
653 | } |
654 | |
655 | /** |
656 | * @generated |
657 | */ |
658 | public static List getBranch_3008ContainedLinks(View view) { |
659 | Branch modelElement = (Branch) view.getElement(); |
660 | List result = new LinkedList(); |
661 | result |
662 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
663 | return result; |
664 | } |
665 | |
666 | /** |
667 | * @generated |
668 | */ |
669 | public static List getBranchTransition_3009ContainedLinks(View view) { |
670 | return Collections.EMPTY_LIST; |
671 | } |
672 | |
673 | /** |
674 | * @generated |
675 | */ |
676 | public static List getScenarioBehaviour_3010ContainedLinks(View view) { |
677 | return Collections.EMPTY_LIST; |
678 | } |
679 | |
680 | /** |
681 | * @generated |
682 | */ |
683 | public static List getDelay_3017ContainedLinks(View view) { |
684 | Delay modelElement = (Delay) view.getElement(); |
685 | List result = new LinkedList(); |
686 | result |
687 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
688 | return result; |
689 | } |
690 | |
691 | /** |
692 | * @generated |
693 | */ |
694 | public static List getClosedWorkload_3015ContainedLinks(View view) { |
695 | return Collections.EMPTY_LIST; |
696 | } |
697 | |
698 | /** |
699 | * @generated |
700 | */ |
701 | public static List getOpenWorkload_3016ContainedLinks(View view) { |
702 | return Collections.EMPTY_LIST; |
703 | } |
704 | |
705 | /** |
706 | * @generated |
707 | */ |
708 | public static List getUsageScenario_2004IncomingLinks(View view) { |
709 | return Collections.EMPTY_LIST; |
710 | } |
711 | |
712 | /** |
713 | * @generated |
714 | */ |
715 | public static List getScenarioBehaviour_3014IncomingLinks(View view) { |
716 | return Collections.EMPTY_LIST; |
717 | } |
718 | |
719 | /** |
720 | * @generated |
721 | */ |
722 | public static List getStart_3001IncomingLinks(View view) { |
723 | Start modelElement = (Start) view.getElement(); |
724 | Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource() |
725 | .getResourceSet().getResources()); |
726 | List result = new LinkedList(); |
727 | result |
728 | .addAll(getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
729 | modelElement, crossReferences)); |
730 | return result; |
731 | } |
732 | |
733 | /** |
734 | * @generated |
735 | */ |
736 | public static List getStop_3002IncomingLinks(View view) { |
737 | Stop modelElement = (Stop) view.getElement(); |
738 | Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource() |
739 | .getResourceSet().getResources()); |
740 | List result = new LinkedList(); |
741 | result |
742 | .addAll(getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
743 | modelElement, crossReferences)); |
744 | return result; |
745 | } |
746 | |
747 | /** |
748 | * @generated |
749 | */ |
750 | public static List getEntryLevelSystemCall_3003IncomingLinks(View view) { |
751 | EntryLevelSystemCall modelElement = (EntryLevelSystemCall) view |
752 | .getElement(); |
753 | Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource() |
754 | .getResourceSet().getResources()); |
755 | List result = new LinkedList(); |
756 | result |
757 | .addAll(getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
758 | modelElement, crossReferences)); |
759 | return result; |
760 | } |
761 | |
762 | /** |
763 | * @generated |
764 | */ |
765 | public static List getVariableUsage_3012IncomingLinks(View view) { |
766 | return Collections.EMPTY_LIST; |
767 | } |
768 | |
769 | /** |
770 | * @generated |
771 | */ |
772 | public static List getVariableCharacterisation_3013IncomingLinks(View view) { |
773 | return Collections.EMPTY_LIST; |
774 | } |
775 | |
776 | /** |
777 | * @generated |
778 | */ |
779 | public static List getLoop_3005IncomingLinks(View view) { |
780 | Loop modelElement = (Loop) view.getElement(); |
781 | Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource() |
782 | .getResourceSet().getResources()); |
783 | List result = new LinkedList(); |
784 | result |
785 | .addAll(getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
786 | modelElement, crossReferences)); |
787 | return result; |
788 | } |
789 | |
790 | /** |
791 | * @generated |
792 | */ |
793 | public static List getScenarioBehaviour_3007IncomingLinks(View view) { |
794 | return Collections.EMPTY_LIST; |
795 | } |
796 | |
797 | /** |
798 | * @generated |
799 | */ |
800 | public static List getBranch_3008IncomingLinks(View view) { |
801 | Branch modelElement = (Branch) view.getElement(); |
802 | Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource() |
803 | .getResourceSet().getResources()); |
804 | List result = new LinkedList(); |
805 | result |
806 | .addAll(getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
807 | modelElement, crossReferences)); |
808 | return result; |
809 | } |
810 | |
811 | /** |
812 | * @generated |
813 | */ |
814 | public static List getBranchTransition_3009IncomingLinks(View view) { |
815 | return Collections.EMPTY_LIST; |
816 | } |
817 | |
818 | /** |
819 | * @generated |
820 | */ |
821 | public static List getScenarioBehaviour_3010IncomingLinks(View view) { |
822 | return Collections.EMPTY_LIST; |
823 | } |
824 | |
825 | /** |
826 | * @generated |
827 | */ |
828 | public static List getDelay_3017IncomingLinks(View view) { |
829 | Delay modelElement = (Delay) view.getElement(); |
830 | Map crossReferences = EcoreUtil.CrossReferencer.find(view.eResource() |
831 | .getResourceSet().getResources()); |
832 | List result = new LinkedList(); |
833 | result |
834 | .addAll(getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
835 | modelElement, crossReferences)); |
836 | return result; |
837 | } |
838 | |
839 | /** |
840 | * @generated |
841 | */ |
842 | public static List getClosedWorkload_3015IncomingLinks(View view) { |
843 | return Collections.EMPTY_LIST; |
844 | } |
845 | |
846 | /** |
847 | * @generated |
848 | */ |
849 | public static List getOpenWorkload_3016IncomingLinks(View view) { |
850 | return Collections.EMPTY_LIST; |
851 | } |
852 | |
853 | /** |
854 | * @generated |
855 | */ |
856 | public static List getUsageScenario_2004OutgoingLinks(View view) { |
857 | return Collections.EMPTY_LIST; |
858 | } |
859 | |
860 | /** |
861 | * @generated |
862 | */ |
863 | public static List getScenarioBehaviour_3014OutgoingLinks(View view) { |
864 | return Collections.EMPTY_LIST; |
865 | } |
866 | |
867 | /** |
868 | * @generated |
869 | */ |
870 | public static List getStart_3001OutgoingLinks(View view) { |
871 | Start modelElement = (Start) view.getElement(); |
872 | List result = new LinkedList(); |
873 | result |
874 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
875 | return result; |
876 | } |
877 | |
878 | /** |
879 | * @generated |
880 | */ |
881 | public static List getStop_3002OutgoingLinks(View view) { |
882 | Stop modelElement = (Stop) view.getElement(); |
883 | List result = new LinkedList(); |
884 | result |
885 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
886 | return result; |
887 | } |
888 | |
889 | /** |
890 | * @generated |
891 | */ |
892 | public static List getEntryLevelSystemCall_3003OutgoingLinks(View view) { |
893 | EntryLevelSystemCall modelElement = (EntryLevelSystemCall) view |
894 | .getElement(); |
895 | List result = new LinkedList(); |
896 | result |
897 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
898 | return result; |
899 | } |
900 | |
901 | /** |
902 | * @generated |
903 | */ |
904 | public static List getVariableUsage_3012OutgoingLinks(View view) { |
905 | return Collections.EMPTY_LIST; |
906 | } |
907 | |
908 | /** |
909 | * @generated |
910 | */ |
911 | public static List getVariableCharacterisation_3013OutgoingLinks(View view) { |
912 | return Collections.EMPTY_LIST; |
913 | } |
914 | |
915 | /** |
916 | * @generated |
917 | */ |
918 | public static List getLoop_3005OutgoingLinks(View view) { |
919 | Loop modelElement = (Loop) view.getElement(); |
920 | List result = new LinkedList(); |
921 | result |
922 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
923 | return result; |
924 | } |
925 | |
926 | /** |
927 | * @generated |
928 | */ |
929 | public static List getScenarioBehaviour_3007OutgoingLinks(View view) { |
930 | return Collections.EMPTY_LIST; |
931 | } |
932 | |
933 | /** |
934 | * @generated |
935 | */ |
936 | public static List getBranch_3008OutgoingLinks(View view) { |
937 | Branch modelElement = (Branch) view.getElement(); |
938 | List result = new LinkedList(); |
939 | result |
940 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
941 | return result; |
942 | } |
943 | |
944 | /** |
945 | * @generated |
946 | */ |
947 | public static List getBranchTransition_3009OutgoingLinks(View view) { |
948 | return Collections.EMPTY_LIST; |
949 | } |
950 | |
951 | /** |
952 | * @generated |
953 | */ |
954 | public static List getScenarioBehaviour_3010OutgoingLinks(View view) { |
955 | return Collections.EMPTY_LIST; |
956 | } |
957 | |
958 | /** |
959 | * @generated |
960 | */ |
961 | public static List getDelay_3017OutgoingLinks(View view) { |
962 | Delay modelElement = (Delay) view.getElement(); |
963 | List result = new LinkedList(); |
964 | result |
965 | .addAll(getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002(modelElement)); |
966 | return result; |
967 | } |
968 | |
969 | /** |
970 | * @generated |
971 | */ |
972 | public static List getClosedWorkload_3015OutgoingLinks(View view) { |
973 | return Collections.EMPTY_LIST; |
974 | } |
975 | |
976 | /** |
977 | * @generated |
978 | */ |
979 | public static List getOpenWorkload_3016OutgoingLinks(View view) { |
980 | return Collections.EMPTY_LIST; |
981 | } |
982 | |
983 | /** |
984 | * @generated |
985 | */ |
986 | private static Collection getIncomingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
987 | AbstractUserAction target, Map crossReferences) { |
988 | Collection result = new LinkedList(); |
989 | Collection settings = (Collection) crossReferences.get(target); |
990 | for (Iterator it = settings.iterator(); it.hasNext();) { |
991 | EStructuralFeature.Setting setting = (EStructuralFeature.Setting) it |
992 | .next(); |
993 | if (setting.getEStructuralFeature() == UsagemodelPackage.eINSTANCE |
994 | .getAbstractUserAction_Successor()) { |
995 | result |
996 | .add(new PalladioComponentModelLinkDescriptor( |
997 | setting.getEObject(), |
998 | target, |
999 | PalladioComponentModelElementTypes.AbstractUserActionSuccessor_4002, |
1000 | AbstractUserActionSuccessorEditPart.VISUAL_ID)); |
1001 | } |
1002 | } |
1003 | return result; |
1004 | } |
1005 | |
1006 | /** |
1007 | * @generated |
1008 | */ |
1009 | private static Collection getOutgoingFeatureModelFacetLinks_AbstractUserAction_Successor_4002( |
1010 | AbstractUserAction source) { |
1011 | Collection result = new LinkedList(); |
1012 | AbstractUserAction destination = source.getSuccessor(); |
1013 | if (destination == null) { |
1014 | return result; |
1015 | } |
1016 | result |
1017 | .add(new PalladioComponentModelLinkDescriptor( |
1018 | source, |
1019 | destination, |
1020 | PalladioComponentModelElementTypes.AbstractUserActionSuccessor_4002, |
1021 | AbstractUserActionSuccessorEditPart.VISUAL_ID)); |
1022 | return result; |
1023 | } |
1024 | |
1025 | } |