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

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


  }

  public SWTBotTreeItem getLocalBranchesItem(SWTBotTree tree, File repo)
      throws Exception {
    Repository repository = lookupRepository(repo);
    RepositoryNode root = new RepositoryNode(null, repository);
    BranchesNode branches = new BranchesNode(root, repository);
    LocalNode localBranches = new LocalNode(branches,
        repository);

    String rootText = labelProvider.getStyledText(root).getString();
View Full Code Here


  }

  public SWTBotTreeItem getTagsItem(SWTBotTree tree, File repo)
      throws Exception {
    Repository repository = lookupRepository(repo);
    RepositoryNode root = new RepositoryNode(null, repository);
    TagsNode tags = new TagsNode(root, repository);

    String rootText = labelProvider.getStyledText(root).getString();
    SWTBotTreeItem rootItem = tree.getTreeItem(rootText);
    SWTBotTreeItem tagsItem = rootItem.expand().getNode(
View Full Code Here

  }

  public SWTBotTreeItem getRemoteBranchesItem(SWTBotTree tree,
      File repositoryFile) throws Exception {
    Repository repository = lookupRepository(repositoryFile);
    RepositoryNode root = new RepositoryNode(null, repository);
    BranchesNode branches = new BranchesNode(root, repository);
    RemoteTrackingNode remoteBranches = new RemoteTrackingNode(branches,
        repository);

    String rootText = labelProvider.getStyledText(root).getString();
View Full Code Here

  }

  public SWTBotTreeItem getWorkdirItem(SWTBotTree tree, File repositoryFile)
      throws Exception {
    Repository repository = lookupRepository(repositoryFile);
    RepositoryNode root = new RepositoryNode(null, repository);

    WorkingDirNode workdir = new WorkingDirNode(root, repository);

    String rootText = labelProvider.getStyledText(root).getString();
    SWTBotTreeItem rootItem = tree.getTreeItem(rootText);
View Full Code Here

  }

  public SWTBotTreeItem getRootItem(SWTBotTree tree, File repositoryFile)
      throws Exception {
    Repository repository = lookupRepository(repositoryFile);
    RepositoryNode root = new RepositoryNode(null, repository);
    String rootText = labelProvider.getStyledText(root).getString();
    SWTBotTreeItem rootItem = tree.getTreeItem(rootText);
    return rootItem;
  }
View Full Code Here

  }

  public SWTBotTreeItem getSymbolicRefsItem(SWTBotTree tree,
      File repositoryFile) throws Exception {
    Repository repository = lookupRepository(repositoryFile);
    RepositoryNode root = new RepositoryNode(null, repository);
    AdditionalRefsNode symrefsnode = new AdditionalRefsNode(root, repository);
    SWTBotTreeItem rootItem = tree.getTreeItem(
        labelProvider.getStyledText(root).getString()).expand();
    SWTBotTreeItem symrefsitem = rootItem.getNode(labelProvider
        .getText(symrefsnode));
View Full Code Here

  }

  public SWTBotTreeItem getRemotesItem(SWTBotTree tree, File repositoryFile)
      throws Exception {
    Repository repository = lookupRepository(repositoryFile);
    RepositoryNode root = new RepositoryNode(null, repository);
    RemotesNode remotes = new RemotesNode(root, repository);

    String rootText = labelProvider.getStyledText(root).getString();
    SWTBotTreeItem rootItem = tree.getTreeItem(rootText);
    SWTBotTreeItem remotesItem = rootItem.expand().getNode(
View Full Code Here

    List<RepositoryNode> repositories = new LinkedList<RepositoryNode>();
    for (String path : settings.getRepositories()) {
      File file = new File(path);
      if (file.exists())
        try {
          RepositoryNode node = new RepositoryNode(null,
              org.eclipse.egit.core.Activator.getDefault()
                  .getRepositoryCache()
                  .lookupRepository(file));
          repositories.add(node);
        } catch (IOException ignore) {
View Full Code Here

      // check in the dialog settings if a repository was selected before
      // and select it if nothing else is selected
      String repoDir = settings.get(LAST_SELECTED_REPO_PREF);
      if (repoDir != null)
        for (TreeItem item : tv.getTree().getItems()) {
          RepositoryNode node = (RepositoryNode) item.getData();
          if (node.getRepository().getDirectory().getPath().equals(
              repoDir))
            tv.setSelection(new StructuredSelection(node));
        }
    } else {
      // save selection in dialog settings
View Full Code Here

    if (!dirsBefore.containsAll(dirsAfter)) {
      tv.setInput(dirsAfter);
      for (String dir : dirsAfter)
        if (!dirsBefore.contains(dir))
          try {
            RepositoryNode node = new RepositoryNode(null,
                FileRepositoryBuilder.create(new File(dir)));
            tv.setSelection(new StructuredSelection(
                node));
          } catch (IOException e1) {
            Activator.handleError(e1.getMessage(), e1,
View Full Code Here

TOP

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

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.