Recursive loading [message #1043107] |
Wed, 17 April 2013 05:39  |
Eclipse User |
|
|
|
Hello everyone.
I'm currently working directly with EMF api.
When I load my model from an ecore file, it does not support references to other metamodels which is weird because when you load a model through eclipse itself, it does. How do I manage to load a model and all the models that are referenced inside (and recursively).
Thank's for you time.
|
|
|
|
|
|
|
Re: Recursive loading [message #1043264 is a reply to message #1043242] |
Wed, 17 April 2013 09:37   |
Eclipse User |
|
|
|
Mathieu,
Comments below.
On 17/04/2013 3:09 PM, Mathieu MONTIN wrote:
> Sorry, I was not aware that I had to be an experimented user to post
> here.
No, but surely you can't expect that every single new inexperienced user
will get detailed information that's available in the FAQ and in
introductory material...
> Anyway, I did not register any factory because it was mentioned in the
> documentation that eclipse would use the default one if necessary,
> which should have worked considering that my file is a standard .ecore
> file.
Yes, if you run in an Eclipse environment, but you're running stand
alone aren't you?
> After writing my previous message, I kept looking and finally tried to
> register the obvious factory (XMIResourceFactoryImpl). Looks like my
> model is not null anymore (as you already knew) but I keep thinking
> that it does not make any sense according to the documentation. It's
> not like I was trying to load a pdf file as an EMF resource.
No, but it's not like you've looked at how the editor loads a resource
either...
>
> That being said, I'll keep doing my tests to see if it actually worked
> the way I wanted. i just can't figure out why the path has to be
> absolute. But maybe this also is a basic question.
You'll find I've explained that 100 times already in this newsgroup.
It's because relative cross document references can only be resolved
against an absolute URI to yet the absolute URI of the referenced
document...
> Thank you for your help anyway.
> PS : I never said that my initial code was using resourceSets so I
> don't get your first comment.
No, you didn't say much of anything so I had to guess at the common
mistakes, i.e., not using a resource set and not using an absolute URI.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05530 seconds