@Override
    public void setHighLightLevel(@NotNull LanguageHighlightLevel level) {
      PsiFile psiFile = getPsiFile();
      if (psiFile != null && !getProject().isDisposed() && !getHighlightLevels().contains(level)) {
        FileViewProvider viewProvider = psiFile.getViewProvider();

        Language language = Language.findLanguageByID(level.getLangID());
        if (language != null) {
          PsiElement root = viewProvider.getPsi(language);
          if (root == null) return;
          FileHighlightingSetting setting = FileHighlightingSetting.fromInspectionsLevel(level.getLevel());
          HighlightLevelUtil.forceRootHighlighting(root, setting);
          InjectedLanguageManager.getInstance(getProject()).dropFileCaches(psiFile);
          myDaemonCodeAnalyzer.restart();
          // after that TrafficLightRenderer will be recreated anew, no need to patch myFileHighlightingSettings
        }
      }
    }
@Override
    public void setHighLightLevel(@NotNull LanguageHighlightLevel level)