DESCRIPTION

Refactor the action handling in the git history view

Commit bc712de04 broke the handling of global actions. The git history
view has three viewers, each with their own actions (and context menus).
Each registered and unregistered global actions when it got or lost the
focus. This interfered badly with the new dynamic search toolbar item
because updateActionBars() also updates the toolbar and re-creates that
dynamic item every time. However, the change made in bc712de04 was not
correct; global action registrations were no longer propagated to the
RetargetActions.

This change refactors the whole action handling in these three viewers
in the git history view. There was too much code duplication anyway.

* Factor out the creation of global actions into new class ActionUtils.
* Make the viewers only provide the actions, but not register/unregister
  them.
* The view/page itself is now responsible for action registration.
* Introduce a new GlobalActionHandler. This registers actions once,
  tracks focus changes among the viewers, and makes the registered
  actions delegate to the actions provided by the currently focused
  viewer.

This gets rid of the focus change listeners in the three viewers, and
also avoids having to call updateActionBars() on each focus change.

Finally: use getPath() instead of getNewPath() in the copy
implementation in CommitFileDiffViewer so that it also works
for deleted files.

Bug: 503198
Change-Id: I0ee88c4f03f5fbcab86099cc498c68a2b077b1fa
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-10-07 19:34:09.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2016-10-07 19:36:26.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2016-10-07 20:00:55.000000000

Patch Set 4: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/9118/ : SUCCESS

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-10-12 23:06:42.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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