public static void addFilesToSearchForGivenWord(@NotNull String word,
                                                  boolean endTransaction,
                                                  @NotNull GlobalCompilingVisitor.OccurenceKind kind,
                                                  @NotNull CompileContext compileContext) {
    if (!compileContext.getSearchHelper().doOptimizing()) {
      return;
    }
    final StructuralSearchProfile profile =
      StructuralSearchUtil.getProfileByFileType(compileContext.getOptions().getFileType());
    assert profile != null;
    if (profile.getReservedWords().contains(word)) return; // skip our special annotations !!!

    if (kind == GlobalCompilingVisitor.OccurenceKind.CODE) {
      compileContext.getSearchHelper().addWordToSearchInCode(word);
    }
    else if (kind == GlobalCompilingVisitor.OccurenceKind.COMMENT) {
      compileContext.getSearchHelper().addWordToSearchInComments(word);
    }
    else if (kind == GlobalCompilingVisitor.OccurenceKind.LITERAL) {
      compileContext.getSearchHelper().addWordToSearchInLiterals(word);
    }
    else if (kind == GlobalCompilingVisitor.OccurenceKind.TEXT) {
      compileContext.getSearchHelper().addWordToSearchInText(word);
    }

    if (endTransaction) {
      compileContext.getSearchHelper().endTransaction();
    }
  }
public static void addFilesToSearchForGivenWord(@NotNull String word,
                                                  boolean endTransaction,
                                                  @NotNull GlobalCompilingVisitor.OccurenceKind kind,
                                                  @NotNull CompileContext compileContext)