Turn the DiffEditorPage into a real TextEditor
commit7a8a09de3dca421abf20ce430cf2e5348381a7f7
authorThomas Wolf <thomas.wolf@paranor.ch>
Sat, 3 Dec 2016 22:41:38 +0000 (3 23:41 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 7 Dec 2016 23:07:31 +0000 (8 00:07 +0100)
tree1c11c2e5421d21294d5fe4767d9fd8337fc24a15
parent6cdb692cc5933a00079fcb1f520560e1312194d3
Turn the DiffEditorPage into a real TextEditor

This enables many standard text editor actions like "Find" or
"Go to line".

There should be no visual changes except:
* The diff page behaves generally like a real read-only text editor,
  including global contributions to menus, toolbars, the status line,
  and so on. The line number ruler is now provided by the text editor
  and can be toggled. And if the diff show multiple files, there's even
  folding.
* The context menu is now a standard extensible text editor context
  menu that may get contributions. It also provides access to the text
  editor preferences.

Code changes:

* DiffViewer simplified. In particular removed a number of things from
  the constructor that are now provided by the standard text editor
  framework. (Line numbers, highlighting current line, configuration).
* CommitEditor: give it an IEditorActionBarContributor to manage
  contributions of nested text editors.
* Make HyperlinkSourceViewer a ProjectionViewer to get folding support
  in the editor.
* Rewrite DiffEditorPage to be a TextEditor.
* Add "Show In..." support.

Change-Id: Ic9f2ad74f50e92d9c93d4cfd04273c12b741b284
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
12 files changed:
org.eclipse.egit.ui/plugin.xml
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/blame/BlameInformationControl.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditor.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorActionBarContributor.java [new file with mode: 0644]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffEditorPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffStyleRangeFormatter.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/DiffViewer.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/HyperlinkSourceViewer.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java