Add overview annotations to DiffEditorPage
commit39f20f98314562a7f457081d36c6d79ff6122665
authorThomas Wolf <thomas.wolf@paranor.ch>
Sat, 17 Dec 2016 09:26:10 +0000 (17 10:26 +0100)
committerThomas Wolf <thomas.wolf@paranor.ch>
Sun, 18 Dec 2016 22:11:35 +0000 (18 23:11 +0100)
tree1fabaaa8299634fdbb6a69f1d15c910a226fd0f4
parente3bed9a8e1b86430e6be93ca1029301e64fe1dfa
Add overview annotations to DiffEditorPage

Add overview annotations for added/removed lines in the unified
diff.

* Add annotations for the DiffRegions of a DiffDocument.
* Coalesce adjacent DiffRegions in DiffRegionFormatter.
* Fix a layout problem with the overview ruler when used in the
  DiffEditorPage.
* Derive the annotation colors automatically from the line background
  colors as set by the user preferences or by the current theme.
* When colors change, use invalidateTextPresentation() in DiffViewer
  instead of refresh() in order to maintain display state (scroll
  and caret position, selection, folding, etc.) refresh() would reset
  all those and jump to the beginning of the document.

Bug: 447512
Change-Id: I25964fee73b97995895f0a6819fb93c8ccdfbf04
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/plugin.xml
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffRegionFormatter.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffViewer.java