@Override
  public boolean accept(@NotNull HighlightInfo highlightInfo, @Nullable PsiFile file) {
    if (file == null) {
      return true;
    }
    final Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file);
    if (document == null) {
      return true;
    }
    final String contextId = document.getUserData(StructuralSearchDialogKeys.STRUCTURAL_SEARCH_PATTERN_CONTEXT_ID);
    if (contextId == null) {
      return true;
    }
    if (highlightInfo.getSeverity() != HighlightSeverity.ERROR) {
      return false;
    }
    if (!Registry.is("ssr.in.editor.problem.highlighting")) {
      return false;
    }
    final StructuralSearchProfile profile = StructuralSearchUtil.getProfileByPsiElement(file);
    if (profile == null) {
      return true;
    }
    final PsiErrorElement error = findErrorElementAt(file, highlightInfo.startOffset, highlightInfo.getDescription());
    if (error == null) {
      return false;
    }
    final boolean result = profile.shouldShowProblem(error);
    if (result) {
      final Runnable callback = document.getUserData(StructuralSearchDialogKeys.STRUCTURAL_SEARCH_ERROR_CALLBACK);
      if (callback != null) {
        ApplicationManager.getApplication().invokeLater(callback);
      }
    }
    return result;
  }
@Override
  public boolean accept(@NotNull HighlightInfo highlightInfo, @Nullable PsiFile file)