DESCRIPTION

Move history page actions into plugin.xml and remove default handlers

The history view's main context menu was built programmatically,
apparently because of bug 322751, which undid an earlier attempt
to do this (bug 321516).

Move the context menu back to plugin.xml. Remove the menu items from
CommitGraphTable and add a new section in the menu ("history.group")
so that we can add our built-in commands in our own group, not just
under "additions".

Basically all the history view commands had defaultHandlers. To
remove them, we need quite a lot of new dedicated handlers.

Verified that the error described in bug 322751 did not re-appear.

There should be only minor visual changes in the context menu of the
history view. We only show applicable operations, and I have slightly
re-arranged a few separators.

There is quite some duplication between handlers. With the new
IRepositoryCommit interface, it should be possible to unify many
commands, but this is postponed to future commits.

Bug: 495064
Change-Id: I73951763904f61ec1b116dc1781cbcc6b0fdb65f
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2017-08-30 13:07:57.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2017-08-30 13:08:06.000000000

Patch Set 3:

Build Started https://ci.eclipse.org/egit/job/egit.gerrit/10118/

-------------------------------------
author: Alayna Houston
date: 2017-08-30 13:10:05.000000000

Patch Set 3:

(1 comment)

-------------------------------------
author: Brenden Conley
date: 2017-08-30 13:30:20.000000000

Patch Set 3: Verified+1

Build Successful 

https://ci.eclipse.org/egit/job/egit.gerrit/10118/ : SUCCESS

-------------------------------------
author: Jack Yu
date: 2017-08-30 14:51:41.000000000

Patch Set 3: Code-Review-1

(2 comments)

When running this (on Windows), I see a minor functional difference: When I hover one of the new commands, I get an additional tooltip with the command description after a second. The tooltip is not the identical string as the menu item label, e.g. the menu item "Rebase HEAD on" only shows the tooltip "Rebase".
That tooltip is NOT shown for the "Copy Commit Id", "Add Task Content", "Open Corresponding Task" items at the bottom.

Line:6578, org.eclipse.egit.ui/plugin.xml -> The name of the command and the label of the menu seem to be confused here (independent of your change). The menu item shows "Delete Branch", while the tooltip for the menu item is "Delete Branch..." (including ellipsis). For all other menu items, it is exactly the other way around.

I'm not exactly sure which 2 strings are relevant, but please notice that this command is the only one not using the pattern "Command.name" for the name property, like the commands below and above.

Line:6679, org.eclipse.egit.ui/plugin.xml -> this one does not exist. can be noticed by hovering the menu item in runtime and seeing the untranslated name as tooltip

-------------------------------------
author: Alayna Houston
date: 2017-08-31 15:08:05.000000000

Patch Set 3:

(2 comments)

> I see a minor functional
 > difference: When I hover one of the new commands, I get an
 > additional tooltip with the command description after a second.

Right. Tooltips on menu items are relatively recent. That by default the command name is taken as tooltip is a bit unfortunate and not very helpful. We should add meaningful tooltips to all menu items in a later commit.

 > That tooltip is NOT shown for the "Copy Commit Id", "Add Task
 > Content", "Open Corresponding Task" items at the bottom.

The "Copy Commit Id" is added programmatically, I think. I would have to check where the two task related menu items are contributed.

I suggest we postpone unifying these tooltips and making them meaningful to a later commit.

Line:6578, org.eclipse.egit.ui/plugin.xml -> Fixed.

We can in later commit check whether we can make the menu show the ... if we're sure we'll show a dialog. For now, both the menu label and the command name are without ellipsis since we may not open a dialog (a single branch, not current HEAD).

Line:6679, org.eclipse.egit.ui/plugin.xml -> Fixed. If you re-test, start the Eclipse with -clean,otherwise it won't pick up the fix.

-------------------------------------
