| [EMF] "@generated NOT" does not work [message #654302] |
Mon, 14 February 2011 20:04  |
Hugo Melo Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Hi everyone,
i have a ecore model and his genmodel. Any change to ecore model automatically updates the genmodel .The problem occurs when i try to re-generate the model code. The methods and attributes marked with "@generated NOT" or without the "@generated" are still overwritten. Is there some other configuration to do?
I'm using eclipse SDK 3.6.1 with EMF 2.6.1.
Hugo Melo
|
|
|
|
| Re: [EMF] "@generated NOT" does not work [message #654418 is a reply to message #654305] |
Tue, 15 February 2011 11:58  |
Hugo Melo Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Hi Ed,
I've created this topic because I didn't find the same behaviour anywhere. Fortunately, I found the cause and I'm sharing with you:
* This is just a example
Project name = "project"
Model name = "model"
Project source code = "project.src"
By default, the generated model code goes to "/project/src". This is defined in the property "Model -> Model Directory", on the genmodel file, as well as the edit code goes to "/project.edit/src".
But in my project, the model code should be generated in "project.src.modelcode" package and the edit code should be generated in "project.src.modelcode.provider". To accomplish this, I have appended the "Model Directory" and the "Edit Directory" properties of the genmodel to "/project/src/modelcode".
This way, the generated code goes to right place, but with some minor errors. And in this way, the "generated NOT" marked methods are still overwritten after each re-gereration action.
To solve the erros and problems, I've just edited the genmodel correctly. Instead change the model or edit directory, I've changed the root EPackage ("model") property, labelled as "Base Package", and setted his value to "modelcode".
I still dont know why the problem occurs, but I can correct and reproduce it.
Hugo Melo
|
|
|
Powered by
FUDForum. Page generated in 0.16193 seconds