public class NodeGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
@Override
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
Node node = getNode();
TransitionCreateCommand command = (TransitionCreateCommand) request.getStartCommand();
if (!node.canAddArrivingTransition(command.getSource())) {
return null;
}
command.setTarget(node);
return command;
}