String () { PsiElement element = !isPackage(getIcon()) ? null : findFileSystemItem(getVirtualFile()); if (element instanceof PsiDirectory && element.isValid()) { PsiDirectoryFactory factory = PsiDirectoryFactory.getInstance(element.getProject()); if (factory != null && factory.isPackage((PsiDirectory)element)) { String name = factory.getQualifiedName((PsiDirectory)element, false); if (factory.isValidPackageName(name)) return name; } } return null; }