org.sourcejammer.client.gui.merge
Class MergePadVisitor

java.lang.Object
  |
  +--org.sourcejammer.client.gui.merge.MergePadVisitor
All Implemented Interfaces:
JLibDiff.Hunk3Visitor

public class MergePadVisitor
extends java.lang.Object
implements JLibDiff.Hunk3Visitor

Version:
$VerNum: 4$ $KeyWordsOff: $
Author:
$AuthorName: Rob MacGrogan$

Field Summary
private  javax.swing.JTextArea ancestorTextArea
           
private  javax.swing.JTextArea checkingInTextArea
           
private  java.util.ArrayList checkingInVerStrings
           
private  javax.swing.JTextArea currVersionTextArea
           
private  java.util.ArrayList currVerStrings
           
private static java.lang.String EOL
           
private  int lastCheckInIndex
           
private  int linesAddedToAncestor
           
private  int linesAddedToCheckingIn
           
private  int linesAddedToCurrVer
           
private  java.util.ArrayList noConflictStrings
           
private  java.lang.String originalCheckInFile
           
private  java.lang.String originalCurrFile
           
 
Constructor Summary
MergePadVisitor(javax.swing.JTextArea ancestorTextArea, javax.swing.JTextArea currVerTextArea, javax.swing.JTextArea checkingInTextArea)
           
 
Method Summary
private  void addLinesToTextArea(int numLines, int addLineAfterIndex, javax.swing.JTextArea area)
           
private  void balanceViews(JLibDiff.Hunk3 hunk)
           
 boolean continueVisit()
           
 java.lang.String getCheckInString(JLibDiff.Hunk3 hunk)
           
 java.util.ArrayList getCheckInStrings()
           
 java.lang.String getCurrString(JLibDiff.Hunk3 hunk)
           
 java.util.ArrayList getCurrVerStrings()
           
 java.util.ArrayList getNoConflictStrings()
           
private  int getOffsetEOL(int linenumber, javax.swing.JTextArea area)
          Return character index of end of specified line in buffer.
private  int getOffsetSOL(int linenumber, javax.swing.JTextArea area)
           
private  java.lang.String insertString(java.lang.String target, java.lang.String insert, int index)
           
 void setContinueVisit(boolean b)
           
 void visitHunk3(JLibDiff.Hunk3 hunk3)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ancestorTextArea

private javax.swing.JTextArea ancestorTextArea

currVersionTextArea

private javax.swing.JTextArea currVersionTextArea

checkingInTextArea

private javax.swing.JTextArea checkingInTextArea

linesAddedToAncestor

private int linesAddedToAncestor

linesAddedToCurrVer

private int linesAddedToCurrVer

linesAddedToCheckingIn

private int linesAddedToCheckingIn

currVerStrings

private java.util.ArrayList currVerStrings

checkingInVerStrings

private java.util.ArrayList checkingInVerStrings

noConflictStrings

private java.util.ArrayList noConflictStrings

originalCheckInFile

private java.lang.String originalCheckInFile

originalCurrFile

private java.lang.String originalCurrFile

lastCheckInIndex

private int lastCheckInIndex

EOL

private static final java.lang.String EOL
Constructor Detail

MergePadVisitor

public MergePadVisitor(javax.swing.JTextArea ancestorTextArea,
                       javax.swing.JTextArea currVerTextArea,
                       javax.swing.JTextArea checkingInTextArea)
Method Detail

getCurrVerStrings

public java.util.ArrayList getCurrVerStrings()

getCheckInStrings

public java.util.ArrayList getCheckInStrings()

getNoConflictStrings

public java.util.ArrayList getNoConflictStrings()

balanceViews

private void balanceViews(JLibDiff.Hunk3 hunk)

addLinesToTextArea

private void addLinesToTextArea(int numLines,
                                int addLineAfterIndex,
                                javax.swing.JTextArea area)

insertString

private java.lang.String insertString(java.lang.String target,
                                      java.lang.String insert,
                                      int index)

getOffsetSOL

private int getOffsetSOL(int linenumber,
                         javax.swing.JTextArea area)

getOffsetEOL

private int getOffsetEOL(int linenumber,
                         javax.swing.JTextArea area)
Return character index of end of specified line in buffer.


visitHunk3

public void visitHunk3(JLibDiff.Hunk3 hunk3)
Specified by:
visitHunk3 in interface JLibDiff.Hunk3Visitor
See Also:
Hunk3Visitor.visitHunk3(Hunk3)

getCurrString

public java.lang.String getCurrString(JLibDiff.Hunk3 hunk)

getCheckInString

public java.lang.String getCheckInString(JLibDiff.Hunk3 hunk)

continueVisit

public boolean continueVisit()
Specified by:
continueVisit in interface JLibDiff.Hunk3Visitor
See Also:
Hunk3Visitor.continueVisit()

setContinueVisit

public void setContinueVisit(boolean b)
Specified by:
setContinueVisit in interface JLibDiff.Hunk3Visitor
See Also:
Hunk3Visitor.setContinueVisit(boolean)


Copyright 2003 Soucejammer project.