Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] Extending the generator([Xcore] Extending the generator)
[Xcore] Extending the generator [message #1690742] Mon, 30 March 2015 23:55 Go to next message
Erick Hagstrom is currently offline Erick HagstromFriend
Messages: 108
Registered: April 2014
Location: USA
Senior Member
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] Tue, 31 March 2015 03:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30442
Registered: July 2009
Senior Member
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 12:54 Go to previous message
Erick Hagstrom is currently offline Erick HagstromFriend
Messages: 108
Registered: April 2014
Location: USA
Senior Member
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: Mon Sep 16 12:38:40 GMT 2019

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

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

Back to the top