01: package newprocess.diagram.edit.parts;
02:
03: import newprocess.diagram.edit.policies.ExpressionExpressionCompartment7CanonicalEditPolicy;
04: import newprocess.diagram.edit.policies.ExpressionExpressionCompartment7ItemSemanticEditPolicy;
05:
06: import org.eclipse.draw2d.IFigure;
07: import org.eclipse.emf.common.notify.Notification;
08: import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
09: import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
10: import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy;
11: import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
12: import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
13: import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
14: import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
15: import org.eclipse.gmf.runtime.notation.View;
16:
17: /**
18: * @generated
19: */
20: public class ExpressionExpressionCompartment7EditPart extends
21: ShapeCompartmentEditPart {
22:
23: /**
24: * @generated
25: */
26: public static final int VISUAL_ID = 7016;
27:
28: /**
29: * @generated
30: */
31: public ExpressionExpressionCompartment7EditPart(View view) {
32: super (view);
33: }
34:
35: /**
36: * @generated
37: */
38: public String getCompartmentName() {
39: return "ExpressionCompartment";
40: }
41:
42: /**
43: * @generated
44: */
45: public IFigure createFigure() {
46: ResizableCompartmentFigure result = (ResizableCompartmentFigure) super
47: .createFigure();
48: result.setTitleVisibility(false);
49: return result;
50: }
51:
52: /**
53: * @generated
54: */
55: protected void createDefaultEditPolicies() {
56: super .createDefaultEditPolicies();
57: installEditPolicy(
58: EditPolicyRoles.SEMANTIC_ROLE,
59: new ExpressionExpressionCompartment7ItemSemanticEditPolicy());
60: installEditPolicy(EditPolicyRoles.CREATION_ROLE,
61: new CreationEditPolicy());
62: installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE,
63: new DragDropEditPolicy());
64: installEditPolicy(
65: EditPolicyRoles.CANONICAL_ROLE,
66: new ExpressionExpressionCompartment7CanonicalEditPolicy());
67: }
68:
69: /**
70: * @generated
71: */
72: protected void setRatio(Double ratio) {
73: if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
74: super.setRatio(ratio);
75: }
76: }
77: }
|