Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » [EMF] "@generated NOT" does not work
[EMF] "@generated NOT" does not work [message #654302] Tue, 15 February 2011 01:04 Go to next message
Hugo Melo is currently offline 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 #654305 is a reply to message #654302] Tue, 15 February 2011 01:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
Hugo,

Comments below.

Hugo Melo wrote:
> 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've never seen that happen before. I'm a bit doubtful because everyone
would notice such a problem all the time...
>
> 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 16:58 Go to previous message
Hugo Melo is currently offline 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
Previous Topic:CDO Repository Server Reconnect Failure
Next Topic:Different output model directories for interfaces, impls, etc?
Goto Forum:
  


Current Time: Thu Oct 23 11:14:14 GMT 2014

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

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