use of org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy in project statecharts by Yakindu.
the class EAttributeDirectEditPolicy method getDirectEditCommand.
@Override
protected Command getDirectEditCommand(DirectEditRequest request) {
SetRequest setRequest = new SetRequest(getHost().resolveSemanticElement(), provider.getAttribute(), request.getCellEditor().getValue());
SetValueCommand setCommand = new SetValueCommand(setRequest);
return new ICommandProxy(setCommand);
}
use of org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy in project statecharts by Yakindu.
the class InitialPointsConnectionBendpointEditPolicy method getBendpointsChangedCommand.
@Override
protected Command getBendpointsChangedCommand(BendpointRequest request) {
PointList originalPoints = InitialPointsOfRequestDataManager.getOriginalPoints(request);
Command result = super.getBendpointsChangedCommand(request);
if (result instanceof ICommandProxy) {
ICommand iCommand = ((ICommandProxy) result).getICommand();
if (iCommand instanceof SetConnectionBendpointsAndLabelCommmand) {
((SetConnectionBendpointsAndLabelCommmand) iCommand).setLabelsToUpdate((org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart) getHost(), originalPoints);
}
}
return result;
}
use of org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy in project tdi-studio-se by Talend.
the class BusinessGraphicalNodeEditPolicy method getConnectionWithReorientedViewCompleteCommand.
/**
* @generated
*/
protected Command getConnectionWithReorientedViewCompleteCommand(CreateConnectionRequest request) {
ICommandProxy c = (ICommandProxy) super.getConnectionCompleteCommand(request);
CompositeCommand cc = (CompositeCommand) c.getICommand();
TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
BusinessReorientConnectionViewCommand rcvCommand = new BusinessReorientConnectionViewCommand(editingDomain, null);
rcvCommand.setEdgeAdaptor(getViewAdapter());
cc.compose(rcvCommand);
return c;
}
use of org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy in project statecharts by Yakindu.
the class TransitionExpressionComponentEditPolicy method createDeleteSemanticCommand.
@Override
protected Command createDeleteSemanticCommand(GroupRequest deleteRequest) {
SetRequest request = new SetRequest(getHost().resolveSemanticElement(), SGraphPackage.Literals.SPECIFICATION_ELEMENT__SPECIFICATION, null);
SetValueCommand result = new SetValueCommand(request);
return new ICommandProxy(result);
}
use of org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy 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