@Override
  public void update(@NotNull AnActionEvent event) {
    EditorWindow window = event.getData(EditorWindow.DATA_KEY);
    VirtualFile selectedFile = window == null ? null : window.getContextFile();

    boolean enabled = isEnabled(selectedFile, window);
    event.getPresentation().setEnabledAndVisible(enabled);
  }
@Override
  public void update(@NotNull AnActionEvent event)