public static void doWriteAction(final @NotNull Runnable task) {
    executeOnEdt(true, () -> ApplicationManager.getApplication().runWriteAction(task));
  }
public static void doWriteAction(final @NotNull Runnable task)