public static boolean isSearchTextOccurrencesEnabled(@NotNull PsiElement element) {
    FindUsagesManager findUsagesManager = ((FindManagerImpl)FindManager.getInstance(element.getProject())).getFindUsagesManager();
    FindUsagesHandler handler = findUsagesManager.getFindUsagesHandler(element, true);
    return FindUsagesUtil.isSearchForTextOccurrencesAvailable(element, false, handler);
  }
public static boolean isSearchTextOccurrencesEnabled(@NotNull PsiElement element)