synchronized void removeHighlightsForObsoleteTools(@NotNull PsiFile containingFile,
                                                     @NotNull Document hostDocument,
                                                     @NotNull List<? extends PsiFile> injectedFragments,
                                                     @NotNull Set<? extends Pair<Object, PsiFile>> actualToolsRun,
                                                     @NotNull HighlightingSession highlightingSession) {
    for (PsiFile psiFile: ContainerUtil.append(injectedFragments, containingFile)) {
      getData(psiFile, hostDocument).entrySet().removeIf(entry -> {
        Object toolId = entry.getKey();
        ToolHighlights toolHighlights = entry.getValue();
        if (UNKNOWN_ID.equals(toolId) || !isInspectionToolId(toolId)) {
          return false;
        }

        if (actualToolsRun.contains(Pair.create(toolId, psiFile))) {
          return false;
        }
        for (List<? extends HighlightInfo> highlights : toolHighlights.elementHighlights.values()) {
          for (HighlightInfo info : highlights) {
            RangeHighlighterEx highlighter = info.highlighter;
            if (highlighter != null) {
              if (LOG.isTraceEnabled()) {
                LOG.trace("removeHighlightsForObsoleteTools: " + highlighter);
              }
              UpdateHighlightersUtil.disposeWithFileLevelIgnoreErrors(highlighter, info, highlightingSession);
            }
          }
        }
        return true;
      });
    }
  }
synchronized void removeHighlightsForObsoleteTools(@NotNull PsiFile containingFile,
                                                     @NotNull Document hostDocument,
                                                     @NotNull List<? extends PsiFile> injectedFragments,
                                                     @NotNull Set<? extends Pair<Object, PsiFile>> actualToolsRun,
                                                     @NotNull HighlightingSession highlightingSession)