Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TreeViewer with SWT.VIRTUAL and a ILazyTreeContentProvider weird behaviour
TreeViewer with SWT.VIRTUAL and a ILazyTreeContentProvider weird behaviour [message #522920] Wed, 24 March 2010 14:22 Go to next message
Martijn Cremer is currently offline Martijn CremerFriend
Messages: 77
Registered: January 2010
Location: Breda
Member

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 #523115 is a reply to message #522920] Thu, 25 March 2010 08:11 Go to previous messageGo to next message
Martijn Cremer is currently offline Martijn CremerFriend
Messages: 77
Registered: January 2010
Location: Breda
Member

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.

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 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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 Go to previous message
Martijn Cremer is currently offline Martijn CremerFriend
Messages: 77
Registered: January 2010
Location: Breda
Member

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.
Previous Topic:Progress on Tabbed Browsing?
Next Topic:Problem with TableViewer setAlignment on column
Goto Forum:
  


Current Time: Fri Oct 04 01:43:58 GMT 2024

Powered by FUDForum. Page generated in 0.03288 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top