DESCRIPTION

Allow to select repositories via double-click in RepositorySearchDialog

Double-click on a tree element is simpler compared to hitting the
checkbox of the import wizard. This change allows the user to deselect
or select nodes in the tree.


Bug: 511628
Change-Id: I66d7d08feea7406858d804909d42cc7bff0c47e8
Signed-off-by: Zaid Mosley xxx@xxx.xxx

COMMENTS

author: Zaid Mosley
date: 2017-02-03 13:46:34.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2017-02-03 13:46:40.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2017-02-03 14:09:26.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2017-02-03 21:05:50.000000000

Patch Set 2: Code-Review-1

(2 comments)

Double-click clears a multi-selection and reduces it to just the element on which the double-click occurred. This is confusing.

On GTK, if there are less repositories than lines in the viewer, the behavior on double click in the empty viewer area is very confusing. When the dialog initially opens, there is no selection in the viewer: a double-click in the empty area toggles the checkbox of the first element. Once there is a selection,double-clicking in the empty area toggles the most recently selected element, but lets the multi-selection stand. A double-click on an existing element reduces the selection to just that element and toggles only that element's checkbox.

On Mac, double-clicks in the empty area don't do anything.

Furthermore, double clicks do not update the "Finish" button state.

Finally, if such double-click behavior was desired and could be implemented to work better with multi-selections: shouldn't all this be done in the tree viewer implementation so that other instances of CheckboxTreeViewer could also benefit and the UI experience would remain uniform? I notice that CheckboxTreeViewer.handleDoubleSelect() has code that should already do this (for single selections, at least), but it doesn't appear to work.

Line:383, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> The double click reduces the selection to the element the double click occurred on. So this is always either empty (if that can occur at all, perhaps if there are less elements than rows in the viewer?) or exactly one element.

Therefore this code here doesn't make sense. It could just toggle the checked state on that single element.

Line:402, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Since this does not fire CheckStateChangedEvents the "Finish" button remains disabled.

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