Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Rinaldo on October 09, 2008, 02:07:13 am

Title: Removing elements when generating code
Post by: Rinaldo on October 09, 2008, 02:07:13 am
Hi.

I created a class on my EA project with one method and one attribute. Then I clicked the Generate Code option to create a file with my VB.NET code. All worked ok.

After that, I removed the attribute from my class on my EA project and generated the code again. The attribute was not removed from the generated code. I tried again, this time removing the method, bu the code keeps the method when is generated.

Is this by design? I think it should not be, since this way I can't trust this Generate Code option to create my classes. If I am right, this option only appends new elements to the code but does not remove old ones.

Can anyone confirms that behaviour?

Regards,
Rinaldo
Title: Re: Removing elements when generating code
Post by: «Midnight» on October 09, 2008, 05:50:44 am
Check your options regarding code synchronization. If tweaking these does not solve the problem then I suggest you submit a bug report to Sparx.
Title: Re: Removing elements when generating code
Post by: Takeshi K on October 09, 2008, 06:09:56 am
Hi Rinaldo,

If you enable the 'On forward synch, prompt to delete code features not in model' option, you can specify to delete the attributes.

--
t-kouno