void (KeyEvent event, EditableArea area) { if (myTool != null) { try { switch (event.getID()) { case KeyEvent.KEY_PRESSED -> myTool.keyPressed(event, area); case KeyEvent.KEY_TYPED -> myTool.keyTyped(event, area); case KeyEvent.KEY_RELEASED -> myTool.keyReleased(event, area); } } catch (Throwable e) { showError(DesignerBundle.message("tool.provider.edit.operation"), e); } } }