Package org.eclipse.egit.ui.common

Examples of org.eclipse.egit.ui.common.CreatePatchWizard


  @Test
  public void testClipboard() throws Exception {
    touchAndSubmit("oldContent", null);
    touch("newContent");

    CreatePatchWizard createPatchWizard = openCreatePatchWizard();
    LocationPage locationPage = createPatchWizard.getLocationPage();
    locationPage.selectClipboard();
    createPatchWizard.finishWithNoneFormat();

    bot.waitUntil(Conditions.shellCloses(createPatchWizard.getShell()));

    assertClipboard(EXPECTED_PATCH_CONTENT);
  }
View Full Code Here


  @Test
  public void testFilesystem() throws Exception {
    touchAndSubmit("oldContent", null);
    touch("newContent");

    CreatePatchWizard createPatchWizard = openCreatePatchWizard();
    LocationPage locationPage = createPatchWizard.getLocationPage();
    IProject project = ResourcesPlugin.getWorkspace().getRoot()
        .getProject(PROJ1);
    File patch = new File(project.getLocation().toFile(), PATCH_FILE);
    locationPage.selectFilesystem(patch.toString());
    createPatchWizard.finishWithNoneFormat();

    bot.waitUntil(Conditions.shellCloses(createPatchWizard.getShell()));

    byte[] bytes = IO.readFully(patch);
    String patchContent = new String(bytes, "UTF-8");

    assertEquals(EXPECTED_PATCH_CONTENT, patchContent);
View Full Code Here

  @Test
  public void testWorkspace() throws Exception {
    touchAndSubmit("oldContent", null);
    touch("newContent");

    CreatePatchWizard createPatchWizard = openCreatePatchWizard();
    LocationPage locationPage = createPatchWizard.getLocationPage();
    locationPage.selectWorkspace("/" + PROJ1 + "/" + PATCH_FILE);
    createPatchWizard.finishWithNoneFormat();

    bot.waitUntil(Conditions.shellCloses(createPatchWizard.getShell()));

    IFile patch = ResourcesPlugin.getWorkspace().getRoot()
        .getProject(PROJ1).getFile(PATCH_FILE);
    byte[] bytes = IO.readFully(patch.getLocation().toFile());
    String patchContent = new String(bytes, patch.getCharset());
View Full Code Here

    IFile newFile = secondProject.getFile(FILE1);
    newFile.create(
        new ByteArrayInputStream("Hello, world".getBytes(secondProject
            .getDefaultCharset())), false, null);

    CreatePatchWizard createPatchWizard = openCreatePatchWizard();
    LocationPage locationPage = createPatchWizard.getLocationPage();
    locationPage.selectWorkspace("/" + PROJ1 + "/" + PATCH_FILE);
    OptionsPage optionsPage = locationPage.nextToOptionsPage();
    optionsPage.setFormat(CoreText.DiffHeaderFormat_Workspace);
    createPatchWizard.finish();

    bot.waitUntil(Conditions.shellCloses(createPatchWizard.getShell()));

    IFile patch = ResourcesPlugin.getWorkspace().getRoot()
        .getProject(PROJ1).getFile(PATCH_FILE);
    byte[] bytes = IO.readFully(patch.getLocation().toFile());
    String patchContent = new String(bytes, patch.getCharset());
View Full Code Here

  private CreatePatchWizard openCreatePatchWizard() throws Exception {
    CreatePatchWizard.openWizard(PROJ1, PROJ2);
    SWTBotShell shell = bot
        .shell(UIText.GitCreatePatchWizard_CreatePatchTitle);
    return new CreatePatchWizard(shell);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.common.CreatePatchWizard

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.