Using base Ecore types in .xcore file #82
-
|
Is there a way to do something like this: I can create EClasses like these in ecore gui editor(or in emfatic, though I suppose its not a part of emf project), but I cant find a way to make this work with xcore. What I want is to write some java codegen against classes/interfaces generated from these xcore definitions. I suppose I could m2m some dsl-ish xcore model to ecore and then generated java apis from that, but may be there is jsut a straighforward way of using those types directly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
|
Ahh, it works indeed, its exactly the missing nature that was stopping eclipse from generating proper types, even though editor almost works without that nature. I got confused by the fact that my attempt to invoke xcore codegen in maven also failed to resolve the same types so I thought it is more of a fundamental limitation. Oh well, I guess I have figure out now what else I have to set up to call that from maven programmatically without relying on full headless eclipse to do the job. Thank you! |
Beta Was this translation helpful? Give feedback.

Yes you can do that like this:
I attached a zip.
org.example.xcore.zip
Be sure to create an Xcore project so that it has the nature and build in the .project file.
Oh dear, I forgot that I need to migrate this off the wiki before it shuts down:
https://wiki.eclipse.org/Xcore