Class UnifiedDiffHunk

java.lang.Object
org.eclipse.compare.unifieddiff.UnifiedDiffHunk

public final class UnifiedDiffHunk extends Object
Describes a unified-diff hunk resolved by the user. Its range identifies its location in the editor document immediately before it is resolved.
  • Constructor Details

  • Method Details

    • getResolution

      public UnifiedDiffHunk.Resolution 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

      public String getEditorCode()
      Returns the code in the editor document when this diff was created.
    • getComparedSourceCode

      public String getComparedSourceCode()
      Returns the code in the source compared with the editor document.