use of org.yakindu.base.gmf.runtime.treelayout.commands.UpdateAnnotationsOnCreationCommand in project statecharts by Yakindu.
the class TreeLayoutEditPolicy method getCreateCommand.
@Override
protected Command getCreateCommand(CreateRequest request) {
final CompoundCommand cmd = new CompoundCommand();
cmd.add(super.getCreateCommand(request));
if (request instanceof CreateViewAndElementRequest) {
final CreateViewAndElementRequest req = (CreateViewAndElementRequest) request;
if (shouldUpdateAnnotationsOnCreation(req)) {
cmd.add(new ICommandProxy(new UpdateAnnotationsOnCreationCommand(getHost().getEditingDomain(), req)));
}
}
return cmd;
}
Aggregations