Fixed adding annotation to a wrong file

This commit is contained in:
Andrey Breslav
2011-10-28 22:45:29 +04:00
parent 9c49f551a9
commit d0b0d5f265
@@ -60,6 +60,7 @@ public class JetPsiChecker implements Annotator {
Collection<Diagnostic> diagnostics = Sets.newLinkedHashSet(bindingContext.getDiagnostics());
Set<PsiElement> redeclarations = Sets.newHashSet();
for (Diagnostic diagnostic : diagnostics) {
if (diagnostic.getFactory().getPsiFile(diagnostic) != file) continue;
Annotation annotation = null;
if (diagnostic.getSeverity() == Severity.ERROR) {
if (diagnostic instanceof UnresolvedReferenceDiagnostic) {