Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[egit-dev] Re: http://egit.eclipse.org/r/#change,614

"Kinzler, Mathias" <mathias.kinzler@xxxxxxx> wrote on 27/04/2010 03:16:06 PM:
> I am now playing around with a DeferredTreeContentManager which
> works really as it should (a Pending… node is shown while the child
> list is updated when opening an item; eventually, when the child
> list is complete, the Pending… item is hidden again).

>  
> The trouble that I have is with restoring the expansion state after
> refresh.  It is quite simple with the current implementation (see
> RepositoriesView.scheduleRefresh(), but I can’t seem to make it work again.


I've not tried restoring selections before with a DTCM. To get it to work, I'd imagine you'd have to attach job change listeners to the DTCM to get notified of when the fetching is complete which sounds like a bit of work in my opinion. This is particularly problematic when you consider that the selection may be several levels deep. You'd have to force a fetch...and another fetch...and another fetch. Unfortunately, it doesn't look like the 'CVS Repositories' view restores selection so one can't try to use that code as a reference.

Personally, I'm not sure how often someone is actually going to perform a full refresh. It seems like you'd want to add/remove repositories but a full tree refresh doesn't sound like something someone is going to perform very often in my opinion. Preserving the selection is nice and all but is this actually something that's going to bother the user? In what scenarios do you envision someone will want to do a full refresh, and do you think this is a common action?

In any case, it still might be possible to preserve the selection. If you think it's an important feature to have, you could push what you have right now and maybe I can take a look at it or ask some other people.

> I have NOT changed the RepositoriesViewContentProvider to implement
> ILazyTreeContentProvider. The SWT.VIRTUAL flag does not seem to have
> any effect right now. I also tried quite some other stuff…


I've not used virtual trees before but I don't think there's anything to gain from virtual trees if you're going to use a DTCM. It seems more like an either/or decision to me. Virtual trees work in kind of the same way as a DTCM except you don't get any progress from the fetching (or well, you'll have to manage it yourself).

Regards,
Remy

----------
Remy Suen
Eclipse Platform/UI Committer
IBM Ottawa
613-356-5162


Back to the top