Search in sources :

Example 1 with PushTagsWizard

use of org.eclipse.egit.ui.internal.push.PushTagsWizard in project egit by eclipse.

the class PushCommand method createPushTagsWizard.

private PushTagsWizard createPushTagsWizard(List<RepositoryTreeNode> nodes) {
    List<String> tagNames = new ArrayList<>();
    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);
}
Also used : Repository(org.eclipse.jgit.lib.Repository) RepositoryTreeNode(org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode) PushTagsWizard(org.eclipse.egit.ui.internal.push.PushTagsWizard) ArrayList(java.util.ArrayList) TagNode(org.eclipse.egit.ui.internal.repository.tree.TagNode)

Aggregations

ArrayList (java.util.ArrayList)1 PushTagsWizard (org.eclipse.egit.ui.internal.push.PushTagsWizard)1 RepositoryTreeNode (org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode)1 TagNode (org.eclipse.egit.ui.internal.repository.tree.TagNode)1 Repository (org.eclipse.jgit.lib.Repository)1