Skip to content
Failed

Changes

Summary

  1. CommitFileDiffViewer: command handlers for the context menu (part I) (details)
Commit 1ef1e012c1b31b82ed376ca9f929c4a929ed2c2d by Thomas Wolf
CommitFileDiffViewer: command handlers for the context menu (part I)

Make the context menu of the CommitFileDiffViewer extensible, and
migrate the first three hard-coded Actions to Command handlers. Define
the menu extension in plugin.xml.

Using menu extensions requires having the current selection reported by
the view set correctly depending on which viewer in the GitHistoryPage
is focused. Use a MultiViewerSelectionProvider; this tracks focus are
reports the selection of the focused viewer.

A new FileDiffPropertyTester is needed to express activation/enablement
correctly in plugin.xml.

Update the CommitEditor and its pages similarly so that they report the
selection from the currently focused viewer.

Unify the two "blame" commands; just use one single command with
different handlers.

Follow-up commits will migrate the remaining actions from that context
menu to command handlers, and then we re-use the new command handlers
in the DifFEditorOutlinePage, which shows objects that can adapt to
FileDiff.

Bug: egit-25
Change-Id: I782467110bc9e72a1ddc3e8ab0b41e0317161457
Signed-off-by: Thomas Wolf <twolf@apache.org>
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditorPage.java
The file was modified org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/commit/CommitEditorTest.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/CommitEditor.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java
The file was addedorg.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/FileDiffBlameHandler.java
The file was modified org.eclipse.egit.ui/plugin.properties
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/selection/MultiViewerSelectionProvider.java
The file was addedorg.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CompareWithPreviousHandler.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiff.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
The file was addedorg.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/FileDiffCompareWorkingTreeHandler.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
The file was modified org.eclipse.egit.ui/plugin.xml
The file was addedorg.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FileDiffPropertyTester.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commit/StashEditorPage.java
The file was modified org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/AbstractHistoryCommandHandler.java