void (KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (myApplyAction == null) return; try (AccessToken ignore = SlowOperations.startSection(SlowOperations.ACTION_PERFORM)) { myApplyAction.consume(e); } } }