org.sourcejammer.client.gui.merge
Class MergeProcessor

java.lang.Object
  |
  +--org.sourcejammer.client.gui.merge.MergeProcessor

public class MergeProcessor
extends java.lang.Object

Title: $FileName: MergeProcessor.java$ Description: $Description: $ Copyright: Copyright (c) 2002 Company: SourceJammer

Version:
$VerNum: 2$ $KeyWordsOff: $

Field Summary
private  java.io.File ancestor
           
private  java.io.File checkingInVersion
           
private  java.io.File currentVersion
           
 
Constructor Summary
MergeProcessor(java.io.File ancestor, java.io.File currentVersion, java.io.File checkingInVersion)
           
 
Method Summary
private  java.util.ArrayList diffToArrayList(JLibDiff.diff d)
           
private  boolean doHunkRangesMatch(JLibDiff.Hunk h1, JLibDiff.Hunk h2)
          Returns true if both hunks point to the exact same regions in both files.
private  boolean doHunksMatch(JLibDiff.Hunk h1, JLibDiff.Hunk h2)
          Returns true if both hunks reflect the exact same change to both files.
private  boolean doHunksOverlap(JLibDiff.Hunk h1, JLibDiff.Hunk h2)
          Returns true if the regions of the old file (file 0) referenced in both hunks overlap.
private  java.util.ArrayList getChangePoints(java.util.ArrayList currVerList, java.util.ArrayList checkingInList)
           
private  boolean isHunkOneBeforeHunkTwo(JLibDiff.Hunk h1, JLibDiff.Hunk h2)
          Returns true if Hunk 1 refers to a region of file 0 entirely before the region reference by hunk 2.
private  boolean isNumWithinRange(int num, int startRange, int endRange)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ancestor

private java.io.File ancestor

currentVersion

private java.io.File currentVersion

checkingInVersion

private java.io.File checkingInVersion
Constructor Detail

MergeProcessor

public MergeProcessor(java.io.File ancestor,
                      java.io.File currentVersion,
                      java.io.File checkingInVersion)
               throws java.io.IOException
Method Detail

getChangePoints

private java.util.ArrayList getChangePoints(java.util.ArrayList currVerList,
                                            java.util.ArrayList checkingInList)

isHunkOneBeforeHunkTwo

private boolean isHunkOneBeforeHunkTwo(JLibDiff.Hunk h1,
                                       JLibDiff.Hunk h2)
Returns true if Hunk 1 refers to a region of file 0 entirely before the region reference by hunk 2.


doHunksMatch

private boolean doHunksMatch(JLibDiff.Hunk h1,
                             JLibDiff.Hunk h2)
Returns true if both hunks reflect the exact same change to both files.


doHunkRangesMatch

private boolean doHunkRangesMatch(JLibDiff.Hunk h1,
                                  JLibDiff.Hunk h2)
Returns true if both hunks point to the exact same regions in both files.


doHunksOverlap

private boolean doHunksOverlap(JLibDiff.Hunk h1,
                               JLibDiff.Hunk h2)
Returns true if the regions of the old file (file 0) referenced in both hunks overlap.


isNumWithinRange

private boolean isNumWithinRange(int num,
                                 int startRange,
                                 int endRange)

diffToArrayList

private java.util.ArrayList diffToArrayList(JLibDiff.diff d)


Copyright © 2003 Soucejammer project.