Package org.eclipse.swtbot.swt.finder.widgets

Examples of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree


  public void testDeleteTags() throws Exception {
    //TODO Remove once bug355200 has been fixed
    if (Platform.OS_MACOSX.equals(Platform.getOS()))
      return;

    SWTBotTree tree = getOrOpenView().bot().tree();
    int initialCount = myRepoViewUtil.getTagsItem(tree, repositoryFile)
        .expand().rowCount();

    createTag("Delete2", "The first tag");
    createTag("Delete3", "The second tag");
View Full Code Here


    assertEquals("Wrong number of tags", initialCount, items.length);
  }

  @Test
  public void testResetToTag() throws Exception {
    SWTBotTree tree = getOrOpenView().bot().tree();

    String initialContent = getTestFileContent();
    createTag("ResetToFirst", "The first tag");
    touchAndSubmit(null);
    String newContent = getTestFileContent();
View Full Code Here

  }

  @Test
  public void testPushTagPreselectsTag() throws Exception {
    createTag("tag-to-push", "Tag to push");
    SWTBotTree tree = getOrOpenView().bot().tree();
    myRepoViewUtil.getTagsItem(tree, repositoryFile)
        .expand().getNode("tag-to-push").select();
    ContextMenuHelper.clickContextMenu(tree,
        myUtil.getPluginLocalizedValue("RepoViewPushTag.label"));
View Full Code Here

    return revWalk.parseTag(repository.resolve(tagName)).getObject()
        .getId().name();
  }

  private void createTag(String name, String message) throws Exception {
    SWTBotTree tree = getOrOpenView().bot().tree();
    myRepoViewUtil.getTagsItem(tree, repositoryFile).select();
    ContextMenuHelper.clickContextMenu(tree,
        myUtil.getPluginLocalizedValue("RepoViewCreateTag.label"));
    String shellTitle = UIText.CreateTagDialog_NewTag;
    SWTBotShell createDialog = bot.shell(shellTitle).activate();
View Full Code Here

  public void testCopyPathToClipboard() throws Exception {
    clearView();
    Activator.getDefault().getRepositoryUtil().addConfiguredRepository(
        repositoryFile);
    refreshAndWait();
    final SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    waitInUI();
    Display.getDefault().syncExec(new Runnable() {

      public void run() {
        Clipboard clp = new Clipboard(Display.getCurrent());
View Full Code Here

    clearView();
    Activator.getDefault().getRepositoryUtil().addConfiguredRepository(
        repositoryFile);
    refreshAndWait();
    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenuSync(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    refreshAndWait();
    assertEmpty();
  }
View Full Code Here

        repositoryFile);
    shareProjects(repositoryFile);
    assertProjectExistence(PROJ1, true);
    refreshAndWait();
    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    SWTBotShell shell = bot
        .shell(UIText.RepositoriesView_ConfirmProjectDeletion_WindowTitle);
    shell.bot().button(IDialogConstants.YES_LABEL).click();
View Full Code Here

        repositoryFile);
    shareProjects(repositoryFile);
    assertProjectExistence(PROJ1, true);
    refreshAndWait();
    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    SWTBotShell shell = bot
        .shell(UIText.RepositoriesView_ConfirmProjectDeletion_WindowTitle);
    shell.bot().button(IDialogConstants.NO_LABEL).click();
View Full Code Here

        repositoryFile);
    shareProjects(repositoryFile);
    assertProjectExistence(PROJ1, true);
    refreshAndWait();
    assertHasRepo(repositoryFile);
    SWTBotTree tree = getOrOpenView().bot().tree();
    tree.getAllItems()[0].select();
    ContextMenuHelper.clickContextMenu(tree, myUtil
        .getPluginLocalizedValue(REMOVE_REPOSITORY_CONTEXT_MENU_LABEL));
    SWTBotShell shell = bot
        .shell(UIText.RepositoriesView_ConfirmProjectDeletion_WindowTitle);
    shell.bot().button(IDialogConstants.CANCEL_LABEL).click();
View Full Code Here

    assertEmpty();

    getOrOpenView().show();

    SWTBotView view = TestUtil.showExplorerView();
    SWTBotTree explorerTree = view.bot().tree();
    SWTBotTreeItem projectItem = getProjectItem(explorerTree, PROJ1)
        .select();
    ContextMenuHelper.clickContextMenuSync(explorerTree, "Show In",
        viewName);
    refreshAndWait();
    assertHasRepo(repositoryFile);
    SWTBotTree viewerTree = getOrOpenView().bot().tree();

    TableCollection selection = viewerTree.selection();
    assertTrue("Selection should contain one element",
        selection.rowCount() == 1);
    String nodeText = selection.get(0).get(0);
    assertTrue("Node text should contain project name", projectItem
        .getText().startsWith(nodeText));

    view.show();
    projectItem.expand().getNode(FOLDER).expand().getNode(FILE1).select();

    ContextMenuHelper.clickContextMenuSync(explorerTree, "Show In",
        viewName);

    selection = viewerTree.selection();
    assertTrue("Selection should contain one eelement",
        selection.rowCount() == 1);
    nodeText = selection.get(0).get(0);
      assertEquals("Node text should contain file name", FILE1, nodeText);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swtbot.swt.finder.widgets.SWTBotTree

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.