private static boolean isAvailable(@NotNull AnActionEvent e) {
    Project project = e.getProject();
    Editor editor = e.getData(CommonDataKeys.EDITOR);
    return project != null && !LightEdit.owns(project) && getSelectedFile(e) != null &&
           (!ActionPlaces.isPopupPlace(e.getPlace()) || editor == null || !editor.getSelectionModel().hasSelection());
  }
private static boolean isAvailable(@NotNull AnActionEvent e)