Package org.eclipse.team.core.diff

Examples of org.eclipse.team.core.diff.IDiff


    iProject.refreshLocal(IResource.DEPTH_INFINITE,
        new NullProgressMonitor());

    IMergeContext mergeContext = prepareContext(workspaceFile, HEAD, HEAD);
    IDiff node = mergeContext.getDiffTree().getDiff(workspaceFile);
    assertNotNull(node);
    // First of all, "markAsMerged" is not supposed to have any effect on a
    // folder.
    // Second, it should only be used on IDiff obtained from the context,
    // not created for the occasion.
View Full Code Here


        new NullProgressMonitor());
    // end setup

    IMergeContext mergeContext = prepareContext(workspaceFile, MASTER,
        BRANCH);
    IDiff node = mergeContext.getDiffTree().getDiff(workspaceFile);
    assertNotNull(node);

    IStatus mergeStatus = mergeContext.merge(node, false,
        new NullProgressMonitor());
    assertEquals(IStatus.OK, mergeStatus.getSeverity());
View Full Code Here

    iProject.refreshLocal(IResource.DEPTH_INFINITE,
        new NullProgressMonitor());
    // end setup

    IMergeContext mergeContext = prepareModelContext(iFile1, MASTER, BRANCH);
    IDiff node = mergeContext.getDiffTree().getDiff(iFile1);
    assertNotNull(node);
    node = mergeContext.getDiffTree().getDiff(iFile2);
    assertNotNull(node);

    IResourceMappingMerger merger = new SampleModelMerger(
View Full Code Here

        new NullProgressMonitor());
    // end setup

    IMergeContext mergeContext = prepareContext(workspaceFile, MASTER,
        BRANCH);
    IDiff node = mergeContext.getDiffTree().getDiff(workspaceFile);
    assertNotNull(node);

    IStatus mergeStatus = mergeContext.merge(node, false,
        new NullProgressMonitor());
    assertEquals(IStatus.ERROR, mergeStatus.getSeverity());
View Full Code Here

    iProject.refreshLocal(IResource.DEPTH_INFINITE,
        new NullProgressMonitor());
    // end setup

    IMergeContext mergeContext = prepareModelContext(iFile1, MASTER, BRANCH);
    IDiff node = mergeContext.getDiffTree().getDiff(iFile1);
    assertNotNull(node);
    node = mergeContext.getDiffTree().getDiff(iFile2);
    assertNotNull(node);

    IResourceMappingMerger merger = new SampleModelMerger(
View Full Code Here

    iProject.refreshLocal(IResource.DEPTH_INFINITE,
        new NullProgressMonitor());
    // end setup

    IMergeContext mergeContext = prepareModelContext(iFile1, MASTER, BRANCH);
    IDiff node = mergeContext.getDiffTree().getDiff(iFile1);
    assertNotNull(node);
    node = mergeContext.getDiffTree().getDiff(iFile2);
    assertNotNull(node);

    IResourceMappingMerger merger = new SampleModelMerger(
View Full Code Here

    GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd);
    GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber(
        gsds);
    subscriber.init(new NullProgressMonitor());

    IDiff diff = subscriber.getDiff(iFile2);
    assertTrue(diff instanceof IThreeWayDiff);

    IFileRevision sourceRevision = getSource(diff);
    IFileRevision destinationRevision = getDestination(diff);
    IFileRevision baseRevision = getBase(diff);
View Full Code Here

    if (diff instanceof IResourceDiff)
      return ((IResourceDiff) diff).getBeforeState();

    if (diff instanceof IThreeWayDiff) {
      final IThreeWayDiff twd = (IThreeWayDiff) diff;
      final IDiff localChange = twd.getLocalChange();
      if (localChange instanceof IResourceDiff)
        return ((IResourceDiff) localChange).getAfterState();
    }

    return null;
View Full Code Here

    if (diff instanceof IResourceDiff)
      return ((IResourceDiff) diff).getAfterState();

    if (diff instanceof IThreeWayDiff) {
      final IThreeWayDiff twd = (IThreeWayDiff) diff;
      final IDiff remoteChange = twd.getRemoteChange();
      if (remoteChange instanceof IResourceDiff)
        return ((IResourceDiff) remoteChange).getAfterState();

      final IDiff localChange = twd.getLocalChange();
      if (localChange instanceof IResourceDiff)
        return ((IResourceDiff) localChange).getBeforeState();
    }

    return null;
View Full Code Here

  }

  private static IFileRevision getBase(IDiff diff) {
    if (diff instanceof IThreeWayDiff) {
      final IThreeWayDiff twd = (IThreeWayDiff) diff;
      final IDiff remoteChange = twd.getRemoteChange();
      if (remoteChange instanceof IResourceDiff)
        return ((IResourceDiff) remoteChange).getBeforeState();

      final IDiff localChange = twd.getLocalChange();
      if (localChange instanceof IResourceDiff)
        return ((IResourceDiff) localChange).getBeforeState();
    }

    return null;
View Full Code Here

TOP

Related Classes of org.eclipse.team.core.diff.IDiff

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.