Search in sources :

Example 1 with SetPreferredSizeRequest

use of org.yakindu.sct.ui.editor.policies.SetPreferredSizeRequest in project statecharts by Yakindu.

the class InlineSubdiagramHandler method setPreferredSize.

private Object setPreferredSize(ExecutionEvent event) {
    IGraphicalEditPart editPart = (IGraphicalEditPart) getFirstElement(HandlerUtil.getCurrentSelection(event));
    Command cmd = editPart.getCommand(new SetPreferredSizeRequest(editPart));
    AbstractRefactoring.executeCommand(new CommandProxy(cmd), editPart.resolveSemanticElement().eResource());
    return null;
}
Also used : IGraphicalEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) CommandProxy(org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy) Command(org.eclipse.gef.commands.Command) SetPreferredSizeRequest(org.yakindu.sct.ui.editor.policies.SetPreferredSizeRequest)

Aggregations

Command (org.eclipse.gef.commands.Command)1 CommandProxy (org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy)1 IGraphicalEditPart (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)1 SetPreferredSizeRequest (org.yakindu.sct.ui.editor.policies.SetPreferredSizeRequest)1