Class UnifiedDiffHunk
java.lang.Object
org.eclipse.compare.unifieddiff.UnifiedDiffHunk
Describes a unified-diff hunk resolved by the user. Its range identifies its
location in the editor document immediately before it is resolved.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the hunk was resolved. -
Constructor Summary
ConstructorsConstructorDescriptionUnifiedDiffHunk(UnifiedDiffHunk.Resolution resolution, int line, int offset, int length, String editorCode, String comparedSourceCode) -
Method Summary
Modifier and TypeMethodDescriptionReturns the code in the source compared with the editor document.Returns the code in the editor document when this diff was created.intReturns the length of this hunk before it is resolved.intgetLine()Returns the one-based line at which this hunk starts before it is resolved.intReturns the offset of this hunk before it is resolved.Returns whether this hunk was accepted, rejected, or manually deleted.
-
Constructor Details
-
UnifiedDiffHunk
public UnifiedDiffHunk(UnifiedDiffHunk.Resolution resolution, int line, int offset, int length, String editorCode, String comparedSourceCode)
-
-
Method Details
-
getResolution
Returns whether this hunk was accepted, rejected, or manually deleted. -
getLine
public int getLine()Returns the one-based line at which this hunk starts before it is resolved. -
getOffset
public int getOffset()Returns the offset of this hunk before it is resolved. -
getLength
public int getLength()Returns the length of this hunk before it is resolved. -
getEditorCode
Returns the code in the editor document when this diff was created. -
getComparedSourceCode
Returns the code in the source compared with the editor document.
-