DESCRIPTION

Eliminate defaultHandler for "Rename Branch..."

With a default handler for this command, there are two quick access
entries: "Rename Branch" and "Rename Branch...". They are available at
all times, but the first one should have the ellipsis, and the second
one does not work (throws an IndexOutOfBoundsException) if the selection
is in an unexpected part.

* Change the command name for the org.eclipse.egit.ui.team.RenameBranch
  command to "Rename Branch..." so that it show correctly in quick
  access.
* Remove the defaultHandlers for the various renameBranch commands. Add
  explicit handlers with correct <activeWhen> expressions.
* Remove the unused org.eclipse.egit.ui.RepositoriesViewRenameBranch
  command from plugin.xml.
* Make the CommitGraphTable use the standard rename command, like the
  repositories view does.
* Delete unused class RenameBranchAction.
* Simplify AbstractHistoryCommandHandler a little bit.

As a result, there is only one "Rename Branch..." available in quick
access, and only if applicable. Moreover, the correct handler is invoked
if applicable. Context menus are unchanged in appearance and
functionality.

To fix bug 495064, one would have to do similar refactorings for all
other default handlers. (Unless, of course, for those that really make
sense as a default handler.)

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

COMMENTS

author: Alayna Houston
date: 2016-06-01 21:42:31.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-06-01 21:42:37.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8689/

-------------------------------------
author: Alayna Houston
date: 2016-06-01 21:58:16.000000000

Patch Set 1:

(7 comments)

Line:4813, org.eclipse.egit.ui/plugin.xml -> Is not used anywhere as far as I see.

Line:5745, org.eclipse.egit.ui/plugin.xml -> Took me quite a while to figure out how these commands end up in the context menu of the CommitGraphTable. Is there any reason why this context menu is built programmatically instead of using regular <menuContribution>s here in plugin.xml?? I think it could work, with dynamic items also for the conditional labels, and we could drop quite a bit of Java code (CommitGraphTable.MenuListener)...

Line:1781, org.eclipse.egit.ui/plugin.xml -> Perhaps add here a condition "only when the selection is not an SWTCommit".

Line:5651, org.eclipse.egit.ui/plugin.xml -> This is with ellipsis...

Line:23, /COMMIT_MSG -> Whether that's smart I'm not sure. This command shows up in quick access as "Rename the currently selected element". Could be omitted from this change.

Line:33, /COMMIT_MSG -> Alternative: make sure none of these default handlers throws exceptions when the selection/active part/whatever is something unexpected. But that would mean the commands would still show up in quick access, but not do anything when invoked. I prefer having them available in quick access only when applicable.

Line:33, /COMMIT_MSG -> s/Unless/Except/

-------------------------------------
author: Brenden Conley
date: 2016-06-01 22:10:25.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/8689/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2016-06-01 22:15:22.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8690/

-------------------------------------
author: Brenden Conley
date: 2016-06-01 22:48:39.000000000

Patch Set 1: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/8690/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2016-06-02 16:14:29.000000000

Patch Set 1: -Code-Review

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8692/

-------------------------------------
author: Brenden Conley
date: 2016-06-02 16:15:16.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/8692/ : FAILURE

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-07-02 18:11:50.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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