Package org.eclipse.egit.ui.internal.repository.tree

Examples of org.eclipse.egit.ui.internal.repository.tree.AdditionalRefNode


        node = new RefNode(remoteBranches, repo, ref);
      } else if (Constants.HEAD.equals(refName)) {
        Ref ref = repo.getRef(refName);
        if (ref == null)
          return false;
        node = new AdditionalRefNode(references, repo, ref);
      } else {
        String mappedRef = Activator.getDefault().getRepositoryUtil()
            .mapCommitToRef(repo, refName, false);
        if (mappedRef != null
            && mappedRef.startsWith(Constants.R_REMOTES)) {
View Full Code Here


    branchTree.addFilter(new ViewerFilter() {

      public boolean select(Viewer viewer, Object parentElement,
          Object element) {
        if (element instanceof AdditionalRefNode) {
          AdditionalRefNode ref = (AdditionalRefNode) element;
          return Constants.HEAD.equals(ref.getObject().getName());
        }
        return true;
      }
    });
  }
View Full Code Here

  }

  @Override
  public String getToolTipText(Object element) {
    if (element instanceof AdditionalRefNode) {
      AdditionalRefNode additionalRefNode = (AdditionalRefNode) element;
      Ref ref = additionalRefNode.getObject();
      return GitLabels.getRefDescription(ref);
    }
    return null;
  }
View Full Code Here

      List<RepositoryTreeNode<Ref>> refs = new ArrayList<RepositoryTreeNode<Ref>>();
      try {
        for (Entry<String, Ref> refEntry : getRefs(repo, RefDatabase.ALL).entrySet()) {
          String name=refEntry.getKey();
          if (!(name.startsWith(Constants.R_HEADS) || name.startsWith(Constants.R_TAGS)|| name.startsWith(Constants.R_REMOTES)))
            refs.add(new AdditionalRefNode(node, repo, refEntry
                .getValue()));
        }
        for (Ref r : repo.getRefDatabase().getAdditionalRefs())
          refs.add(new AdditionalRefNode(node, repo, r));
      } catch (Exception e) {
        return handleException(e, node);
      }
      return refs.toArray();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.internal.repository.tree.AdditionalRefNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.