On 01/07/2013 11:14 PM, Pedro Pinto wrote:
> I would like to know how can I get java code from .ecore metamodel (in
> this case from atl.ecore) like it's possible, for example, with UML.
This isn't a question that has a general answer. E.g., if I have an
Ecore model for Library or Person, and I have an instance of that, how
is that instance supposed to be mapped to Java? For UML specifically,
there is an importer that will map UML instances to Ecore instances and
from Ecore you can of course generate Java code.
>
> Thanks.

Am 02.07.2013 22:59, schrieb Pedro Pinto:
> What I'd like is to instantiate a ecore model in java. If you say that already exists for ATL.ecore where could I find
> it?
Perhaps you mean Java code like this:

I followed this tutorial -> http://eclipsesource.com/blogs/tutorials/emf-tutorial/ and for the ATL example "HelloWorld" it works fine and has everything I wanted/expected. The problem is when I'm doing the same but using this time ATL.ecore. I'm receiving this errors when I try to load the ecore model:

I can keep going besides this errors and the .genmodel file is generated, but the options for generating the java code are no longer available in this way.

You can ignore this error (and the ATL folks should fix it). Note the
Generator editor has tabs in the bottom, and this page showing these
errors in only one of the tabs. You can go back to the other tab to
access the GenModel.

On 16/07/2013 11:10 AM, Pedro Pinto wrote:
> I followed this tutorial ->
> http://eclipsesource.com/blogs/tutorials/emf-tutorial/ and for the
> ATL example "HelloWorld" it works fine and has everything I
> wanted/expected. The problem is when I'm doing the same but using this
> time ATL.ecore. I'm receiving this errors when I try to load the ecore
> model:
>
>
>
> I can keep going besides this errors and the .genmodel file is
> generated, but the options for generating the java code are no longer
> available in this way.

On 16/07/2013 1:46 PM, Pedro Pinto wrote:
> Thanks for your reply!
>
> I know that besides this errors the model can be generated, but the
> problem is the option for "Generate Model Code" are no longer
> available because of this errors.
Doesn't the second 1/2 of the sentence contradict the first 1/2?
>
> Here is a picture to exemplify what I'm saying:
Why does this picture show a model with that menu option enabled?

So the *.genmodel is created? But when you open the editor you see the
error you've shown? And you've located the tabs at the bottom of the
editor that I mentioned. And you can turn to the first tab? That
context menu has disabled menu options?

You are right! Since the error was appearing when I was opening with "EMF Generator", I assume that the file couldn't be open, so I was opening with " Sample Ecore Model Editor" and obviously the generation option wasn't there.
Now I follow what you said and just change the tab and I was able to generate the code.