Package org.eclipse.jface.text.source
Interface ILineDiffInfo
public interface ILineDiffInfo
Describes the change state of one line, which consists of the state of the line itself, which
can be
UNCHANGED
, CHANGED
or ADDED
, and the number of
deleted lines before and after this line.
This interface may be implemented by clients.
- Since:
- 3.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the type of this line, one out ofUNCHANGED
,CHANGED
orADDED
.String[]
Returns the original text of this changed regionint
Returns the number of deleted lines before this line.int
Returns the number of deleted lines after this line.boolean
Returns whether this line has any changes (to itself, or any deletions before or after it).
-
Field Details
-
UNCHANGED
static final int UNCHANGEDDenotes an unchanged line.- See Also:
-
ADDED
static final int ADDEDDenotes an added line.- See Also:
-
CHANGED
static final int CHANGEDDenotes a changed line.- See Also:
-
-
Method Details
-
getRemovedLinesBelow
int getRemovedLinesBelow()Returns the number of deleted lines after this line.- Returns:
- the number of lines after this line.
-
getRemovedLinesAbove
int getRemovedLinesAbove()Returns the number of deleted lines before this line.- Returns:
- the number of lines before this line.
-
getChangeType
int getChangeType()Returns the type of this line, one out ofUNCHANGED
,CHANGED
orADDED
.- Returns:
- the type of this line.
-
hasChanges
boolean hasChanges()Returns whether this line has any changes (to itself, or any deletions before or after it).- Returns:
true
, if the line's state (as returned bygetType
) is eitherCHANGED
orADDED
or either ofgetRemovedLinesBelow
andgetRemovedLinesAbove
would return a number > 0
-
getOriginalText
String[] getOriginalText()Returns the original text of this changed region- Returns:
- the original text of this changed region, including any deleted lines. The returned
value and its elements may not be
null
, it may however be of zero length
-