Search in sources :

Example 1 with ConnectionReconnectCommand

use of org.whole.lang.ui.commands.ConnectionReconnectCommand in project whole by wholeplatform.

the class WholeNodeEditPolicy method getReconnectTargetCommand.

protected Command getReconnectTargetCommand(ReconnectRequest request) {
    FeatureDescriptor fd = getNodeEditPart().getTargetConnectionFeature(request);
    if (fd == null)
        return UnexecutableCommand.INSTANCE;
    ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(false);
    cmd.setConnection((IEntity) request.getConnectionEditPart().getModel());
    cmd.setNode(getNode());
    cmd.setNodeFeature(fd);
    return cmd;
}
Also used : FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor) ConnectionReconnectCommand(org.whole.lang.ui.commands.ConnectionReconnectCommand)

Example 2 with ConnectionReconnectCommand

use of org.whole.lang.ui.commands.ConnectionReconnectCommand in project whole by wholeplatform.

the class WholeNodeEditPolicy method getReconnectSourceCommand.

protected Command getReconnectSourceCommand(ReconnectRequest request) {
    FeatureDescriptor fd = getNodeEditPart().getSourceConnectionFeature(request);
    if (fd == null)
        return UnexecutableCommand.INSTANCE;
    ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(true);
    cmd.setConnection((IEntity) request.getConnectionEditPart().getModel());
    cmd.setNode(getNode());
    cmd.setNodeFeature(fd);
    return cmd;
}
Also used : FeatureDescriptor(org.whole.lang.reflect.FeatureDescriptor) ConnectionReconnectCommand(org.whole.lang.ui.commands.ConnectionReconnectCommand)

Aggregations

FeatureDescriptor (org.whole.lang.reflect.FeatureDescriptor)2 ConnectionReconnectCommand (org.whole.lang.ui.commands.ConnectionReconnectCommand)2