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 org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; |
7 | import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy; |
8 | import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; |
9 | import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; |
10 | import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; |
11 | import org.eclipse.gmf.runtime.notation.View; |
12 | |
13 | import de.uka.ipd.sdq.pcm.gmf.seff.edit.policies.ForkActionForkedBehaviours2CanonicalEditPolicy; |
14 | import de.uka.ipd.sdq.pcm.gmf.seff.edit.policies.ForkActionForkedBehaviours2ItemSemanticEditPolicy; |
15 | import de.uka.ipd.sdq.pcm.gmf.seff.part.Messages; |
16 | |
17 | /** |
18 | * @generated |
19 | */ |
20 | public class ForkActionForkedBehaviours2EditPart extends |
21 | ShapeCompartmentEditPart { |
22 | |
23 | /** |
24 | * @generated |
25 | */ |
26 | public static final int VISUAL_ID = 7019; |
27 | |
28 | /** |
29 | * @generated |
30 | */ |
31 | public ForkActionForkedBehaviours2EditPart(View view) { |
32 | super(view); |
33 | } |
34 | |
35 | /** |
36 | * @generated |
37 | */ |
38 | public String getCompartmentName() { |
39 | return Messages.ForkActionForkedBehaviours2EditPart_title; |
40 | } |
41 | |
42 | /** |
43 | * @generated |
44 | */ |
45 | protected void createDefaultEditPolicies() { |
46 | super.createDefaultEditPolicies(); |
47 | installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, |
48 | new ForkActionForkedBehaviours2ItemSemanticEditPolicy()); |
49 | installEditPolicy(EditPolicyRoles.CREATION_ROLE, |
50 | new CreationEditPolicy()); |
51 | installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, |
52 | new DragDropEditPolicy()); |
53 | installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, |
54 | new ForkActionForkedBehaviours2CanonicalEditPolicy()); |
55 | } |
56 | |
57 | /** |
58 | * @generated |
59 | */ |
60 | protected void setRatio(Double ratio) { |
61 | if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { |
62 | super.setRatio(ratio); |
63 | } |
64 | } |
65 | |
66 | } |