Skip to main content



      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 04:04 Go to next message
Eclipse UserFriend
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
Re: [MWE] EcoreGenerator @generated NOT [message #1230870 is a reply to message #1230864] Mon, 13 January 2014 04:19 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

i think you would have to come up with your own version of EcoreGenerator
Workflow Component that does NOT disable JMerge
Re: [MWE] EcoreGenerator @generated NOT [message #1230886 is a reply to message #1230870] Mon, 13 January 2014 05:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
good to know. Thank you for the fast answer.
Johannes
Re: [MWE] EcoreGenerator @generated NOT [message #1230920 is a reply to message #1230870] Mon, 13 January 2014 06:28 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 22:38:31 EDT 2025

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

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

Back to the top