TreeViewer with SWT.VIRTUAL and a ILazyTreeContentProvider weird behaviour [message #522920] |
Wed, 24 March 2010 14:22 |
|
Good day,
I'm having some problems with how the TreeViewer reacts when you set it to a lazy loading.
I'm single sourcing between RCP and RAP and my expectation is mostly based on how it reacts in the RCP environment.
In the RCP environment the TreeViewer loads an x amount of treeItems that fill the (Roughly 40 items) Visible part of the viewer and a bit more so that we have a scroll bar. If we scroll down it will fetch some more tree items till the updateChildCount does not change the currentChildCount.
Now the same code in RAP does the flowing the TreeViewer loads only 2 treeItems and shows a little tree line to an empty space I don't have a scroll bar. Or something like that.
If I click on the a tree item (In my test the first treeitem). It loads 3 more TreeItems and shows them in the Tree Viewer.
If you change your focus (to 2nd TreeItem in my test) again it will load another 3 treeItems. (making it 8 tree items available). Now alternating between the 1st and second tree Item does not make it load any thing any more.
How ever every time I click on a TreeItem that I haven't clicked on it will load set of TreeItems (3 every time) and keeps on doing that even if the visible aria is filled and your not using the scroll bar.
Now I am wondering am I doing something wrong? Or did I stumble upon a little bug in the LazyLoading of the TreeViewer?
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
|
Re: TreeViewer with SWT.VIRTUAL and a ILazyTreeContentProvider weird behaviour [message #523142 is a reply to message #523115] |
Thu, 25 March 2010 10:01 |
|
Hi Martijn,
if your code works in RCP and does not in RAP, then please open a bug
and add a code snippet to reproduce. You could also describe your
workaround there.
We know that the Tree has some limitations in this regard that cannot be
fixed with the current implementation. However, we have plans for a new
Tree...
Best regards, Ralf
Martijn Cremer wrote:
> I ended up fixing it by giving a count rows of the query as the size. So
> now the content provider knows the size of the root. Altouch this wasnt
> the way I wanted it it solves the problem with the weard loding of content.
|
|
|
Re: TreeViewer with SWT.VIRTUAL and a ILazyTreeContentProvider weird behaviour [message #523150 is a reply to message #523142] |
Thu, 25 March 2010 10:40 |
|
Hi Ralf,
I will open a bug later today (have to create some codesniplets that show the problem correctly). The workaround is qute easy the first time I call the LazyContent provider I say its 10 (al touch I don't know its 10 big) but it will then load as expected.
Ralf Sternberg wrote on Thu, 25 March 2010 11:01 | Hi Martijn,
if your code works in RCP and does not in RAP, then please open a bug
and add a code snippet to reproduce. You could also describe your
workaround there.
We know that the Tree has some limitations in this regard that cannot be
fixed with the current implementation. However, we have plans for a new
Tree...
Best regards, Ralf
|
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
Powered by
FUDForum. Page generated in 0.03288 seconds