void () { if (!UIUtil.isShowing(getComponent())) return; if (myStateIsOutOfDate || !myModel.isValid()) return; myUpdateIndicator.cancel(); myUpdateIndicator = new EmptyProgressIndicator(); ChangedBlockData blockData = Objects.requireNonNull(myModel.getData()); ReadAction .nonBlocking(() -> updateHighlighters(blockData)) .finishOnUiThread(ModalityState.stateForComponent(myPanel), result -> { if (myStateIsOutOfDate || blockData != myModel.getData()) return; HighlightersData.apply(myProject, myEditor, result); }) .withDocumentsCommitted(myProject) .wrapProgress(myUpdateIndicator) .submit(NonUrgentExecutor.getInstance()); }