fault boolean handleWord(@Nullable String text, GlobalCompilingVisitor.OccurenceKind kind, CompileContext compileContext) {
    final OptimizingSearchHelper searchHelper = compileContext.getSearchHelper();
    if (!searchHelper.doOptimizing()) {
      return false;
    }
    if (text == null) {
      return true;
    }
    for (String word : StringUtil.getWordsInStringLongestFirst(text)) {
      final CompiledPattern pattern = compileContext.getPattern();
      if (pattern.isTypedVar(word)) {
        final SubstitutionHandler handler = (SubstitutionHandler)pattern.getHandler(word);
        if (handler == null || handler.getMinOccurs() == 0) {
          // don't call super visit so psi tree is not processed deeper
          return false;
        }

        final RegExpPredicate predicate = handler.findPredicate(RegExpPredicate.class);
        if (predicate != null && predicate.couldBeOptimized()) {
          if (handler.isStrictSubtype() || handler.isSubtype()) {
            final List<String> descendants = getDescendantsOf(predicate.getRegExp(), handler.isSubtype(), compileContext.getProject());
            for (String descendant : descendants) {
              searchHelper.addWordToSearchInCode(descendant);
            }
            searchHelper.endTransaction();
          }
          else {
            GlobalCompilingVisitor.addFilesToSearchForGivenWord(predicate.getRegExp(), true, kind, compileContext);
          }
        }
      }
      else {
        GlobalCompilingVisitor.addFilesToSearchForGivenWord(word, true, kind, compileContext);
      }
    }
    return true;
  }


fault boolean handleWord(@Nullable String text, GlobalCompilingVisitor.OccurenceKind kind, CompileContext compileContext) {