@Override
  public void ignoreElement(@NotNull RefEntity refEntity) {
    RefEntity owner = refEntity;
    if (refEntity instanceof RefParameter) {
      owner = refEntity.getOwner();
    }

    final CommonProblemDescriptor[] descriptors = getProblemElements().get(owner);
    if (descriptors != null) {
      final PsiElement psiElement = ReadAction.compute(() -> ((RefElement)refEntity).getPsiElement());
      List<CommonProblemDescriptor> foreignDescriptors = new ArrayList<>();
      for (CommonProblemDescriptor descriptor : descriptors) {
        if (descriptor instanceof ProblemDescriptor) {
          PsiElement problemElement = ReadAction.compute(() -> {
            PsiElement element = ((ProblemDescriptor)descriptor).getPsiElement();
            if (element instanceof PsiIdentifier) element = element.getParent();
            return element;
          });
          if (problemElement == psiElement) continue;
        }
        foreignDescriptors.add(descriptor);
      }
      if (foreignDescriptors.size() == descriptors.length) return;
    }
    super.ignoreElement(owner);
  }
@Override
  public void ignoreElement(@NotNull RefEntity refEntity)