* @see org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy#getReconnectTargetCommand(org.eclipse.gef.requests.ReconnectRequest)
*/
protected Command getReconnectTargetCommand(ReconnectRequest request) {
if (request.getConnectionEditPart().getModel() instanceof IStateTransition
&& getHost().getModel() instanceof ITransitionableTo) {
ReconnectTargetCommand cmd = new ReconnectTargetCommand();
cmd.setTransition((IStateTransition) request
.getConnectionEditPart().getModel());
cmd.setTarget((ITransitionableTo) getState());
return cmd;
}
else if (request.getConnectionEditPart().getModel() instanceof IIfTransition
&& getHost().getModel() instanceof ITransitionableTo) {
ReconnectIfTransitionTargetCommand cmd = new ReconnectIfTransitionTargetCommand();
cmd.setTransition((IIfTransition) request.getConnectionEditPart()
.getModel());
cmd.setTarget((ITransitionableTo) getState());
return cmd;
}
return null;
}