Community
Participate
Working Groups
When you are resizing a NodeEditPart from the top left corner, its children move too. This behavior is logical because this corner is used as reference for there coordinates, but it is not userfriendly. Often the user has already arranged related elements in the diagrams and resizing their parents move them. Papyrus should provide a way to the user to allow it to move/not move the children of the resized element. (Shift key could be a good idea to switch between move and not move).
Done for IBD, BDD and Class Diagram, in : - commit f2ba65f3a63d9843ca19043df0371e1fcd546ba0 branch maintenance-0.10 - commit eee86fab3ee48287d409e467324a91de9135e492 on master Impacted classes : plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/NodeEditPart.java plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/PapyrusDiagramEditPart.java plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpart/XYLayoutShapeCompartmentEditPart.java plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/PapyrusResizableShapeEditPolicy.java plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/editpolicies/XYLayoutWithConstrainedResizedEditPolicy.java plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-gmf/org/eclipse/papyrus/gmf/diagram/common/edit/policy/DefaultXYLayoutEditPolicy.java plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-uml/org/eclipse/papyrus/uml/diagram/common/edit/policy/EncapsulatedClassifierResizableShapeEditPolicy.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/policies/AbstractPackageableElementCompartmentEditPart.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/UpdatePortLocationCommand.java plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite/custom-src/org/eclipse/papyrus/uml/diagram/composite/custom/edit/policies/EncapsulatedClassifierResizableShapeEditPolicy.java For compartments with XYLayout EditPolicy : Compartments must inherits from the new class : XYLayoutShapeCompartmentEditPart (in infra.gmfdiag.common) For DiagramEditPart (done in PapyrusDiagramEditPart) we must install the edit policy : installEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutWithConstrainedResizedEditPolicy()); To manage the Affixed Port, its parent must have : installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new EncapsulatedClassifierResizableShapeEditPolicy()); -> NOT DONE in the Composite + a temporary class has been created : PapyrusResizableShapeEditPolicy waiting the fix of the GMF bug 424943 + the class EncapsulatedClassifierResizableShapeEditPolicy from org.eclipse.papyrus.sysml.diagram.common has been refactored (inherits from ther same class in composite diagram) + modify UpdatePortLocationCommand to be compliant with the requirement of this bug (Port mustn't move) + some others minor changes This behavior must be added on all others diagram with regeneration.
The previous commit work only for nested elements + port. The anchor of the links are not managed
Anchor management is quite important (for part to part connectors in IBD, or associations on BDD).
Anchor management is done for ClassDiagram, IBD and BDD in commits : e6af2dc16006a735716020236f962518dfa265c6 on branch 0.10-maintenance 9094494c25b0f6d44396d747f3bf99084f073e65 on master
Does it mean that this one is fixed and can be closed?
Add an hidden preference to invert default resize and constrained resized bindings commits 7226e489c3df60469c0794f7282b33265ac9182b (0.10-maintenance) 9b11d4e998698a1f5d458fbd3edcc5eeb3af78fe (master) To activate the preference : org.eclipse.papyrus.infra.gmfdiag.common.Activator.getInstance().getPreferenceStore().setValue(PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.INVERT_BINDING_FOR_DEFAULT_RESIZE_AND_CONSTRAINED_RESIZE),true);
Commits 50afef61286ac7f97ca665187bcb31c43d3882a3 (0.10-maintenace) 7f8fcdb7c87a95a9328d1b6079687bd1cdf04232 (master) Fix a bug when the resize is done by SOUTH_WEST or NORTH-EAST.. Previously, children moved even if SHIFT was pressed