public boolean handleEvent(VisualElementEvent event)
{
if (event.type == VisualElementEvent.DOUBLE_CLICK)
{
DrawingEditorPlugin editor = getDrawing().getEditor();
editor.startUndo("Remove Link Control Point");
if (!joinSegments(event.x, event.y))
{
splitSegment(event.x, event.y);
ModelerUndoable undoable = (ModelerUndoable) ((Modeler) editor).getCurrentUndoable();
undoable.setDisplayName("Add Link Control Point");
}
editor.view().toggleSelection(this);
editor.view().toggleSelection(this);
editor.endUndo();
layoutConnection();
return true;
}