@Override
  protected void onInitUI() {
    super.onInitUI();
    table =
        new ChangeTable2() {
          {
            keysNavigation.add(
                new KeyCommand(0, 'R', Util.C.keyReloadSearch()) {
                  @Override
                  public void onKeyPress(final KeyPressEvent event) {
                    Gerrit.display(getToken());
                  }
                });
          }
        };
    table.addStyleName(Gerrit.RESOURCES.css().accountDashboard());

    outgoing = new ChangeTable2.Section();
    incoming = new ChangeTable2.Section();
    closed = new ChangeTable2.Section();

    outgoing.setTitleText(Util.C.outgoingReviews());
    incoming.setTitleText(Util.C.incomingReviews());
    incoming.setHighlightUnreviewed(mine);
    closed.setTitleText(Util.C.recentlyClosed());

    table.addSection(outgoing);
    table.addSection(incoming);
    table.addSection(closed);
    add(table);
    table.setSavePointerId("owner:" + ownerId);
  }
  @Override
  protected void onLoad() {
    super.onLoad();

    String who = mine ? "self" : ownerId.toString();
    ChangeList.query(
        new ScreenLoadCallback<JsArray<ChangeList>>(this) {
          @Override
          protected void preDisplay(JsArray<ChangeList> result) {
            display(result);
          }
        },
        mine ? EnumSet.of(ListChangesOption.REVIEWED) : EnumSet.noneOf(ListChangesOption.class),
        "is:open owner:" + who,
        "is:open reviewer:" + who + " -owner:" + who,
        "is:closed (owner:" + who + " OR reviewer:" + who + ") -age:4w limit:10");
  }
 @Override
 public void registerKeys() {
   super.registerKeys();
   table.setRegisterKeys(true);
 }
Пример #4
0
 @Override
 protected void onLoad() {
   super.onLoad();
   setPageTitle(Util.C.plugins());
   display();
 }