use of org.eclipse.egit.ui.internal.repository.tree.RepositoryNode in project egit by eclipse.
the class BranchAndResetActionTest method setup.
@Before
public void setup() throws Exception {
repositoryFile = createProjectAndCommitToRepository();
Repository repo = lookupRepository(repositoryFile);
TagBuilder tag = new TagBuilder();
tag.setTag("SomeTag");
tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
tag.setMessage("I'm just a little tag");
tag.setObjectId(repo.resolve(repo.getFullBranch()), Constants.OBJ_COMMIT);
TagOperation top = new TagOperation(repo, tag, false);
top.execute(null);
touchAndSubmit(null);
RepositoriesViewLabelProvider provider = GitRepositoriesViewTestUtils.createLabelProvider();
LOCAL_BRANCHES = provider.getText(new LocalNode(new RepositoryNode(null, repo), repo));
TAGS = provider.getText(new TagsNode(new RepositoryNode(null, repo), repo));
}
use of org.eclipse.egit.ui.internal.repository.tree.RepositoryNode in project egit by eclipse.
the class CompareActionsTest method setup.
@Before
public void setup() throws Exception {
repositoryFile = createProjectAndCommitToRepository();
Repository repo = lookupRepository(repositoryFile);
disablePerspectiveSwitchPrompt();
setEnabledModelProvider(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
TagBuilder tag = new TagBuilder();
tag.setTag("SomeTag");
tag.setTagger(RawParseUtils.parsePersonIdent(TestUtil.TESTAUTHOR));
tag.setMessage("I'm just a little tag");
tag.setObjectId(repo.resolve(repo.getFullBranch()), Constants.OBJ_COMMIT);
commitOfTag = tag.getObjectId();
TagOperation top = new TagOperation(repo, tag, false);
top.execute(null);
touchAndSubmit(null);
RepositoriesViewLabelProvider provider = GitRepositoriesViewTestUtils.createLabelProvider();
// LOCAL_BRANCHES = provider.getText(new LocalNode(new RepositoryNode(
// null, repo), repo));
TAGS = provider.getText(new TagsNode(new RepositoryNode(null, repo), repo));
}
use of org.eclipse.egit.ui.internal.repository.tree.RepositoryNode in project egit by eclipse.
the class FetchAndMergeActionTest method setup.
@Before
public void setup() throws Exception {
repositoryFile = createProjectAndCommitToRepository();
childRepositoryFile = createChildRepository(repositoryFile);
RepositoriesViewLabelProvider provider = GitRepositoriesViewTestUtils.createLabelProvider();
Repository repo = lookupRepository(childRepositoryFile);
REMOTE_BRANCHES = provider.getText(new RemoteTrackingNode(new RepositoryNode(null, repo), repo));
LOCAL_BRANCHES = provider.getText(new LocalNode(new RepositoryNode(null, repo), repo));
ObjectId id = repo.resolve(repo.getFullBranch());
initialCommitId = id.name();
}
use of org.eclipse.egit.ui.internal.repository.tree.RepositoryNode in project egit by eclipse.
the class GitRepositoriesViewTestUtils method getLocalBranchesItem.
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();
SWTBotTreeItem rootItem = tree.getTreeItem(rootText);
SWTBotTreeItem branchesItem = TestUtil.expandAndWait(rootItem).getNode(labelProvider.getStyledText(branches).getString());
SWTBotTreeItem localItem = TestUtil.expandAndWait(branchesItem).getNode(labelProvider.getStyledText(localBranches).getString());
return localItem;
}
use of org.eclipse.egit.ui.internal.repository.tree.RepositoryNode in project egit by eclipse.
the class GitRepositoriesViewTestUtils method getRemotesItem.
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 = TestUtil.expandAndWait(rootItem).getNode(labelProvider.getStyledText(remotes).getString());
return remotesItem;
}
Aggregations