[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: On-the-fly EMOF-to-Ecore mapping

Ed,

I committed the corresponding bug (216750). You can find it at http://bugs.eclipse.org/bugs/show_bug.cgi?id=216750.

I didn't attach any .emof file (didn't know if it was appropriate), I could upload it or you could get them from UMLX sources.

Thank you very much for the feedback,
  Víctor Roldán.

Ed Merks escribió:
Víctor,

Comments below.

Víctor Roldán Betancort wrote:
Hi Ed,

the .emof files came from Ed Willink's UMLX project, having some QVT Core (i'm working on a Core implementation) transformation examples where input models conform to .emof metamodels.
That makes sense. He's the only person ever to have shown a direct interest in EMOF.

The problem is that the wizard for genmodel creating shows up an error when selecting the ".emof" file as source metamodel. For "rdbmsMM.emof" something like this is shown:

"The Ecore model file name for package 'rdbmsMM' must end in '.ecore'"
I see. That's not good. Please open a bugzilla. (I can reproduce this without a test case.)

So, if I decide to rename the file as ".ecore" extension, EMF won't interpret correctly the XMI file, trying to load an ".ecore" file
instead of an ".emof", and then, all serialization differences between
ecore and emof show up (for instance, upperbound as "*" in EMOF, "-1" in Ecore").


Maybe is just a matter of fixing the wizard.
I think so.

If you want, I can send you the .emof files.

Thanks!

Ed Merks escribió:
Víctor,

Comments below.

Víctor Roldán Betancort wrote:
Hi!

I've been experimenting a bit with .emof files.
I'm always curious if .emof files come from anything other than EMF. Where did your EMOF models come from?
I was surprised how these kind of files could be opened without any EMOF metamodel registered. Taking a look at the source code I realized that there was an on-the-fly mapping during XMI serialization.
Yes, the EMOF and Ecore models pretty near isomorphic.

I actually had some EMOF-based metamodels, but it was not possible to generate instances of that metamodel.
Where did they come from?
Creating the genmodel failed.
Did you validate the Ecore model that was produced? The generator typically does that for you, so I imagine it would be hard to overlook the warnings/errors. What exactly failed?
I think it's possible to be generated programmatically, but I'm aiming
to generate editors to create instances of my .emof based metamodel
That should be possible. I'd need to understand what isn't working.

My question is if it's really possible to generate the genmodel for an ..emof file, and in case there isn't, if there is any plan to give support to it.
It should definitely be possible, as long as the resulting Ecore model is well formed and complete. Validation should find all the problems. I'll need more details.

Regards, Víctor.