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