UsageGroup (@NotNull final VirtualFile dir) { PsiDirectory psiDirectory = PsiManager.getInstance(myProject).findDirectory(dir); if (psiDirectory != null) { PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(psiDirectory); if (aPackage != null) return new PackageGroup(aPackage); } return super.getGroupForFile(dir); }