cmd.setTarget((Box) getHost().getModel());
return cmd;
}
protected Command getConnectionCreateCommand( CreateConnectionRequest request ) {
Box source = (Box) getHost().getModel();
ConnectionCreateCommand cmd = new ConnectionCreateCommand(source);
request.setStartCommand(cmd);
return cmd;
}
protected Command getReconnectTargetCommand( ReconnectRequest request ) {
Connection conn = (Connection) request.getConnectionEditPart().getModel();
Box newTarget = (Box) getHost().getModel();
ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(conn);
cmd.setNewTarget(newTarget);
return cmd;
}
protected Command getReconnectSourceCommand( ReconnectRequest request ) {
Connection conn = (Connection) request.getConnectionEditPart().getModel();
Box newSource = (Box) getHost().getModel();
ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(conn);
cmd.setNewSource(newSource);
return cmd;
}
});
List<BoxFactory> boxes = PrintingPlugin.getDefault().getBoxes();
Box model = (Box) getModel();
BoxPrinter printer = model.getBoxPrinter();
String defaultActionID = null;
for( BoxFactory boxFactory : boxes ) {
if( boxFactory.getType() == printer.getClass() ){
defaultActionID = boxFactory.getDefaultActionID();
break;