DESCRIPTION

GitHistoryPage: move the search widget into the toolbar

This necessitates being more careful with global action registrations.
These previously used updateActionBars(), which updates also the
toolbars, which messes up when the focus changes from the history page
to the search bar's text input: one needed two clicks to set the focus
on the search bar. Resolved by updating only the global menu manager
when we changed only global action handlers.

ToolbarManager has a number of problems correctly re-displaying a
changing toolbar with dynamic items. In particular, it is not sufficient
to only update the ToolbarManager. It is in this case necessary to use
updateActionBars() indeed, which does much more and manages to re-layout
and re-position the toolbar properly. However, it messes up with the
background of the Composite containing the ToolBar. This was worked
around by some ugly back-and-forth with the focus. Some more focus
juggling had to be done to get the history view (and thus its status
line manager) to activate when the focus was elsewhere and the user then
clicked directly into the search bar, thus focusing it.

The search result indicator ("1/n") had to be moved out of the toolbar
itself. Instead there's now a listener interface that gets handed
that text and that then can display it as it sees fit. In this
implementation, it's simply written to the status bar. I also had
experimented with using a tooltip, but that becomes a hassle very
quickly. And tooltips belong to clan MacLeod: there can be only one.

Bug: 496278
Change-Id: I5adc521d19b0b99ee98bc573a807c72ba7d5caed
Signed-off-by: Alayna Houston xxx@xxx.xxx


COMMENTS

author: Alayna Houston
date: 2016-08-07 11:57:04.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2016-08-07 11:57:10.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2016-08-07 12:02:19.000000000

Patch Set 4: Verified-1

Build Failed 

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

-------------------------------------
author: Brenden Conley
date: 2016-08-07 12:17:01.000000000

Patch Set 4: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2016-08-07 12:42:02.000000000

Patch Set 4: Verified+1

Build Successful 

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

-------------------------------------
author: Zaid Mosley
date: 2016-08-19 09:48:00.000000000

Patch Set 4: Code-Review+1

Looks great to me.

-------------------------------------
author: Douglas Trujillo
date: 2016-08-19 20:53:13.000000000

Patch Set 4: Code-Review-1

(4 comments)

looks great, some minor issues

Line:692, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FindToolbar.java -> did you want to delete this code ?

Line:776, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FindToolbar.java -> remove dead code ?

Line:895, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> I think we add a blank line at the top of anonymous classes like below after new StatusListener() {

Line:33, /COMMIT_MSG -> I think when the user hides the toolbar this search result indicator should be also hidden and when the find toolbar is toggled to be visible again it should be restored to be visible again.

When the user moved to e.g. the fifth search result of 20 (5/20), then hides the toolbar and later toggles it back to the visible state, focus jumps back to the first search result and the history view scrolls back to show this first search result. Maybe it would be more consistent to remember the index of the search result which had focus when hiding the find toolbar and resume focus on the same search result when unhiding the toolbar. I think that would give a smoother experience.

-------------------------------------
author: Alayna Houston
date: 2016-08-21 13:29:16.000000000

Patch Set 4:

(4 comments)

Line:692, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FindToolbar.java -> Indeed. Done.

Line:776, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/FindToolbar.java -> Done

Line:895, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> Done. Usually the autoformatter does that, but sometimes it doesn't, and then I usually forget to do it manually...

Line:33, /COMMIT_MSG -> Both done, I think. Status message is cleared when the find  bar is hidden. And previously selected commit is revealed if the input didn't change in the meantime. Uses the commit id instead of the index, though. Consider: some search result is selected, user hides find toolbar, then commits a new commit, then re-opens the find toolbar: it'll come up with the previous text and re-do the search, but now the previously selected commit may have a different index.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-08-25 20:45:14.000000000

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

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