DESCRIPTION

Add file search to the Staging View toolbar

Bug: 407776
Change-Id: I6c31047587b53ae84efe64492206d74cac3893e4
Signed-off-by: Madisyn Francis xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2013-05-10 21:56:55.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2013-05-10 22:11:34.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/4507/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2013-05-11 00:04:06.000000000

Patch Set 1: I would prefer that you didn't submit this

(6 inline comments)

- the text in the empty filter box should be "type filter text" instead of "find" since it filters the staging view
- the filter field should be placed above the unstaged/staged changes panes to make clear it filters these two panes
- alternatively we could use FilteredTree
- did you test performance with a very large number of changed files ?

Line:17, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> s/EXEC_LOCK/lock/

Line:19, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> s/Ix/Index/ this is more readable

Line:38, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> this method is used only once hence I'd inline it

Line:39, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> style nit: no braces around single line blocks

Line:766, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> couldn't the thread class be inlined as an anonymous class ?

Line:7, /COMMIT_MSG -> this is filtering not search

-------------------------------------
author: Zara Gill
date: 2013-05-13 22:31:30.000000000

Patch Set 1:

I didn't use FilteredTree because I thought it would be better if typing text in a single text field resulted in both Unstaged and Staged files being filtered. 

But I  didn't want to put the filter field above the unstaged/staged changes panes because that pushed the unstaged pane down lower than the commit message pane, which didn't look as pleasing since then the left and right headers don't line up any more, nor do the top borders of the widgets.

I have tested this with several thousand files shown in the view, and performance is still acceptable.



-------------------------------------
author: Douglas Trujillo
date: 2013-06-06 09:38:17.000000000

Patch Set 1: (1 inline comment)

Couldn't the filter field be displayed at the right of the repository name just above the staged/unstaged pane, ideally right-aligned with these panes ?
I uploaded a mockup to https://bugs.eclipse.org/bugs/show_bug.cgi?id=407776.

I rebased this change onto your other proposal adding display options tree and packed tree and found that if filtering removes all files underneath a folder, the empty folder isn't filtered from the pane, but I think it should be filtered.

The unstaged and staged panes show the number of contained files, when filtering this should be enhanced to also show the number files matching the filter condition, e.g. if 3 out of 7 files are displayed due to a filter expression the number should be displayed as (3/7)

Line:1619, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> this is filtering not searching -> s/Find/Filter files/

-------------------------------------
author: Zara Gill
date: 2013-06-12 20:33:32.000000000

Patch Set 1: (6 inline comments)

Displaying the filter field as shown in the mockup is challenging, particularly right aligning it with Unstaged Changes and Staged Changes sections, and handling the case where the vertical sash is moved, the selected repository changes, etc.  I have made the change to show "Filter files" as the search message rather than "Find".  Maybe this makes it more obvious what the control's purpose is, even if it is in its current location?

I've fixed the unstaged/staged panes to show <shown files>/<total files> in the section text, as suggested.

When I revisit the other change, adding the display options, I'll be sure to make sure that it behaves correctly with respect to filtering.

Line:17, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> Done

Line:19, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> Done

Line:38, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> Done

Line:766, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java -> Inlined the class, although not as an anonymous class.

Line:1619, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties -> Done

Line:7, /COMMIT_MSG -> Done

-------------------------------------
author: Zara Gill
date: 2013-06-12 20:39:17.000000000

Patch Set 1: (1 inline comment)



Line:39, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewSearchThread.java -> Done

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