Package org.eclipse.egit.ui.test

Examples of org.eclipse.egit.ui.test.JobJoiner


  }

  protected void refreshAndWait() throws Exception {
    RepositoriesView view = (RepositoriesView) getOrOpenView()
        .getReference().getPart(false);
    JobJoiner jobJoiner = JobJoiner.startListening(JobFamilies.REPO_VIEW_REFRESH, 60, TimeUnit.SECONDS);
    view.refresh();
    jobJoiner.join();
  }
View Full Code Here


          .getNode("origin").expand().getNode(fetchMode ? 0 : 1)
          .select();
  }

  private void runPush(SWTBotTree tree) {
    JobJoiner jobJoiner = JobJoiner.startListening(JobFamilies.PUSH, 60, TimeUnit.SECONDS);
    ContextMenuHelper.clickContextMenuSync(tree, myUtil
        .getPluginLocalizedValue("SimplePushCommand"));
    jobJoiner.join();
  }
View Full Code Here

        .getPluginLocalizedValue("SimplePushCommand"));
    jobJoiner.join();
  }

  private void runFetch(SWTBotTree tree) {
    JobJoiner jobJoiner = JobJoiner.startListening(JobFamilies.FETCH, 60, TimeUnit.SECONDS);
    ContextMenuHelper.clickContextMenuSync(tree, myUtil
        .getPluginLocalizedValue("SimpleFetchCommand"));
    jobJoiner.join();
  }
View Full Code Here

    Repository repo = RepositoryMapping.getMapping(project).getRepository();

    GitSynchronizeData data = new GitSynchronizeData(repo, srcRef, dstRef,
        includeLocal);

    JobJoiner jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
    GitModelSynchronize.launch(data, new IResource[] { project });
    jobJoiner.join();
  }
View Full Code Here

        dialogTitle);
    // use the default (the last commit) -> no changes
    assertEquals(3, dialog.bot().table().rowCount());
    dialog.bot().table().select(0);

    JobJoiner jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
    dialog.bot().button(IDialogConstants.OK_LABEL).click();
    jobJoiner.join();

    closeFirstEmptySynchronizeDialog();

    assertSynchronizeNoChange();

    // use the second (previous) -> should have a change
    dialog = openCompareWithDialog(compareWithCommitMenuText, dialogTitle);
    dialog.bot().table().select(1);

    jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
    dialog.bot().button(IDialogConstants.OK_LABEL).click();
    jobJoiner.join();

    assertSynchronizeFile1Changed();
  }
View Full Code Here

    String dialogTitle = UIText.CompareTargetSelectionDialog_WindowTitle;
    SWTBotShell dialog = openCompareWithDialog(compareWithRefActionLabel,
        dialogTitle);

    // use the default (the last commit) -> no changes
    JobJoiner jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
    dialog.bot().button(UIText.CompareTargetSelectionDialog_CompareButton)
        .click();
    jobJoiner.join();

    closeFirstEmptySynchronizeDialog();

    assertSynchronizeNoChange();

    // use the tag -> should have a change
    dialog = openCompareWithDialog(compareWithRefActionLabel, dialogTitle);
    SWTBotTreeItem tags = dialog.bot().tree().getTreeItem(TAGS).expand();
    TestUtil.getChildNode(tags, "SomeTag").select();

    jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
    dialog.bot().button(UIText.CompareTargetSelectionDialog_CompareButton)
        .click();
    jobJoiner.join();

    assertSynchronizeFile1Changed();
  }
View Full Code Here

    ContextMenuHelper.clickContextMenuSync(projectExplorerTree, "Compare With",
        menuLabel);
  }

  private void clickCompareWithAndWaitForSync(String menuLabel) {
    JobJoiner jobJoiner = JobJoiner.startListening(
        ISynchronizeManager.FAMILY_SYNCHRONIZE_OPERATION, 60,
        TimeUnit.SECONDS);
    clickCompareWith(menuLabel);
    jobJoiner.join();
  }
View Full Code Here

    ContextMenuHelper.clickContextMenu(projectExplorerTree, "Replace With",
        menuLabel);
  }

  private void executeReplace(SWTBotShell dialog) {
    JobJoiner jobJoiner = JobJoiner.startListening(
        JobFamilies.DISCARD_CHANGES, 30, TimeUnit.SECONDS);
    dialog.bot().button(IDialogConstants.OK_LABEL).click();
    jobJoiner.join();
  }
View Full Code Here

  }

  private void fetch() throws Exception {
    SWTBotShell fetchDialog = openFetchDialog();
    fetchDialog.bot().button(IDialogConstants.NEXT_LABEL).click();
    JobJoiner jobJoiner = JobJoiner.startListening(JobFamilies.FETCH, 20, TimeUnit.SECONDS);
    fetchDialog.bot().button(IDialogConstants.FINISH_LABEL).click();
    jobJoiner.join();
  }
View Full Code Here

    getProjectItem(projectExplorerTree, PROJ1).select();
    String[] menuPath = new String[] {
        util.getPluginLocalizedValue("TeamMenu.label"),
        util.getPluginLocalizedValue("SwitchToMenu.label"),
        branchToCheckout };
    JobJoiner jobJoiner = JobJoiner.startListening(JobFamilies.CHECKOUT, 60, TimeUnit.SECONDS);
    ContextMenuHelper.clickContextMenuSync(projectExplorerTree, menuPath);
    jobJoiner.join();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.test.JobJoiner

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.