Skip to main content



      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 07:21 Go to next message
Eclipse UserFriend
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 07:30 Go to previous messageGo to next message
Eclipse UserFriend
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 07:54 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 15:02:02 EDT 2025

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

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

Back to the top