@NotNull
  public static GlobalSearchScope getMaximalScope(@NotNull FindUsagesHandlerBase handler) {
    PsiElement element = handler.getPsiElement();
    Project project = element.getProject();
    PsiFile file = element.getContainingFile();
    if (file != null && ProjectFileIndex.getInstance(project).isInContent(file.getViewProvider().getVirtualFile())) {
      return GlobalSearchScope.projectScope(project);
    }
    return GlobalSearchScope.allScope(project);
  }
@NotNull
  public static GlobalSearchScope getMaximalScope(@NotNull FindUsagesHandlerBase handler)