void (MouseEvent event, EditableArea area) { if (myTool != null) { try { switch (event.getID()) { case MouseEvent.MOUSE_PRESSED -> { myTool.mouseDown(event, area); if (event.isPopupTrigger()) { myTool.mousePopup(event, area); } } case MouseEvent.MOUSE_RELEASED -> { myTool.mouseUp(event, area); if (event.isPopupTrigger()) { myTool.mousePopup(event, area); } } case MouseEvent.MOUSE_ENTERED -> myTool.mouseEntered(event, area); case MouseEvent.MOUSE_EXITED -> myTool.mouseExited(event, area); case MouseEvent.MOUSE_CLICKED -> { if (event.getClickCount() == 2) { myTool.mouseDoubleClick(event, area); } if (event.isPopupTrigger()) { myTool.mousePopup(event, area); } } case MouseEvent.MOUSE_MOVED -> myTool.mouseMove(event, area); case MouseEvent.MOUSE_DRAGGED -> myTool.mouseDrag(event, area); } } catch (Throwable e) { showError(DesignerBundle.message("tool.provider.edit.operation"), e); } } }