Skip to main content



      Home
Home » Modeling » EMF » [Xcore] Extending the generator([Xcore] Extending the generator)
[Xcore] Extending the generator [message #1690742] Mon, 30 March 2015 19:55 Go to next message
Eclipse UserFriend
I'm trying to create an extension to the Xcore code generator. I naively expected that I could just do what is done in org.eclipse.emf.examples.generator.validator, but I eventually noticed that the validation code isn't generated for Xcore models, only for Ecore. So I'm confused.

It was my understanding that Xcore just reused all the EMF code generation machinery as-is, yet neither the validation example nor my generator extension seem to work for Xcore. Is my expectation wrong? Or is there something else going on? Is this supposed to work?
Re: [Xcore] Extending the generator [message #1690752 is a reply to message #1690742] Mon, 30 March 2015 23:40 Go to previous messageGo to next message
Eclipse UserFriend
Erick,

Yes, I would have expected that to work too, but it didn't. I've opened
https://bugs.eclipse.org/bugs/show_bug.cgi?id=463536 and committed the
fix. Note that if your extension is for generating additional Java
files in the model folder, you consider extending
org.eclipse.emf.ecore.xcore.generator.XcoreGenModelGeneratorAdapterFactory
with specialized adapters that delegate createInputStream,
createOutputStream, and shouldMerge the way you see them in that class.


On 31/03/2015 1:55 AM, Erick Hagstrom wrote:
> I'm trying to create an extension to the Xcore code generator. I
> naively expected that I could just do what is done in
> org.eclipse.emf.examples.generator.validator, but I eventually noticed
> that the validation code isn't generated for Xcore models, only for
> Ecore. So I'm confused.
>
> It was my understanding that Xcore just reused all the EMF code
> generation machinery as-is, yet neither the validation example nor my
> generator extension seem to work for Xcore. Is my expectation wrong?
> Or is there something else going on? Is this supposed to work?
Re: [Xcore] Extending the generator [message #1690812 is a reply to message #1690752] Tue, 31 March 2015 08:54 Go to previous message
Eclipse UserFriend
Thanks Ed! Smile
Previous Topic:Strange Spaces in UI
Next Topic:[CDO] Converting existing code to use CDO and the transaction API
Goto Forum:
  


Current Time: Sun Jul 27 09:17:24 EDT 2025

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

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

Back to the top