void (@NotNull AnAction action, @NotNull AnActionEvent event) { if (action instanceof EditorAction && ((EditorAction)action).getHandlerOfType(EditorWriteActionHandler.class) != null) { onChange(event.getDataContext()); } }