UmlConnection conn =
editor.getDiagram().getElementFactory().createConnection(relationType,
(UmlNode) source, (UmlNode) elem);
connectMethod.generateAndSetPointsToConnection(conn, source,
(UmlNode) elem, anchor, tmpPos);
AddElementCommand command = new AddElementCommand(editor,
editor.getDiagram(), conn);
editor.execute(command);
}
isDragging = false;
editor.redraw();