|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--upidiff.diff.Change
|
+--upidiff.diff.LineChange
This class represents a line change. A line change can either be a line inserted or deleted in the new file, or a line in the old file replaced with another line in the new file.
| Field Summary | |
private boolean |
charChangesVisible
Whether or not char changes are displayed for this line change. |
private LineChange |
nextLineChange
Points to the next line change within this block change or null. |
private LineChange |
prevLineChange
Points to the previous line change within this change or null. |
| Fields inherited from class upidiff.diff.Change |
deleted, deletedOffset, inserted, insertedOffset, NEWFILE, next, NOTMERGED, OLDFILE, parent, prev, whichVersion |
| Constructor Summary | |
(package private) |
LineChange(int deletedOffset,
int insertedOffset,
int deleted,
int inserted,
boolean charChangesVisible,
BlockChange parent)
Creates a new line change using the given attributes. |
| Method Summary | |
(package private) void |
calculateCharChanges(String oldLine,
String newLine)
Calculates the char changes for this line change. |
boolean |
charChangesPossible()
Tells whether or not this line change can contain character changes. |
private Character[] |
convertToArray(String line)
Converts a String to a Character array. |
LineChange |
getNextLineChange()
Returns a pointer to the next line change within this block change. |
LineChange |
getPrevLineChange()
Returns a pointer to the previous line change within this block change. |
boolean |
isCharChangesVisible()
Returns whether or not to display the char changes within this line change. |
boolean |
oneCharAlreadyMerged()
This method queries whether one of the CharChanges in this Line was already merged. |
void |
setCharChangesVisible(boolean visible)
Sets whether or not to display the char changes within this line change. |
void |
setNextLineChange(LineChange next)
Sets the pointer to the next line change within this block change. |
void |
setPrevLineChange(LineChange prev)
Sets the pointer to the previous line change within this block change. |
| Methods inherited from class upidiff.diff.Change |
getDeleted, getDeletedOffset, getInserted, getInsertedOffset, getMergedVersion, getNext, getParent, getPrev, isMerged, setDeleted, setDeletedOffset, setInserted, setInsertedOffset, setMerged, setNext, setParent, setPrev |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private boolean charChangesVisible
private LineChange nextLineChange
private LineChange prevLineChange
| Constructor Detail |
LineChange(int deletedOffset,
int insertedOffset,
int deleted,
int inserted,
boolean charChangesVisible,
BlockChange parent)
deletedOffset - Line offset in old file.insertedOffset - Line offset in new file.deleted - Number of lines deleted.inserted - Number of lines inserted.charChangesVisible - Should char changes be displayed for
this line change.parent - BlockChange this LineChange belongs to.BlockChange,
Change.Change(int,int,int,int,Change)| Method Detail |
public final boolean isCharChangesVisible()
public final void setCharChangesVisible(boolean visible)
visible - Whether to display char changes for this line change.public final LineChange getNextLineChange()
public final boolean oneCharAlreadyMerged()
public final void setNextLineChange(LineChange next)
next - New next line change.public final LineChange getPrevLineChange()
public final void setPrevLineChange(LineChange prev)
prev - New previous line change.public final boolean charChangesPossible()
private final Character[] convertToArray(String line)
line - String to convert.
final void calculateCharChanges(String oldLine,
String newLine)
oldLine - Line in the old text.newLine - Line in the new text.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||