static boolean checkValidForFile(final PsiFile file) {
    try {
      final StructureViewBuilder structureViewBuilder = LanguageStructureViewBuilder.getInstance().getStructureViewBuilder(file);
      return structureViewBuilder instanceof TreeBasedStructureViewBuilder;
    }
    catch (IndexNotReadyException e) {
      return false;
    }
  }
static boolean checkValidForFile(final PsiFile file)