PsiElement (Object object) { if (object instanceof PsiElement) return (PsiElement)object; return object instanceof VirtualFile ? PsiManager.getInstance(myProject).findFile((VirtualFile)object) : null; }