DESCRIPTION

RFC: redesign history search widget

Use a pop-up widget in the top-left corner of the history view as
suggested in the bug report.

Four minor problems:
* Visual updates for keeping the pop-up in the top-left corner lag
  a little bit when the view is resized.
* Finding the correct position is not as clean as I would have liked.
  A method somewhere to obtain that top-left corner of a view part's
  main content control might be helpful.
* The pop-up is done using a shell. SWT/JFace does not seem to have
  support for shells that auto-resize to the size of their contents.
  At least I haven't found anything and have thus implemented my own
  work-around.
* Moving the history view between windows closes the pop-up if the
  shell cannot be re-parented.

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


COMMENTS

author: Alayna Houston
date: 2016-06-28 21:48:24.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-06-28 21:48:30.000000000

Patch Set 1:

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

-------------------------------------
author: Alayna Houston
date: 2016-06-28 22:03:53.000000000

Patch Set 1:

(4 comments)

Line:385, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> IBindingService.getBestActiveBindingFor(ActionFactory.FIND.getCommandId()) sometimes worked and sometimes didn't...

Line:886, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> The label inside the FindToolbar does a proper requestLayout().I thought I could resize the shell by listening to resize events on the FindToolbar, but somehow I never got any, even though the toolbar was re-layouted and re-painted. Hence this work-around with my own LayoutListener explicitly invoked.

What's the proper way to get a shell that auto-resizes when its contents change size?

Line:894, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> Cmd/Ctrl-F opens the SearchBar, and closes it, too. This listener is here to handle Cmd/Ctrl-F when the SearchBar's shell has the focus and thus the binding in the GitHistoryPage has no effect.

Line:1888, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java -> Shows the SearchBar only once we do have commits that could be searched.

-------------------------------------
author: Brenden Conley
date: 2016-06-28 22:17:14.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-06-29 17:01:37.000000000

Patch Set 1:

(1 comment)

Line:65, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/ViewBar.java -> Removed in PS 2: works indeed better on my Mac, but fails on GTK. Doesn't move the shell at all there. :-(

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