1 | /* |
2 | * Copyright 2006 SDQ Research Group, University of Karlsruhe (TH) |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.seff.edit.parts; |
5 | |
6 | import java.util.ArrayList; |
7 | import java.util.List; |
8 | |
9 | import org.eclipse.draw2d.IFigure; |
10 | import org.eclipse.draw2d.RectangleFigure; |
11 | import org.eclipse.draw2d.Shape; |
12 | import org.eclipse.draw2d.StackLayout; |
13 | import org.eclipse.draw2d.geometry.Dimension; |
14 | import org.eclipse.gef.EditPart; |
15 | import org.eclipse.gef.EditPolicy; |
16 | import org.eclipse.gef.Request; |
17 | import org.eclipse.gef.commands.Command; |
18 | import org.eclipse.gef.editpolicies.LayoutEditPolicy; |
19 | import org.eclipse.gef.editpolicies.NonResizableEditPolicy; |
20 | import org.eclipse.gef.requests.CreateRequest; |
21 | import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; |
22 | import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart; |
23 | import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; |
24 | import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; |
25 | import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; |
26 | import org.eclipse.gmf.runtime.emf.type.core.IElementType; |
27 | import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; |
28 | import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure; |
29 | import org.eclipse.gmf.runtime.notation.View; |
30 | import org.eclipse.swt.graphics.Color; |
31 | |
32 | import de.uka.ipd.sdq.pcm.gmf.seff.edit.policies.AcquireAction2ItemSemanticEditPolicy; |
33 | import de.uka.ipd.sdq.pcm.gmf.seff.part.PalladioComponentModelVisualIDRegistry; |
34 | import de.uka.ipd.sdq.pcm.gmf.seff.providers.PalladioComponentModelElementTypes; |
35 | |
36 | /** |
37 | * @generated |
38 | */ |
39 | public class AcquireAction2EditPart extends ShapeNodeEditPart { |
40 | |
41 | /** |
42 | * @generated |
43 | */ |
44 | public static final int VISUAL_ID = 3026; |
45 | |
46 | /** |
47 | * @generated |
48 | */ |
49 | protected IFigure contentPane; |
50 | |
51 | /** |
52 | * @generated |
53 | */ |
54 | protected IFigure primaryShape; |
55 | |
56 | /** |
57 | * @generated |
58 | */ |
59 | public AcquireAction2EditPart(View view) { |
60 | super(view); |
61 | } |
62 | |
63 | /** |
64 | * @generated |
65 | */ |
66 | protected void createDefaultEditPolicies() { |
67 | super.createDefaultEditPolicies(); |
68 | installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, |
69 | new AcquireAction2ItemSemanticEditPolicy()); |
70 | installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); |
71 | // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies |
72 | // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); |
73 | } |
74 | |
75 | /** |
76 | * @generated |
77 | */ |
78 | protected LayoutEditPolicy createLayoutEditPolicy() { |
79 | LayoutEditPolicy lep = new LayoutEditPolicy() { |
80 | |
81 | protected EditPolicy createChildEditPolicy(EditPart child) { |
82 | EditPolicy result = child |
83 | .getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); |
84 | if (result == null) { |
85 | result = new NonResizableEditPolicy(); |
86 | } |
87 | return result; |
88 | } |
89 | |
90 | protected Command getMoveChildrenCommand(Request request) { |
91 | return null; |
92 | } |
93 | |
94 | protected Command getCreateCommand(CreateRequest request) { |
95 | return null; |
96 | } |
97 | }; |
98 | return lep; |
99 | } |
100 | |
101 | /** |
102 | * @generated |
103 | */ |
104 | protected IFigure createNodeShape() { |
105 | AquireFigure figure = new AquireFigure(); |
106 | return primaryShape = figure; |
107 | } |
108 | |
109 | /** |
110 | * @generated |
111 | */ |
112 | public AquireFigure getPrimaryShape() { |
113 | return (AquireFigure) primaryShape; |
114 | } |
115 | |
116 | /** |
117 | * @generated |
118 | */ |
119 | protected boolean addFixedChild(EditPart childEditPart) { |
120 | if (childEditPart instanceof AcquireActionEntityName2EditPart) { |
121 | ((AcquireActionEntityName2EditPart) childEditPart) |
122 | .setLabel(getPrimaryShape() |
123 | .getFigureAquireNameLabelFigure()); |
124 | return true; |
125 | } |
126 | return false; |
127 | } |
128 | |
129 | /** |
130 | * @generated |
131 | */ |
132 | protected boolean removeFixedChild(EditPart childEditPart) { |
133 | if (childEditPart instanceof AcquireActionEntityName2EditPart) { |
134 | return true; |
135 | } |
136 | return false; |
137 | } |
138 | |
139 | /** |
140 | * @generated |
141 | */ |
142 | protected void addChildVisual(EditPart childEditPart, int index) { |
143 | if (addFixedChild(childEditPart)) { |
144 | return; |
145 | } |
146 | super.addChildVisual(childEditPart, -1); |
147 | } |
148 | |
149 | /** |
150 | * @generated |
151 | */ |
152 | protected void removeChildVisual(EditPart childEditPart) { |
153 | if (removeFixedChild(childEditPart)) { |
154 | return; |
155 | } |
156 | super.removeChildVisual(childEditPart); |
157 | } |
158 | |
159 | /** |
160 | * @generated |
161 | */ |
162 | protected IFigure getContentPaneFor(IGraphicalEditPart editPart) { |
163 | return getContentPane(); |
164 | } |
165 | |
166 | /** |
167 | * @generated |
168 | */ |
169 | protected NodeFigure createNodePlate() { |
170 | DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40); |
171 | return result; |
172 | } |
173 | |
174 | /** |
175 | * Creates figure for this edit part. |
176 | * |
177 | * Body of this method does not depend on settings in generation model |
178 | * so you may safely remove <i>generated</i> tag and modify it. |
179 | * |
180 | * @generated |
181 | */ |
182 | protected NodeFigure createNodeFigure() { |
183 | NodeFigure figure = createNodePlate(); |
184 | figure.setLayoutManager(new StackLayout()); |
185 | IFigure shape = createNodeShape(); |
186 | figure.add(shape); |
187 | contentPane = setupContentPane(shape); |
188 | return figure; |
189 | } |
190 | |
191 | /** |
192 | * Default implementation treats passed figure as content pane. |
193 | * Respects layout one may have set for generated figure. |
194 | * @param nodeShape instance of generated figure class |
195 | * @generated |
196 | */ |
197 | protected IFigure setupContentPane(IFigure nodeShape) { |
198 | if (nodeShape.getLayoutManager() == null) { |
199 | ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); |
200 | layout.setSpacing(5); |
201 | nodeShape.setLayoutManager(layout); |
202 | } |
203 | return nodeShape; // use nodeShape itself as contentPane |
204 | } |
205 | |
206 | /** |
207 | * @generated |
208 | */ |
209 | public IFigure getContentPane() { |
210 | if (contentPane != null) { |
211 | return contentPane; |
212 | } |
213 | return super.getContentPane(); |
214 | } |
215 | |
216 | /** |
217 | * @generated |
218 | */ |
219 | protected void setForegroundColor(Color color) { |
220 | if (primaryShape != null) { |
221 | primaryShape.setForegroundColor(color); |
222 | } |
223 | } |
224 | |
225 | /** |
226 | * @generated |
227 | */ |
228 | protected void setBackgroundColor(Color color) { |
229 | if (primaryShape != null) { |
230 | primaryShape.setBackgroundColor(color); |
231 | } |
232 | } |
233 | |
234 | /** |
235 | * @generated |
236 | */ |
237 | protected void setLineWidth(int width) { |
238 | if (primaryShape instanceof Shape) { |
239 | ((Shape) primaryShape).setLineWidth(width); |
240 | } |
241 | } |
242 | |
243 | /** |
244 | * @generated |
245 | */ |
246 | protected void setLineType(int style) { |
247 | if (primaryShape instanceof Shape) { |
248 | ((Shape) primaryShape).setLineStyle(style); |
249 | } |
250 | } |
251 | |
252 | /** |
253 | * @generated |
254 | */ |
255 | public EditPart getPrimaryChildEditPart() { |
256 | return getChildBySemanticHint(PalladioComponentModelVisualIDRegistry |
257 | .getType(AcquireActionEntityName2EditPart.VISUAL_ID)); |
258 | } |
259 | |
260 | /** |
261 | * @generated |
262 | */ |
263 | public List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/getMARelTypesOnSource() { |
264 | List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/types = new ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/(); |
265 | types |
266 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
267 | return types; |
268 | } |
269 | |
270 | /** |
271 | * @generated |
272 | */ |
273 | public List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/getMARelTypesOnSourceAndTarget( |
274 | IGraphicalEditPart targetEditPart) { |
275 | List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/types = new ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/(); |
276 | if (targetEditPart instanceof StartActionEditPart) { |
277 | types |
278 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
279 | } |
280 | if (targetEditPart instanceof StopActionEditPart) { |
281 | types |
282 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
283 | } |
284 | if (targetEditPart instanceof ExternalCallActionEditPart) { |
285 | types |
286 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
287 | } |
288 | if (targetEditPart instanceof EmitEventActionEditPart) { |
289 | types |
290 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
291 | } |
292 | if (targetEditPart instanceof LoopActionEditPart) { |
293 | types |
294 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
295 | } |
296 | if (targetEditPart instanceof BranchActionEditPart) { |
297 | types |
298 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
299 | } |
300 | if (targetEditPart instanceof InternalActionEditPart) { |
301 | types |
302 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
303 | } |
304 | if (targetEditPart instanceof CollectionIteratorActionEditPart) { |
305 | types |
306 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
307 | } |
308 | if (targetEditPart instanceof SetVariableActionEditPart) { |
309 | types |
310 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
311 | } |
312 | if (targetEditPart instanceof AcquireActionEditPart) { |
313 | types |
314 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
315 | } |
316 | if (targetEditPart instanceof ReleaseActionEditPart) { |
317 | types |
318 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
319 | } |
320 | if (targetEditPart instanceof ForkActionEditPart) { |
321 | types |
322 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
323 | } |
324 | if (targetEditPart instanceof RecoveryActionEditPart) { |
325 | types |
326 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
327 | } |
328 | if (targetEditPart instanceof StartAction2EditPart) { |
329 | types |
330 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
331 | } |
332 | if (targetEditPart instanceof StopAction2EditPart) { |
333 | types |
334 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
335 | } |
336 | if (targetEditPart instanceof LoopAction2EditPart) { |
337 | types |
338 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
339 | } |
340 | if (targetEditPart instanceof InternalAction2EditPart) { |
341 | types |
342 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
343 | } |
344 | if (targetEditPart instanceof BranchAction2EditPart) { |
345 | types |
346 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
347 | } |
348 | if (targetEditPart instanceof ExternalCallAction2EditPart) { |
349 | types |
350 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
351 | } |
352 | if (targetEditPart instanceof EmitEventAction2EditPart) { |
353 | types |
354 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
355 | } |
356 | if (targetEditPart instanceof de.uka.ipd.sdq.pcm.gmf.seff.edit.parts.AcquireAction2EditPart) { |
357 | types |
358 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
359 | } |
360 | if (targetEditPart instanceof ReleaseAction2EditPart) { |
361 | types |
362 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
363 | } |
364 | if (targetEditPart instanceof ForkAction2EditPart) { |
365 | types |
366 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
367 | } |
368 | if (targetEditPart instanceof CollectionIteratorAction2EditPart) { |
369 | types |
370 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
371 | } |
372 | if (targetEditPart instanceof RecoveryAction2EditPart) { |
373 | types |
374 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
375 | } |
376 | if (targetEditPart instanceof SetVariableAction2EditPart) { |
377 | types |
378 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
379 | } |
380 | return types; |
381 | } |
382 | |
383 | /** |
384 | * @generated |
385 | */ |
386 | public List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/getMATypesForTarget( |
387 | IElementType relationshipType) { |
388 | List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/types = new ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/(); |
389 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
390 | types.add(PalladioComponentModelElementTypes.StartAction_2001); |
391 | } |
392 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
393 | types.add(PalladioComponentModelElementTypes.StopAction_2002); |
394 | } |
395 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
396 | types |
397 | .add(PalladioComponentModelElementTypes.ExternalCallAction_2003); |
398 | } |
399 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
400 | types.add(PalladioComponentModelElementTypes.EmitEventAction_2013); |
401 | } |
402 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
403 | types.add(PalladioComponentModelElementTypes.LoopAction_2004); |
404 | } |
405 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
406 | types.add(PalladioComponentModelElementTypes.BranchAction_2005); |
407 | } |
408 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
409 | types.add(PalladioComponentModelElementTypes.InternalAction_2006); |
410 | } |
411 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
412 | types |
413 | .add(PalladioComponentModelElementTypes.CollectionIteratorAction_2007); |
414 | } |
415 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
416 | types |
417 | .add(PalladioComponentModelElementTypes.SetVariableAction_2008); |
418 | } |
419 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
420 | types.add(PalladioComponentModelElementTypes.AcquireAction_2012); |
421 | } |
422 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
423 | types.add(PalladioComponentModelElementTypes.ReleaseAction_2010); |
424 | } |
425 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
426 | types.add(PalladioComponentModelElementTypes.ForkAction_2011); |
427 | } |
428 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
429 | types.add(PalladioComponentModelElementTypes.RecoveryAction_2016); |
430 | } |
431 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
432 | types.add(PalladioComponentModelElementTypes.StartAction_3004); |
433 | } |
434 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
435 | types.add(PalladioComponentModelElementTypes.StopAction_3005); |
436 | } |
437 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
438 | types.add(PalladioComponentModelElementTypes.LoopAction_3006); |
439 | } |
440 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
441 | types.add(PalladioComponentModelElementTypes.InternalAction_3007); |
442 | } |
443 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
444 | types.add(PalladioComponentModelElementTypes.BranchAction_3009); |
445 | } |
446 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
447 | types |
448 | .add(PalladioComponentModelElementTypes.ExternalCallAction_3012); |
449 | } |
450 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
451 | types.add(PalladioComponentModelElementTypes.EmitEventAction_3046); |
452 | } |
453 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
454 | types.add(PalladioComponentModelElementTypes.AcquireAction_3026); |
455 | } |
456 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
457 | types.add(PalladioComponentModelElementTypes.ReleaseAction_3020); |
458 | } |
459 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
460 | types.add(PalladioComponentModelElementTypes.ForkAction_3023); |
461 | } |
462 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
463 | types |
464 | .add(PalladioComponentModelElementTypes.CollectionIteratorAction_3013); |
465 | } |
466 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
467 | types.add(PalladioComponentModelElementTypes.RecoveryAction_3057); |
468 | } |
469 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
470 | types |
471 | .add(PalladioComponentModelElementTypes.SetVariableAction_3024); |
472 | } |
473 | return types; |
474 | } |
475 | |
476 | /** |
477 | * @generated |
478 | */ |
479 | public List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/getMARelTypesOnTarget() { |
480 | List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/types = new ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/(); |
481 | types |
482 | .add(PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001); |
483 | return types; |
484 | } |
485 | |
486 | /** |
487 | * @generated |
488 | */ |
489 | public List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/getMATypesForSource( |
490 | IElementType relationshipType) { |
491 | List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/types = new ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/(); |
492 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
493 | types.add(PalladioComponentModelElementTypes.StartAction_2001); |
494 | } |
495 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
496 | types.add(PalladioComponentModelElementTypes.StopAction_2002); |
497 | } |
498 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
499 | types |
500 | .add(PalladioComponentModelElementTypes.ExternalCallAction_2003); |
501 | } |
502 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
503 | types.add(PalladioComponentModelElementTypes.EmitEventAction_2013); |
504 | } |
505 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
506 | types.add(PalladioComponentModelElementTypes.LoopAction_2004); |
507 | } |
508 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
509 | types.add(PalladioComponentModelElementTypes.BranchAction_2005); |
510 | } |
511 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
512 | types.add(PalladioComponentModelElementTypes.InternalAction_2006); |
513 | } |
514 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
515 | types |
516 | .add(PalladioComponentModelElementTypes.CollectionIteratorAction_2007); |
517 | } |
518 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
519 | types |
520 | .add(PalladioComponentModelElementTypes.SetVariableAction_2008); |
521 | } |
522 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
523 | types.add(PalladioComponentModelElementTypes.AcquireAction_2012); |
524 | } |
525 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
526 | types.add(PalladioComponentModelElementTypes.ReleaseAction_2010); |
527 | } |
528 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
529 | types.add(PalladioComponentModelElementTypes.ForkAction_2011); |
530 | } |
531 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
532 | types.add(PalladioComponentModelElementTypes.RecoveryAction_2016); |
533 | } |
534 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
535 | types.add(PalladioComponentModelElementTypes.StartAction_3004); |
536 | } |
537 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
538 | types.add(PalladioComponentModelElementTypes.StopAction_3005); |
539 | } |
540 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
541 | types.add(PalladioComponentModelElementTypes.LoopAction_3006); |
542 | } |
543 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
544 | types.add(PalladioComponentModelElementTypes.InternalAction_3007); |
545 | } |
546 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
547 | types.add(PalladioComponentModelElementTypes.BranchAction_3009); |
548 | } |
549 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
550 | types |
551 | .add(PalladioComponentModelElementTypes.ExternalCallAction_3012); |
552 | } |
553 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
554 | types.add(PalladioComponentModelElementTypes.EmitEventAction_3046); |
555 | } |
556 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
557 | types.add(PalladioComponentModelElementTypes.AcquireAction_3026); |
558 | } |
559 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
560 | types.add(PalladioComponentModelElementTypes.ReleaseAction_3020); |
561 | } |
562 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
563 | types.add(PalladioComponentModelElementTypes.ForkAction_3023); |
564 | } |
565 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
566 | types |
567 | .add(PalladioComponentModelElementTypes.CollectionIteratorAction_3013); |
568 | } |
569 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
570 | types.add(PalladioComponentModelElementTypes.RecoveryAction_3057); |
571 | } |
572 | if (relationshipType == PalladioComponentModelElementTypes.AbstractActionSuccessor_AbstractAction_4001) { |
573 | types |
574 | .add(PalladioComponentModelElementTypes.SetVariableAction_3024); |
575 | } |
576 | return types; |
577 | } |
578 | |
579 | /** |
580 | * @generated |
581 | */ |
582 | public class AquireFigure extends RectangleFigure { |
583 | |
584 | /** |
585 | * @generated |
586 | */ |
587 | private WrappingLabel fFigureAquireNameLabelFigure; |
588 | |
589 | /** |
590 | * @generated |
591 | */ |
592 | public AquireFigure() { |
593 | this.setLineWidth(1); |
594 | this.setMinimumSize(new Dimension(getMapMode().DPtoLP(0), |
595 | getMapMode().DPtoLP(0))); |
596 | createContents(); |
597 | } |
598 | |
599 | /** |
600 | * @generated |
601 | */ |
602 | private void createContents() { |
603 | |
604 | WrappingLabel aquireStereotypeLabel0 = new WrappingLabel(); |
605 | aquireStereotypeLabel0.setText("<<AcquireAction>>"); |
606 | |
607 | this.add(aquireStereotypeLabel0); |
608 | |
609 | fFigureAquireNameLabelFigure = new WrappingLabel(); |
610 | fFigureAquireNameLabelFigure.setText("<...>"); |
611 | |
612 | this.add(fFigureAquireNameLabelFigure); |
613 | |
614 | WrappingLabel aquireResourceLabelFigure0 = new WrappingLabel(); |
615 | aquireResourceLabelFigure0.setText(""); |
616 | |
617 | this.add(aquireResourceLabelFigure0); |
618 | |
619 | } |
620 | |
621 | /** |
622 | * @generated |
623 | */ |
624 | private boolean myUseLocalCoordinates = false; |
625 | |
626 | /** |
627 | * @generated |
628 | */ |
629 | protected boolean useLocalCoordinates() { |
630 | return myUseLocalCoordinates; |
631 | } |
632 | |
633 | /** |
634 | * @generated |
635 | */ |
636 | protected void setUseLocalCoordinates(boolean useLocalCoordinates) { |
637 | myUseLocalCoordinates = useLocalCoordinates; |
638 | } |
639 | |
640 | /** |
641 | * @generated |
642 | */ |
643 | public WrappingLabel getFigureAquireNameLabelFigure() { |
644 | return fFigureAquireNameLabelFigure; |
645 | } |
646 | |
647 | } |
648 | |
649 | } |