use of org.whole.lang.ui.commands.ConnectionCreateCommand in project whole by wholeplatform.
the class WholeNodeEditPolicy method getConnectionCreateCommand.
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
FeatureDescriptor fd = getNodeEditPart().getSourceConnectionFeature(request);
if (fd == null)
return UnexecutableCommand.INSTANCE;
ConnectionCreateCommand cmd = new ConnectionCreateCommand();
cmd.setSource(getNode());
cmd.setSourceFeature(fd);
request.setStartCommand(cmd);
return cmd;
}
use of org.whole.lang.ui.commands.ConnectionCreateCommand in project whole by wholeplatform.
the class WholeNodeEditPolicy method getConnectionCompleteCommand.
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
FeatureDescriptor fd = getNodeEditPart().getTargetConnectionFeature(request);
if (fd == null)
return UnexecutableCommand.INSTANCE;
ConnectionCreateCommand cmd = (ConnectionCreateCommand) request.getStartCommand();
if (cmd == null)
return UnexecutableCommand.INSTANCE;
cmd.setConnection((IEntity) request.getNewObject());
cmd.setTarget(getNode());
cmd.setTargetFeature(fd);
return cmd;
}
Aggregations