VirtualFile (Object object) { if (object instanceof PsiPackage) { final PsiDirectory[] directories = ((PsiPackage)object).getDirectories(); return directories.length > 0 ? directories[0].getVirtualFile() : null; } return super.getVirtualFile(object); }