diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityCNContentCompartmentEditPart.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityCNContentCompartmentEditPart.java | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityCNContentCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityCNContentCompartmentEditPart.java index a691a4bb357..e3100812101 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityCNContentCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/ActivityCNContentCompartmentEditPart.java @@ -34,7 +34,7 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment /** * @generated */ - public static final int VISUAL_ID = 7013; + public static final String VISUAL_ID = "7013"; /** * @generated @@ -56,7 +56,7 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment */ @Override public IFigure createFigure() { - ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure(); + ResizableCompartmentFigure result = (ResizableCompartmentFigure)super.createFigure(); result.setBorder(null); result.setTitleVisibility(false); return result; @@ -74,7 +74,6 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy()); //in Papyrus diagrams are not strongly synchronised //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.activity.edit.policies.ActivityCNContentCompartmentCanonicalEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); installEditPolicy(EditPolicyRoles.CREATION_ROLE, new ActivityParameterNodeInCompartmentCreationEditPolicy()); installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ @@ -87,7 +86,7 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment */ @Override protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { + if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { super.setRatio(ratio); } } @@ -96,7 +95,6 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment * @generated */ public EditPart getTargetEditPart(Request request) { - return super.getTargetEditPart(request); } @@ -106,10 +104,7 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment @Override protected void handleNotificationEvent(Notification notification) { Object feature = notification.getFeature(); - if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) - || NotationPackage.eINSTANCE.getSize_Height().equals(feature) - || NotationPackage.eINSTANCE.getLocation_X().equals(feature) - || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) { + if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) { refreshBounds(); } super.handleNotificationEvent(notification); @@ -119,16 +114,13 @@ public class ActivityCNContentCompartmentEditPart extends LinkLFShapeCompartment * @generated */ protected void refreshBounds() { - int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); - int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); Dimension size = new Dimension(width, height); - int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); - int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); + ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size)); } /** |