@Override
    public void visitFragment(@NotNull PsiFragment fragment) {
      super.visitFragment(fragment);
      HighlightInfo.Builder error = HighlightUtil.checkFragmentError(fragment);
      if (error != null) {
        return;
      }

      InjectedLanguageManager manager = InjectedLanguageManager.getInstance(getCurrentFile().getProject());
      final String text = manager.getUnescapedText(fragment);
      if (fragment.isTextBlock()) {
        int end = fragment.getTokenType() == JavaTokenType.TEXT_BLOCK_TEMPLATE_END ? text.length() - 3 : text.length() - 2;
        int start = findUnnecessaryTextBlockEscapes(text, 1, end);
        while (start >= 0) {
          registerErrorAtOffset(fragment, start, 2, text, text.substring(start, start + 2));
          start = findUnnecessaryTextBlockEscapes(text, start + 2, end);
        }
      }
      else {
        int start = findUnnecessaryStringEscapes(text, 1);
        while (start >= 0) {
          registerErrorAtOffset(fragment, start, 2, text, text.substring(start, start + 2));
          start = findUnnecessaryStringEscapes(text, start + 2);
        }
      }
    }
@Override
    public void visitFragment(@NotNull PsiFragment fragment)