예제 #1
0
  public final void runBare() throws Throwable {
    final Throwable[] throwables = new Throwable[1];

    SwingUtilities.invokeAndWait(
        new Runnable() {
          public void run() {
            try {
              ourTestThread = Thread.currentThread();
              startRunAndTear();
            } catch (Throwable throwable) {
              throwables[0] = throwable;
            } finally {
              ourTestThread = null;
              try {
                cleanupApplicationCaches();
              } catch (Throwable e) {
                e.printStackTrace();
              }
            }
          }
        });

    if (throwables[0] != null) {
      throw throwables[0];
    }

    // just to make sure all deffered Runnable's to finish
    SwingUtilities.invokeAndWait(EmptyRunnable.getInstance());

    if (IdeaLogger.ourErrorsOccurred != null) {
      throw IdeaLogger.ourErrorsOccurred;
    }
  }
예제 #2
0
 public final void updateUI() {
   updateUI(EmptyRunnable.getInstance());
 }