use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy in project statecharts by Yakindu.
the class StateFigureCompartmentEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new StateCompartmentCreationEditPolicy());
installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new StateCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new CompartmentLayoutEditPolicy(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS));
removeEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
}
use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy in project statecharts by Yakindu.
the class StatechartDiagramEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new CompositeElementCanonicalEditPolicy());
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutEditPolicy());
removeEditPolicy(EditPolicyRoles.POPUPBAR_ROLE);
installEditPolicy(EditPolicyRoles.SNAP_FEEDBACK_ROLE, new SimpleSnapFeedbackPolicy());
}
use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy in project statecharts by Yakindu.
the class RegionCompartmentEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CompartmentCreationEditPolicy());
installEditPolicy(EditPolicyRoles.CANONICAL_ROLE, new RegionCompartmentCanonicalEditPolicy());
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
installEditPolicy(EditPolicy.LAYOUT_ROLE, new XYLayoutEditPolicy() {
@Override
protected Command getResizeChildrenCommand(ChangeBoundsRequest request) {
// Remove dithering connection anchors
CompoundCommand result = new CompoundCommand();
result.add(super.getResizeChildrenCommand(request));
AdjustIdentityAnchorCommand command = new AdjustIdentityAnchorCommand(TransactionUtil.getEditingDomain(resolveSemanticElement()), request);
result.add(new ICommandProxy(command));
return result;
}
});
// Removes the collapse expand handler
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableEditPolicyEx());
installEditPolicy(EditPolicyRoles.SNAP_FEEDBACK_ROLE, new SimpleSnapFeedbackPolicy());
}
Aggregations