void (@NotNull VirtualFile file, @NotNull ProgressIndicator globalProgress) { Runnable update = () -> { if (DumbService.getInstance(getProject()).isDumb()) { // Suppress check should be rescheduled when dumb mode ends. mySuppressInfoRef.set(null); } else { boolean suppress = ContainerUtil.exists(JsonWidgetSuppressor.EXTENSION_POINT_NAME.getExtensionList(), s -> s.suppressSwitcherWidget(file, getProject())); mySuppressInfoRef.set(Pair.create(file, suppress)); } super.update(null); }; if (ApplicationManager.getApplication().isUnitTestMode()) { // Give tests a chance to check the widget state before the task is run (see EditorBasedStatusBarPopup#updateInTests()) ApplicationManager.getApplication().invokeLater(update); } else { ReadAction .nonBlocking(update) .expireWith(this) .wrapProgress(globalProgress) .coalesceBy(this) .submit(AppExecutorUtil.getAppExecutorService()); } }