@Override
  public CodeTree onBackground(Void params) throws Exception {
    Tree tree = null;
    if (isLoadCache()) {
      tree = CacheUtils.getCacheObject(getCacheName(), Tree.class);
      setLoadCache(false);
    } else {
      tree = GitHubConsole.getInstance().getTree(repository, curBranch);
      CacheUtils.cacheObject(getCacheName(), tree);
    }

    return CodeTree.toCodeTree(tree);
  }
  @Override
  protected void initData() {
    repository = (Repository) context.getIntent().getSerializableExtra(Constants.Extra.REPOSITORY);

    curBranch = repository.getMasterBranch();

    setLoadCache(CacheUtils.contain(getCacheName()));

    if (currCodeTree == null) execute();
    else {
      ViewUtils.setVisibility(listPopup, View.VISIBLE, R.anim.alpha_in);
      branch.setText(curBranch);
      codeAdapter.setCodeTree(currCodeTree);
      if (!currCodeTree.name.equals(CodeTree.ROOT))
        pathView.resetView(currCodeTree.currEntry.getPath());
    }
  }