void (final PsiClass allIcons, final UsageView view, final ProgressIndicator indicator) { ApplicationManager.getApplication().runReadAction(() -> indicator.setText("Searching for: " + allIcons.getQualifiedName())); ReferencesSearch.search(allIcons).forEach(reference -> { PsiElement elt = reference.getElement(); while (elt instanceof PsiExpression) elt = elt.getParent(); if (elt instanceof PsiField) { UsageInfo info = new UsageInfo(elt, false); view.appendUsage(new UsageInfo2UsageAdapter(info)); } return true; }); }