Clean up "Show Blame" handling
commit8e7cd94da8d072839eb861e99e76bc49a3c4eeac
authorThomas Wolf <thomas.wolf@paranor.ch>
Sun, 2 Oct 2016 20:51:38 +0000 (2 22:51 +0200)
committerThomas Wolf <thomas.wolf@paranor.ch>
Fri, 14 Oct 2016 05:46:01 +0000 (14 07:46 +0200)
tree9096240afc372c057159c246f0984b8a763e05f7
parente2b8f79c298982e582fe9ebc07ceaaeb11aa2cab
Clean up "Show Blame" handling

* Replace deprecated ObjectContribution extension by Command/Handler
  combo and remove the default handler for the
  org.eclipse.egit.ui.team.ShowBlame command.
* Remove now unused legacy ShowBlameAction and the (wrong) command id
  in ActionCommands.

This does not yet remove the default handler for the history view's
org.eclipse.egit.ui.history.ShowBlame command. Apparently there were
once problems with creating this context menu declaratively (see bug
322751 and commit 44dfabcd); apparently having to do with the
availability of the selection. As a consequence this menu is built
programmatically but relying on some declarations (including default
handlers) in plugin.xml. These default handlers can still be invoked
outside of their intended context, but cannot be removed easily. The
approach taken for now for this ShowBlameHandler is thus to at least
prevent exceptions when it is invoked when it shouldn't be:

* Prevent NPE in the ShowBlameHandler (history view).

Bug: 495064
Change-Id: I3d570266cc58f873e512e124299b235d35ecfdb6
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/actions/ActionCommands.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/ShowBlameAction.java [deleted file]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/ShowBlameHandler.java