Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.DiscardChangesOperation.execute()

    String jobname = UIText.DiscardChangesAction_discardChanges;
    Job job = new WorkspaceJob(jobname) {
      public IStatus runInWorkspace(IProgressMonitor monitor) {
        try {
        } catch (CoreException e) {
          return Activator.createErrorStatus(e.getStatus()
              .getMessage(), e);
        return Status.OK_STATUS;
View Full Code Here

    assertEquals("Hello world 2", contents);
    setNewFileContent(file2, "changed 2");

    DiscardChangesOperation dcop = new DiscardChangesOperation(
        new IResource[] { file1, file2 });
    dcop.execute(new NullProgressMonitor());

    contents = testUtils.slurpAndClose(file1.getContents());
    assertEquals("Hello world 1", contents);

    contents = testUtils.slurpAndClose(file2.getContents());
View Full Code Here

    String contents = testUtils.slurpAndClose(file.getContents());
    assertEquals("initial", contents);
    setNewFileContent(file, "changed");

    DiscardChangesOperation dcop = new DiscardChangesOperation(new IResource[] { project2 });
    dcop.execute(new NullProgressMonitor());

    String replacedContents = testUtils.slurpAndClose(file.getContents());
    assertEquals("initial", replacedContents);
View Full Code Here

Copyright © 2018 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