static void inWriteSafeContext(Runnable runnable) {
    ModalityState modality = ModalityState.current();
    ApplicationManager.getApplication().invokeLater(
      () -> IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(runnable, modality),
      modality);
  }
static void inWriteSafeContext(Runnable runnable)