void (@NotNull ProblemDescriptor problemDescriptor) { PsiElement element = problemDescriptor.getPsiElement(); if (element != null && !isInPsiFile(element)) { ExternallyDefinedPsiElement external = PsiTreeUtil.getParentOfType(element, ExternallyDefinedPsiElement.class, false); if (external != null) { PsiElement newTarget = external.getProblemTarget(); if (newTarget != null) { redirectProblem(problemDescriptor, newTarget); return; } } } myProblems.add(problemDescriptor); }