void (@NotNull AnActionEvent e) { final Project project = Objects.requireNonNull(e.getProject()); final UsageViewPresentation presentation = new UsageViewPresentation(); presentation.setTabName("Statics"); presentation.setTabText("Statics"); final UsageView view = UsageViewManager.getInstance(project) .showUsages(UsageTarget.EMPTY_ARRAY, Usage.EMPTY_ARRAY, presentation); ProgressManager.getInstance().run(new Task.Backgroundable(project, "Searching icons usages") { @Override public void run(@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); } } }); }