DESCRIPTION

Always expand remote branch node in rebase selection dialog

This is a minor UX improvement that saves one click in rebaseing
dialog.

Also this change split up setRootsToShow() method into four
independent methods to reduce confusion on parameter order.

Change-Id: Id17001f256c6d0d095ce315274bcb27673573524
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2011-03-30 00:09:48.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2011-03-30 00:09:52.000000000

Patch Set 3:

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

-------------------------------------
author: Leslie Stephenson
date: 2011-03-30 00:10:12.000000000

Patch Set 3:

Updated commit message

-------------------------------------
author: Brenden Conley
date: 2011-03-30 00:19:47.000000000

Patch Set 3: Build Failed

Build Failed 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/243/ : FAILURE

-------------------------------------
author: Willow Cantrell
date: 2011-03-30 06:10:07.000000000

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

>> Additionally I've split setRootsToShow() methods into four additional methods that are more descriptive than four boolean parameters. IMHO this way it is more readable what we want to achieve and I just don't like methods that have more then two parameter in the same type.

I agree with your remarks about too many parameters. How about using the pattern found in SWT, where you use logical "OR" like

public final static int LOCAL_BRANCHES = 1<<1;
public final static int REMOTE_BRANCHES = 1<<2;

...

public AbstractBranchSelectionDialog(Shell shell, Repository repo, int nodesToShow) {
...
showLocal = nodesToShow & LOCAL_BRANCHEES != 0;
}

In the subclass, you'd do someething like

public RebaseTargetSelectionDialog(Shell shell, Repository repo){

super(shell, repo, LOCAL_BRANCHES | REMOTE_BRANCHES);

}

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