private void runUpdate() {
    ThreadingAssertions.assertEventDispatchThread();
    if (myDisposed) {
      return;
    }
    if (PowerSaveMode.isEnabled()) {
      // to show the correct "power save" traffic light icon
      myListeners.repaintTrafficLightIconForAllEditors();
      return;
    }

    synchronized (this) {
      long actualDelay = myScheduledUpdateTimestamp - System.nanoTime();
      if (actualDelay > 0) {
         // started too soon (there must've been some typings after we'd scheduled this; need to re-schedule)
        scheduleUpdateRunnable(actualDelay);
        return;
      }
    }

    Collection<? extends FileEditor> activeEditors = getSelectedEditors();
    boolean updateByTimerEnabled = isUpdateByTimerEnabled();
    PsiDocumentManager documentManager = getPsiDocumentManager();
    if (PassExecutorService.LOG.isDebugEnabled()) {
      PassExecutorService.log(null, null, "Update Runnable. myUpdateByTimerEnabled:",
        updateByTimerEnabled, " activeEditors:", activeEditors,
        (documentManager.hasEventSystemEnabledUncommittedDocuments() ? " hasEventSystemEnabledUncommittedDocuments(" + Arrays.toString(
          documentManager.getUncommittedDocuments()) + ")" : "()")
        + (ApplicationManager.getApplication().isWriteAccessAllowed() ? " inside write action" : "r"));
    }
    if (!updateByTimerEnabled || activeEditors.isEmpty()) {
      return;
    }

    if (ApplicationManager.getApplication().isWriteAccessAllowed()) {
      // makes no sense to start from within write action - will cancel anyway
      // we'll restart when the write action finish
      return;
    }
    if (documentManager.hasEventSystemEnabledUncommittedDocuments()) {
      // restart when everything committed
      documentManager.performLaterWhenAllCommitted(() -> {
        LOG.debug("Rescheduled after commit");
        scheduleIfNotRunning();
      });
      return;
    }

    try {
      boolean submitted = false;
      for (FileEditor fileEditor : activeEditors) {
        if (fileEditor instanceof TextEditor textEditor && !textEditor.isEditorLoaded()) {
          // make sure the highlighting is restarted when the editor is finally loaded, because otherwise some crazy things happen,
          // for instance `FileEditor.getBackgroundHighlighter()` returning null, essentially stopping highlighting silently
          if (PassExecutorService.LOG.isDebugEnabled()) {
            PassExecutorService.log(null, null, "runUpdate for ", fileEditor, " rescheduled because the editor was not loaded yet");
          }
          // AsyncEditorLoader will restart
        }
        else {
          VirtualFile virtualFile = getVirtualFile(fileEditor);
          PsiFile psiFile = virtualFile == null ? null : findFileToHighlight(myProject, virtualFile);
          submitted |= psiFile != null && queuePassesCreation(fileEditor, virtualFile, psiFile, ArrayUtil.EMPTY_INT_ARRAY) != null;
          if (PassExecutorService.LOG.isDebugEnabled()) {
            PassExecutorService.log(null, null, "submit psiFile:", psiFile + " (" + virtualFile + "); submitted=", submitted);
          }
        }
      }
      if (!submitted) {
        // happens e.g., when we are trying to open a directory and there's a FileEditor supporting this
        // invokeLater is required because we can't stop daemon from inside UpdateRunnable, since its future hasn't been scheduled yet
        ApplicationManager.getApplication().invokeLater(() ->
        stopProcess(true, "Couldn't create session for "+activeEditors), __->myDisposed);
      }
    }
    catch (ProcessCanceledException ignored) {
    }
  }
private void runUpdate()