Пример #1
0
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    this.eventBus = eventBus;

    display.setPresenter(this);
    panel.setWidget(display);
    this.eventBus = eventBus;
    handlerRegistration(eventBus);
    if (repositoryUri == null || repositoryUri.length() == 0 || repositoryUri.equals("null")) {
      this.repo = JavaScriptObject.createObject().<Repository>cast();
      display.setData(this.repo);
    } else {
      display.setData(this.repo);
      getRepo(this.repositoryUri);
      fetchFiles(repositoryUri, this.prefix);
      CacheManager.EventConstructor change =
          new CacheManager.EventConstructor() {
            @Override
            public RepoUpdate newInstance(String key) {
              return new RepoUpdate();
            }
          };
      cacheManager.register(repositoryUri, "repoContent", change);
    }
  }
Пример #2
0
 protected void updateRepoContent(List<FileNode> crumbs, List<FileNode> files) {
   display.show(crumbs, files);
 }
Пример #3
0
 protected void updateRepo(Repository item) {
   this.repo = item;
   display.setData(this.repo);
 }