DESCRIPTION

[stagingView] If "Expand All" was selected, keep expanding new nodes

If a user always wants to see all the files, they can now click "Expand
All" and new nodes will also be expanded (as opposed to being collapsed
initially). As soon as the user collapses anything, this auto-expand
mode is disabled again.

Change-Id: I39b2eb19baf21a0df5bb6818dfa257c24cc6251f
Signed-off-by: Danika Greer xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-08-28 19:38:04.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2013-08-28 19:52:53.000000000

Patch Set 2: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/4838/ : UNSTABLE

-------------------------------------
author: Douglas Trujillo
date: 2013-09-09 21:52:40.000000000

Patch Set 2: Code-Review-1

(1 comment)

Line:11, /COMMIT_MSG -> what do you mean with "collapses anything" ? 

At the moment the only action which stops auto-expand is "collapse all" using the toolbar button. But if I collapse some tree nodes in the tree they get again auto-expanded when new entries enter the respective tree. 

I'd prefer if nodes I closed in e.g. the unstaged changes tree aren't reopened automatically when another file is modified or unstaged

-------------------------------------
author: Danika Greer
date: 2013-09-10 17:03:17.000000000

Patch Set 2:

(1 comment)

Line:11, /COMMIT_MSG -> More precisely, it should read "collapses a node in the tree or presses Collapse All".

The intent of this change is that it works as you describe, see addListenerToDisableAutoExpandOnCollapse. Maybe it's a platform-specific bug? The following works for me (tested just now):

* Use the jgit repo with the compact tree representation
* Change AddCommand so that it shows up in unstaged changes
* Press Expand All
* Change CanceledException > the "errors" node should be automatically expanded
* Collapse the "error" node
* Change BlameGenerator

Now the "blame" node should be there, but not be expanded. Also, change e.g. CheckoutConflictException, and errors should remain collapsed.

If that does not work for you, could you debug if disableAutoExpand is called when you collapse a node?

-------------------------------------
author: Douglas Trujillo
date: 2013-09-10 20:14:56.000000000

Patch Set 2:

(1 comment)

Line:11, /COMMIT_MSG -> ok, this works when files become dirty 

but it doesn't work when staging or unstaging files, the nodes being staged or unstaged always get expanded not regarding if I clicked collapse on the respective pane before or not.

* start from the final state of your example 
* stage the collapsed "blame" node -> it gets expanded when staging it
* now collapse the "blame" node in the staged changes pane 
* stage the collapsed "errors" node -> again this gets expanded on staging despite the fact that I clicked collapse in both panes before staging the "errors" node

-------------------------------------
author: Danika Greer
date: 2013-09-11 09:18:01.000000000

Patch Set 2:

(1 comment)

Line:11, /COMMIT_MSG -> I can't reproduce the last step. It results in a collapsed node "org.eclipse.jgit/src/org/eclipse/jgit" here. Could you please debug the last step with a breakpoint in expandPreviousExpandedAndPaths and see what getAutoExpandLevel returns and what causes the expanded state to be changed?

Also note, what happens in your second step depends on whether the staged table was set to auto-expand before or not. If you press "Expand All" in staged changes before doing it, it should be expanded. If you press "Collapse All", it should stay collapsed.

-------------------------------------
author: Danika Greer
date: 2013-09-17 11:25:29.000000000

Patch Set 2: Code-Review+1

I've been using "Compact Tree" presentation in the staging view for some time now. Experience has shown that the view is nearly unusable without this change (at least when switching between repos), as one always only sees the directory nodes, but not the really interesting file nodes, unless one is constantly presses on "Expand All".

So something like this change really needs to get into 3.1 IMO, we can always refine it later.

-------------------------------------
author: Douglas Trujillo
date: 2013-09-18 08:22:39.000000000

Patch Set 2:

(1 comment)

Line:11, /COMMIT_MSG -> it works properly when using drag&drop but when using the context menu for staging/unstaging always the folder being staged/unstaged gets expanded

the autoexpandLevel is always 0 in this last step

-------------------------------------
author: Danika Greer
date: 2013-09-18 12:11:31.000000000

Patch Set 2:

(1 comment)

Line:11, /COMMIT_MSG -> Ah, dnd vs context menu was the difference! Fixed in newest patch set by using the original selection (folder) instead of the files selection for stage/unstage via context menu.

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