boolean (final Map<PsiFile, Set<PsiFile>> deps) { Set<PsiFile> files = deps.keySet(); for (PsiFile file : files) { if (file instanceof PsiJavaFile && Objects.equals(myPackageQName, ((PsiJavaFile)file).getPackageName())) { return true; } } return false; }