Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java
index 9737d4fbd53..ad74a7bbe2e 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/src/org/eclipse/papyrus/uml/diagram/clazz/edit/parts/InstanceSpecificationSlotCompartmentEditPartCN.java
@@ -42,7 +42,7 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
/**
* @generated
*/
- public static final int VISUAL_ID = 7035;
+ public static final String VISUAL_ID = "7035";
/**
* @generated
@@ -78,9 +78,8 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
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.clazz.edit.policies.InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN());
-
+ //in Papyrus diagrams are not strongly synchronised
+ //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.clazz.edit.policies.InstanceSpecificationSlotCompartmentCanonicalEditPolicyCN());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
@@ -91,7 +90,7 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
*/
@Override
protected void setRatio(Double ratio) {
- if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
super.setRatio(ratio);
}
}
@@ -101,7 +100,6 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
*/
@Override
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
@@ -111,8 +109,7 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
@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);
@@ -122,13 +119,13 @@ public class InstanceSpecificationSlotCompartmentEditPartCN extends ListCompartm
* @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));
}
/**

Back to the top