Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » monitoring the progress of loading resources
monitoring the progress of loading resources [message #507629] Thu, 14 January 2010 08:02 Go to next message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Hi,

I was wondering if there's a way to hook a progress monitor for loading resources. Currently I am working with a quite big model that's partitioned in several files. Loading a resource using
Resource resource = resourceSet.getResource(uri, true);
can take up to 40 seconds in my case.

The Javadoc of Resource.load(options) mentions the Eclipse progress monitor but I couldn't find an example where it's actually used.

Can someone provide a small sample or a hint how to do it?

Thanks in advance!

Rob
Re: monitoring the progress of loading resources [message #507711 is a reply to message #507629] Thu, 14 January 2010 12:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30641
Registered: July 2009
Senior Member
Robert,

XSDResourceImpl shows an example.


Robert Wloch wrote:
> Hi,
>
> I was wondering if there's a way to hook a progress monitor for
> loading resources. Currently I am working with a quite big model
> that's partitioned in several files. Loading a resource using Resource
> resource = resourceSet.getResource(uri, true); can take up to 40
> seconds in my case.
>
> The Javadoc of Resource.load(options) mentions the Eclipse progress
> monitor but I couldn't find an example where it's actually used.
>
> Can someone provide a small sample or a hint how to do it?
>
> Thanks in advance!
>
> Rob
Re: monitoring the progress of loading resources [message #507714 is a reply to message #507711] Thu, 14 January 2010 13:03 Go to previous messageGo to next message
Robert Wloch is currently offline Robert WlochFriend
Messages: 109
Registered: July 2009
Senior Member
Ed,

Quote:
XSDResourceImpl shows an example.


I've had a look at that class before my post. Since you point me to it again, I suppose the functionality has to be provided by a custom Resource implementation. I was hoping it's already there and I just needed the right options key. So, in my case I'll need to provide a custom GMFResource and a custom LazyLinkingResource then.

Regards
Rob
Re: monitoring the progress of loading resources [message #507724 is a reply to message #507714] Thu, 14 January 2010 13:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30641
Registered: July 2009
Senior Member
Robert,

You might be able to make due with a OPTION_RESOURCE_HANDLER if they're
derived from XMLResource. Given we have a ProgressMonitor API in EMF
itself, one could imagine making better use of that in the base framework...


Robert Wloch wrote:
> Ed,
>
> Quote:
>> XSDResourceImpl shows an example.
>
>
> I've had a look at that class before my post. Since you point me to it
> again, I suppose the functionality has to be provided by a custom
> Resource implementation. I was hoping it's already there and I just
> needed the right options key. So, in my case I'll need to provide a
> custom GMFResource and a custom LazyLinkingResource then.
>
> Regards
> Rob
Previous Topic:editor code usage
Next Topic:Re: [emf-dev] exposing Ecore models via web services
Goto Forum:
  


Current Time: Sat Nov 16 22:08:48 GMT 2019

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

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

Back to the top