diff options
author | Etienne Allogo | 2021-06-18 08:51:48 +0000 |
---|---|---|
committer | Vincent Lorenzo | 2021-10-19 16:12:32 +0000 |
commit | 213fb7cfe9dd01da83890448084120e5c0676d5e (patch) | |
tree | 1a6ed99ec86d85e3f9d6698264f3235ff3d4eab9 /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit | |
parent | 1ec3993563b2ae205969881595f0290edb119754 (diff) | |
download | org.eclipse.papyrus-213fb7cfe9dd01da83890448084120e5c0676d5e.tar.gz org.eclipse.papyrus-213fb7cfe9dd01da83890448084120e5c0676d5e.tar.xz org.eclipse.papyrus-213fb7cfe9dd01da83890448084120e5c0676d5e.zip |
Bug 569174: [Toolsmiths] Papyrus integration of GMF Tooling - Pull up refreshVisuals/setRatio for shape compartments
Signed-off-by: Etienne Allogo <etienne.allogo@artal.fr>
Change-Id: I28e6237d72e06523d5c871dc0c4b89dfd8f97674
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit')
7 files changed, 0 insertions, 471 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java index d4040052c99..ee4f321a728 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPart.java @@ -13,19 +13,10 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -82,62 +73,4 @@ public class ComponentCompositeCompartmentEditPart extends LinkLFShapeCompartmen installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CompositeCompartmentCreationEditPolicy()); } - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java index fe91bcce64e..d461cf79754 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartCN.java @@ -13,19 +13,10 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -82,62 +73,4 @@ public class ComponentCompositeCompartmentEditPartCN extends LinkLFShapeCompartm installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CompositeCompartmentCreationEditPolicy()); } - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java index 62e5826b120..9d910b8bdff 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ComponentCompositeCompartmentEditPartPCN.java @@ -13,19 +13,10 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -82,62 +73,4 @@ public class ComponentCompositeCompartmentEditPartPCN extends LinkLFShapeCompart installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CompositeCompartmentCreationEditPolicy()); } - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java index 93c463960e3..899d8a9bf7d 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPart.java @@ -13,18 +13,9 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -78,62 +69,4 @@ public class ModelPackageableElementCompartmentEditPart extends LinkLFShapeCompa installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy()); } - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java index 2682d52fda8..4bdc83cb00b 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/ModelPackageableElementCompartmentEditPartCN.java @@ -13,18 +13,9 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -78,62 +69,4 @@ public class ModelPackageableElementCompartmentEditPartCN extends LinkLFShapeCom installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy()); } - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java index 832956baca6..230fef8c05c 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPart.java @@ -13,18 +13,9 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -77,63 +68,4 @@ public class PackagePackageableElementCompartmentEditPart extends LinkLFShapeCom installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy()); } - - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java index 47df1538762..b94adacdfdb 100755 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component/src-gen/org/eclipse/papyrus/uml/diagram/component/edit/parts/PackagePackageableElementCompartmentEditPartCN.java @@ -13,18 +13,9 @@ */ package org.eclipse.papyrus.uml.diagram.component.edit.parts; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; @@ -77,63 +68,4 @@ public class PackagePackageableElementCompartmentEditPartCN extends LinkLFShapeC installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomDiagramDragDropEditPolicy()); installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy()); } - - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @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)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - 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(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } } |