title: Generate a collection of changed lines between two revisions of a file using Java
body: <p>I am writing an eclipse plugin which needs to be able to determine which lines of a file have changed compared to a different version of the same file.</p>
  
  <p>Is there an existing class or library which I can use for this task?</p>
  
  <p>The closest I have found is org.eclipse.compare.internal.merge.DocumentMerger. This can be used to find the information I need but is in an internal package so is not suitable for me to use. I could copy/paste the source of this class and adapt it to my requirements. However, I am hoping there is an existing library to handle textual comparisons. </p>