protected int processTimeoutInEDT() {
    final int[] retcode = new int[1];

    try {
      UIUtil.invokeAndWaitIfNeeded(() -> retcode[0] = processTimeout());
    }
    catch (Exception e) {
      throw new RuntimeException(e);
    }

    return retcode[0];
  }
protected int processTimeoutInEDT()