public static void runWriteActionAndWait(final @NotNull Runnable runnable) throws InvocationTargetException, InterruptedException {
    ApplicationManager.getApplication().invokeAndWait(() -> ApplicationManager.getApplication().runWriteAction(runnable));
  }
public static void runWriteActionAndWait(final @NotNull Runnable runnable)