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

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


        } else if (mappedRef != null
            && mappedRef.startsWith(Constants.R_TAGS)) {
          Ref ref = repo.getRef(mappedRef);
          if (ref == null)
            return false;
          node = new TagNode(tags, repo, ref);
        } else
          return false;
      }
    } catch (IOException e) {
      return false;
View Full Code Here


  private void initiallySelectTags(Object[] tagNodes,
      CheckboxTreeViewer viewer) {
    List<TagNode> checkedTags = new ArrayList<TagNode>();
    for (Object node : tagNodes) {
      if (node instanceof TagNode) {
        TagNode tagNode = (TagNode) node;
        Ref ref = tagNode.getObject();
        if (tagRefNamesToSelect.contains(ref.getName()))
          checkedTags.add(tagNode);
      }
    }
View Full Code Here

  @Override
  public Image getImage(Object element) {
    RepositoryTreeNode node = (RepositoryTreeNode) element;
    RepositoryTreeNodeType type = node.getType();
    if (type == RepositoryTreeNodeType.TAG) {
      TagNode tagNode = (TagNode) node;
      if (tagNode.isAnnotated())
        return decorateImage(annotatedTagImage, element);
    } else if (type == RepositoryTreeNodeType.FILE) {
      Object object = node.getObject();
      if (object instanceof File) {
        ImageDescriptor descriptor = PlatformUI.getWorkbench()
View Full Code Here

          // local branch: HEAD would be on the branch
          compareString = refName;
        } else if (refName.startsWith(Constants.R_TAGS)) {
          // tag: HEAD would be on the commit id to which the tag is
          // pointing
          TagNode tagNode = (TagNode) node;
          compareString = tagNode.getCommitId();
        } else if (refName.startsWith(Constants.R_REMOTES)) {
          // remote branch: HEAD would be on the commit id to which
          // the branch is pointing
          ObjectId id = node.getRepository().resolve(refName);
          if (id == null)
View Full Code Here

      Map<String, Ref> tagRefs = getRefs(repo, Constants.R_TAGS);
      for (Ref tagRef : tagRefs.values()) {
        ObjectId objectId = tagRef.getLeaf().getObjectId();
        RevObject revObject = walk.parseAny(objectId);
        RevObject peeledObject = walk.peel(revObject);
        TagNode tagNode = createTagNode(parentNode, repo, tagRef,
            revObject, peeledObject);
        nodes.add(tagNode);
      }
    } catch (IOException e) {
      return handleException(e, parentNode);
View Full Code Here

    boolean annotated = (revObject instanceof RevTag);
    if (peeledObject instanceof RevCommit) {
      RevCommit commit = (RevCommit) peeledObject;
      String id = commit.getId().name();
      String message = commit.getShortMessage();
      return new TagNode(parentNode, repo, ref, annotated, id, message);
    } else {
      return new TagNode(parentNode, repo, ref, annotated, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
    }
  }
View Full Code Here

  private PushTagsWizard createPushTagsWizard(List<RepositoryTreeNode> nodes) {
    List<String> tagNames = new ArrayList<String>();
    for (RepositoryTreeNode node : nodes) {
      if (node instanceof TagNode) {
        TagNode tagNode = (TagNode) node;
        tagNames.add(tagNode.getObject().getName());
      }
    }
    Repository repository = nodes.get(0).getRepository();
    return new PushTagsWizard(repository, tagNames);
  }
View Full Code Here

TOP

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

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.