Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [MWE] EcoreGenerator @generated NOT(EcoreGenerator does not respect @generated NOT)
[MWE] EcoreGenerator @generated NOT [message #1230864] Mon, 13 January 2014 09:04 Go to next message
Johannes Faltermeier is currently offline Johannes FaltermeierFriend
Messages: 97
Registered: December 2013
Member

Hi,

I hava a project with many Ecore-models. In order to (re)generate the code for all Ecore models with one click I defined a workflow like this:

Workflow {
	
	bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
		scanClassPath = true
		platformUri = "../.."
		registerGenModelFile = "platform:/resource/foo/bar.genmodel"
	}
	
	// Models
	component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
		genModel = "platform:/resource/foo2/bar2.genmodel"
		srcPath = "platform:/resource/foo2/src"
		generateEdit = true
	}
	
        // more models...
	component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
	...


The code generation works fine. However I noticed that the generator does not take @generated NOT annotations into account. I have heard of the generation gap pattern but I would like to avoid it.
So my question is, if it is somehow possible to tell the EcoreGenerator (with annotations in the generated code) that previously generated code was modified and should not be overwritten.


Thanks,
Johannes


Johannes Faltermeier

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [MWE] EcoreGenerator @generated NOT [message #1230870 is a reply to message #1230864] Mon, 13 January 2014 09:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13488
Registered: July 2009
Senior Member
Hi,

i think you would have to come up with your own version of EcoreGenerator
Workflow Component that does NOT disable JMerge


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [MWE] EcoreGenerator @generated NOT [message #1230886 is a reply to message #1230870] Mon, 13 January 2014 10:06 Go to previous messageGo to next message
Johannes Faltermeier is currently offline Johannes FaltermeierFriend
Messages: 97
Registered: December 2013
Member

Hi,
good to know. Thank you for the fast answer.
Johannes


Johannes Faltermeier

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [MWE] EcoreGenerator @generated NOT [message #1230920 is a reply to message #1230870] Mon, 13 January 2014 11:28 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6765
Registered: July 2009
Senior Member
Hi

You might find

org.eclipse.ocl.examples.build.utilities.GenerateModel
org.eclipse.ocl.examples.build.utilities.GenmodelReloader

helpful. They were developed before
org.eclipse.emf.mwe2.ecore.EcoreGenerator was available.

I suggest adjusting EcoreGenerator to add some more options and then
contribute it back.

Regards

Ed Willink

On 13/01/2014 09:19, Christian Dietrich wrote:
> Hi,
>
> i think you would have to come up with your own version of EcoreGenerator
> Workflow Component that does NOT disable JMerge
Previous Topic:Force reparsing of an Xtext resource possible?
Next Topic:reducing cross reference to current DSL file
Goto Forum:
  


Current Time: Tue Jul 07 07:44:37 GMT 2020

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

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

Back to the top