@Override
  public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    Preconditions.checkState(realView != null, "Real view not set");
    Invoker invoker = new Invoker(realView, method, args);
    // PY-59217
    // TODO: rewrite to UI DSL and model
    if (ApplicationManager.getApplication().isReadAccessAllowed()) {
      invoker.run();
    }
    else {
      ApplicationManager.getApplication().invokeAndWait(invoker);
    }
    if (invoker.exception != null) {
      throw invoker.exception;
    }
    return invoker.result;
  }
@Override
  public Object invoke(Object proxy, Method method, Object[] args)