Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » modifying ecore and codegen behaviour
modifying ecore and codegen behaviour [message #545339] Wed, 07 July 2010 13:29 Go to next message
stefan  is currently offline stefan Friend
Messages: 9
Registered: July 2010
Junior Member
Hi all

I try to - in my view - slightly modify the code generation of the plain vanilla EMF ecore / codegen products. But I do not seem to get anywhere. there is always something either not working as expected, or - more frequently - not working at all.

I aim to:
- create a gen model that offers many fewer editable options (I don't want my developers to be able to make mistakes here) with our desired code-gen setup hardcoded
- change code generation to generate the model implementation into a bundle separate from the interface
- add to all model parts (EClass, EPackage, etc) a first class 'documentation' attribute that is meant to contain all documentation.

I have tried many approaches but seem to drift towards duplicating / subclassing most every part of the framework (i.e. the gen model, the org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGen eratorAdapterFactory, etc)

My question: am I missing something here, or am I on the right track to obtain the effects I want?

thanks in advance for any feedback

/stefan
Re: modifying ecore and codegen behaviour [message #545357 is a reply to message #545339] Wed, 07 July 2010 13:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26281
Registered: July 2009
Senior Member
Stefan,

Comments below.

stefan wrote:
> Hi all
>
> I try to - in my view - slightly modify the code generation of the
> plain vanilla EMF ecore / codegen products. But I do not seem to get
> anywhere. there is always something either not working as expected, or
> - more frequently - not working at all.
>
> I aim to:
> - create a gen model that offers many fewer editable options (I don't
> want my developers to be able to make mistakes here) with our desired
> code-gen setup hardcoded
You don't need a new GenModel, just your own editor with your own views,
right?
> - change code generation to generate the model implementation into a
> bundle separate from the interface
You'll have problems with XyzPackage/XyzFactory eINSTANCE needing to
refer to the implementation.
> - add to all model parts (EClass, EPackage, etc) a first class
> 'documentation' attribute that is meant to contain all documentation.
There is already support for a documentation annotation; see
EcoreUtil.getDocumentation.
>
> I have tried many approaches but seem to drift towards duplicating /
> subclassing most every part of the framework (i.e. the gen model, the
> org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGen
> eratorAdapterFactory, etc)
> My question: am I missing something here, or am I on the right track
> to obtain the effects I want?
It's best to ask about EMF things on the EMF newsgroup.
>
> thanks in advance for any feedback
>
> /stefan
Re: modifying ecore and codegen behaviour [message #545386 is a reply to message #545357] Wed, 07 July 2010 15:21 Go to previous messageGo to next message
stefan  is currently offline stefan Friend
Messages: 9
Registered: July 2010
Junior Member
Ed

thanks for the very speedy reply.

I will move my post / inquiry to the newsgroup area as soon as I get access to (the url is currently blocked for me: internal security).

/stefan
Re: modifying ecore and codegen behaviour [message #619734 is a reply to message #545339] Wed, 07 July 2010 13:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26281
Registered: July 2009
Senior Member
Stefan,

Comments below.

stefan wrote:
> Hi all
>
> I try to - in my view - slightly modify the code generation of the
> plain vanilla EMF ecore / codegen products. But I do not seem to get
> anywhere. there is always something either not working as expected, or
> - more frequently - not working at all.
>
> I aim to:
> - create a gen model that offers many fewer editable options (I don't
> want my developers to be able to make mistakes here) with our desired
> code-gen setup hardcoded
You don't need a new GenModel, just your own editor with your own views,
right?
> - change code generation to generate the model implementation into a
> bundle separate from the interface
You'll have problems with XyzPackage/XyzFactory eINSTANCE needing to
refer to the implementation.
> - add to all model parts (EClass, EPackage, etc) a first class
> 'documentation' attribute that is meant to contain all documentation.
There is already support for a documentation annotation; see
EcoreUtil.getDocumentation.
>
> I have tried many approaches but seem to drift towards duplicating /
> subclassing most every part of the framework (i.e. the gen model, the
> org.eclipse.emf.codegen.ecore.genmodel.generator.GenModelGen
> eratorAdapterFactory, etc)
> My question: am I missing something here, or am I on the right track
> to obtain the effects I want?
It's best to ask about EMF things on the EMF newsgroup.
>
> thanks in advance for any feedback
>
> /stefan
Re: modifying ecore and codegen behaviour [message #619735 is a reply to message #545357] Wed, 07 July 2010 15:21 Go to previous message
stefan  is currently offline stefan Friend
Messages: 9
Registered: July 2010
Junior Member
Ed

thanks for the very speedy reply.

I will move my post / inquiry to the newsgroup area as soon as I get access to (the url is currently blocked for me: internal security).

/stefan
Previous Topic:modifying ecore and codegen behaviour
Next Topic:BPMN2
Goto Forum:
  


Current Time: Thu Dec 18 21:15:11 GMT 2014

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

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