use of org.csstudio.opibuilder.commands.ConnectionCreateCommand in project yamcs-studio by yamcs.
the class WidgetNodeEditPolicy method getConnectionCreateCommand.
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
AbstractWidgetModel source = getWidgetEditPart().getWidgetModel();
ConnectionAnchor anchor = getWidgetEditPart().getSourceConnectionAnchor(request);
String sourceTerminal = getWidgetEditPart().getTerminalNameFromAnchor(anchor);
ConnectionCreateCommand cmd = new ConnectionCreateCommand(source, sourceTerminal);
request.setStartCommand(cmd);
return cmd;
}
use of org.csstudio.opibuilder.commands.ConnectionCreateCommand in project yamcs-studio by yamcs.
the class WidgetNodeEditPolicy method getConnectionCompleteCommand.
@Override
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
ConnectionCreateCommand cmd = (ConnectionCreateCommand) request.getStartCommand();
cmd.setTarget(getWidgetEditPart().getWidgetModel());
ConnectionAnchor anchor = getWidgetEditPart().getTargetConnectionAnchor(request);
if (anchor == null)
return null;
cmd.setTargetTerminal(getWidgetEditPart().getTerminalNameFromAnchor(anchor));
return cmd;
}
Aggregations