}
@Override
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
if (request.getStartCommand() instanceof FixedConnectionCreateCommand) {
FixedConnectionCreateCommand cmd = (FixedConnectionCreateCommand) request.getStartCommand();
ConnectionAnchor anchor = getActivityPart().getTargetConnectionAnchor(request);
if (anchor instanceof FixedConnectionAnchor) {
FixedConnectionAnchor fixedAnchor = (FixedConnectionAnchor) anchor;
cmd.setTargetAnchor(fixedAnchor);
}
else {
cmd.setTargetAnchor(null);
}
cmd.setTarget(getActivity());
return cmd;
}
return super.getConnectionCompleteCommand(request);
}