void (PsiElement node) { if (node == null) return; PsiFile myFile = myAnnotationSession.getFile(); PsiFile containingFile = node.getContainingFile(); LOG.assertTrue(containingFile != null, node); VirtualFile containingVFile = containingFile.getVirtualFile(); VirtualFile myVFile = myFile.getVirtualFile(); if (!Comparing.equal(containingVFile, myVFile)) { LOG.error( "Annotation must be registered for an element inside '" + myFile + "' which is in '" + myVFile + "'.\n" + "Element passed: '" + node + "' is inside the '" + containingFile + "' which is in '" + containingVFile + "'"); } }