void (final @NotNull AnActionEvent event) { boolean doFullUpdate = !ApplicationManager.getApplication().isDispatchThread() || ApplicationManager.getApplication().isUnitTestMode(); VirtualFile vFile = event.getDataContext().getData(CommonDataKeys.VIRTUAL_FILE); ThreeState hadAnythingRunnable = vFile == null ? ThreeState.UNSURE : RunLineMarkerProvider.hadAnythingRunnable(vFile); if (doFullUpdate || hadAnythingRunnable == ThreeState.UNSURE) { fullUpdate(event); return; } boolean success = !alreadyExceededTimeoutOnSimilarAction() && ProgressIndicatorUtils.withTimeout(Registry.intValue("run.configuration.update.timeout"), () -> { fullUpdate(event); return true; }) != null; if (!success) { recordUpdateTimeout(); approximatePresentationByPreviousAvailability(event, hadAnythingRunnable); event.getPresentation().setPerformGroup(false); } }