void (@NotNull ProgressIndicator indicator) { final JavaPsiFacade facade = JavaPsiFacade.getInstance(project); final GlobalSearchScope all = GlobalSearchScope.allScope(project); PsiClass allIcons = ReadAction.compute(() -> facade.findClass("com.intellij.icons.AllIcons", all)); if (allIcons != null) { searchFields(allIcons, view, indicator); } PsiClass[] classes = ReadAction.compute(() -> { PsiPackage aPackage = facade.findPackage("icons"); return aPackage != null ? aPackage.getClasses(all) : PsiClass.EMPTY_ARRAY; }); for (PsiClass iconsClass : classes) { searchFields(iconsClass, view, indicator); } }