* (org.eclipse.gef.requests.ReconnectRequest)
*/
protected Command getReconnectSourceCommand(ReconnectRequest request) {
Connection conn = (Connection) request.getConnectionEditPart().getModel();
AbstractModelShape newSource = (AbstractModelShape) getHost().getModel();
ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(conn);
cmd.setNewSource(newSource);
return cmd;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy# getReconnectTargetCommand
* (org.eclipse.gef.requests.ReconnectRequest)
*/
protected Command getReconnectTargetCommand(ReconnectRequest request) {
Connection conn = (Connection) request.getConnectionEditPart().getModel();
AbstractModelShape newTarget = (AbstractModelShape) getHost().getModel();
ConnectionReconnectCommand cmd = new ConnectionReconnectCommand(conn);
cmd.setNewTarget(newTarget);
return cmd;
}
});
}