boolean (final Object element, final VirtualFile vFile) { if (element instanceof PsiClass) { final PsiFile file = ((PsiClass)element).getContainingFile(); if (file != null && Comparing.equal(file.getVirtualFile(), vFile)) return true; } return false; }