HashSet<PsiFile> (final PsiPackage psiPackage) { final HashSet<PsiFile> psiFiles = new HashSet<>(); final PsiClass[] classes = psiPackage.getClasses(); for (PsiClass aClass : classes) { final PsiFile file = aClass.getContainingFile(); if (myBuilder.getScope().contains(file)) { psiFiles.add(file); } } return psiFiles; }