void (@NotNull PsiElement element) { DefaultListModel<String> model = (DefaultListModel<String>)myRefs.getModel(); model.clear(); String progressTitle = DevPsiViewerBundle.message("psi.viewer.progress.dialog.update.refs"); Callable<List<PsiReference>> updater = () -> DumbModeAccessType.RELIABLE_DATA_ONLY.ignoreDumbMode(() -> doUpdateReferences(element)); List<PsiReference> psiReferences = computeSlowOperationsSafeInBgThread(myProject, progressTitle, updater); for (PsiReference reference : psiReferences) { model.addElement(getElementDescription(reference)); } }