void (@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(true); indicator.setText(IndexingBundle.message("toggled.dumb.mode")); while (isToggledDumb(myProject)) { indicator.checkCanceled(); TimeoutUtil.sleep(100); } }