Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Referenced objects not loaded(Referenced objects not loaded when loaded programmatically)
Referenced objects not loaded [message #1021599] Wed, 20 March 2013 11:21 Go to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi,

I am trying to load an ecore file and get the model objects into my application. I have reference to another ecore file at a relative location. When i load the ecore file, the referenced objects are not loaded, because of which i cannot get the details of them. I tried to resolve the proxy objects using EcoreUtil.resolve() method but did not work.

Is there any step which will allow me to load the referenced resource when the main resource is loaded? I am currently using ModelUtils.load() to load the ecore files.

thanks,
Pradeep V.B.
Re: Referenced objects not loaded [message #1021606 is a reply to message #1021599] Wed, 20 March 2013 11:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26235
Registered: July 2009
Senior Member
Pradeep,

Such problems are generally caused by not using an absolute URI to load
the resource. What URI did you use the load the initial Ecore file?

On 20/03/2013 12:21 PM, Pradeep Badiger wrote:
> Hi,
>
> I am trying to load an ecore file and get the model objects into my application. I have reference to another ecore file at a relative location. When i load the ecore file, the referenced objects are not loaded, because of which i cannot get the details of them. I tried to resolve the proxy objects using EcoreUtil.resolve() method but did not work.
>
> Is there any step which will allow me to load the referenced resource when the main resource is loaded? I am currently using ModelUtils.load() to load the ecore files.
>
> thanks,
> Pradeep V.B.
Re: Referenced objects not loaded [message #1021616 is a reply to message #1021606] Wed, 20 March 2013 11:54 Go to previous message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Ed,

I have used relative path to load the initial ecore file as shown below.

URI uri1 = URI.createFileURI("src/test/resources/UC1/Source.ecore");

Ok.. now i get it. I tried the absolute path now for the initial ecore file and i am able to see the referenced objects as well.

thanks for the hint Smile


thanks,
Pradeep V.B.
Previous Topic:Create a view on a 'merged' feature maps
Next Topic:Standalone vs editor model compatibility
Goto Forum:
  


Current Time: Thu Nov 27 21:19:35 GMT 2014

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

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