Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Content provider with a long loading time
Content provider with a long loading time [message #381682] Wed, 08 October 2008 16:24 Go to next message
Andre Ribeiro is currently offline Andre RibeiroFriend
Messages: 58
Registered: July 2009
Member
Hi all,

I have a tree that uses a content provider to be populated.
The content provider is getting the data from a remote database (using
EclipseLink, over the network), and so is a bit long operation.
When this loading is happening my RCP is completely blocked.

Could anybody suggest me the correct way to do this operation?

I though of eclipse.jobs and monitors, is it an (/the most) appropriate
solution?

Cheers,
André
Re: Content provider with a long loading time [message #381684 is a reply to message #381682] Wed, 08 October 2008 16:48 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
Registered: July 2009
Senior Member
- DeferredContentProvider
- Fetch the Data into an Collection (outside to UI-Thread e.g. using
BusyCursor or IProgressService) and pass this list to the viewer
the content provider is then a simply ArrayContentProvider

Tom

André Ribeiro schrieb:
> Hi all,
>
> I have a tree that uses a content provider to be populated.
> The content provider is getting the data from a remote database (using
> EclipseLink, over the network), and so is a bit long operation.
> When this loading is happening my RCP is completely blocked.
>
> Could anybody suggest me the correct way to do this operation?
>
> I though of eclipse.jobs and monitors, is it an (/the most) appropriate
> solution?
>
> Cheers,
> André


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: Content provider with a long loading time [message #381686 is a reply to message #381684] Thu, 09 October 2008 11:48 Go to previous messageGo to next message
Mario Winterer is currently offline Mario WintererFriend
Messages: 136
Registered: July 2009
Senior Member
Does a DeferredContentProvider work for lazy trees too?
For trees that want to defer loading of child nodes,
DeferredTreeContentManager should be used I think.


Tom Schindl schrieb:
> - DeferredContentProvider
> - Fetch the Data into an Collection (outside to UI-Thread e.g. using
> BusyCursor or IProgressService) and pass this list to the viewer
> the content provider is then a simply ArrayContentProvider
>
> Tom
>
> André Ribeiro schrieb:
>> Hi all,
>>
>> I have a tree that uses a content provider to be populated.
>> The content provider is getting the data from a remote database (using
>> EclipseLink, over the network), and so is a bit long operation.
>> When this loading is happening my RCP is completely blocked.
>>
>> Could anybody suggest me the correct way to do this operation?
>>
>> I though of eclipse.jobs and monitors, is it an (/the most) appropriate
>> solution?
>>
>> Cheers,
>> André
>
>
Re: Content provider with a long loading time [message #381688 is a reply to message #381684] Thu, 09 October 2008 14:52 Go to previous message
Andre Ribeiro is currently offline Andre RibeiroFriend
Messages: 58
Registered: July 2009
Member
I'll try your tip

Thanks a lot Tom!

Tom Schindl wrote:
> - DeferredContentProvider
> - Fetch the Data into an Collection (outside to UI-Thread e.g. using
> BusyCursor or IProgressService) and pass this list to the viewer
> the content provider is then a simply ArrayContentProvider
>
> Tom
>
> André Ribeiro schrieb:
>
>> Hi all,
>>
>> I have a tree that uses a content provider to be populated.
>> The content provider is getting the data from a remote database (using
>> EclipseLink, over the network), and so is a bit long operation.
>> When this loading is happening my RCP is completely blocked.
>>
>> Could anybody suggest me the correct way to do this operation?
>>
>> I though of eclipse.jobs and monitors, is it an (/the most) appropriate
>> solution?
>>
>> Cheers,
>> André
>>
>
>
>
Previous Topic:foreign keys in composite primary keys
Next Topic:Fields of type java.io.InputStream
Goto Forum:
  


Current Time: Thu Dec 18 07:23:16 GMT 2014

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

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