Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: moacsjr on July 13, 2005, 05:40:41 am

Title: Code Generation [COMMENTS]
Post by: moacsjr on July 13, 2005, 05:40:41 am
Hi,

I´m experiencing some problems when regenerating some classes. In the generated code there are new coments each time I try to regenerate the code.

It seams to be a forward generation problem.
Code: [Select]

public class Contato extends Pessoa {


/**

* INDICA SE É O CONTATO PRINCIPAL. PARA OPERAÇÕES ONDE O CONTATO NÃO FOR INFORMADO É UTILIZADO

* O CONTATO PRINCIPAL.

*/

/**

* INDICA SE É O CONTATO PRINCIPAL. PARA OPERAÇÕES ONDE O CONTATO NÃO FOR

* INFORMADO É UTILIZADO O CONTATO PRINCIPAL.

*/

private boolean principal;

/**

* LISTA DE AREAS DE INTERESSES DO CONTATO
*/

/**

* LISTA DE AREAS DE INTERESSES DO CONTATO

*/

private Collection areasInteresse;
Title: Re: Code Generation [COMMENTS]
Post by: Eve on July 13, 2005, 03:33:47 pm
Hi,

I'm not able to replicate your problem.  Could you let us know what version and build of EA you are using?

Simon
Title: Re: Code Generation [COMMENTS]
Post by: golyshkin on July 13, 2005, 07:59:14 pm
I observed this too. For fix it u should remove all generated files and try generate it again
Title: Re: Code Generation [COMMENTS]
Post by: moacsjr on July 14, 2005, 05:26:05 am
Quote
I observed this too. For fix it u should remove all generated files and try generate it again


yes, but if you couldn´t remove the files. If they has been filled with code and you are updating the classes. eg. add some new attributes.

Houston, I think we have a problem!

Moa.
Title: Re: Code Generation [COMMENTS]
Post by: moacsjr on July 14, 2005, 05:37:26 am
Quote
Hi,

I'm not able to replicate your problem.  Could you let us know what version and build of EA you are using?

Simon


Just create a new class in a diagram and add 2 attributes to it with comments for each attributes. Generate the java files and open it. Generate it again and look the generated files, you will see that you have duplicated comments.

Moa.
Title: Re: Code Generation [COMMENTS]
Post by: Eve on July 14, 2005, 03:30:22 pm
Quote
Just create a new class in a diagram and add 2 attributes to it with comments for each attributes. Generate the java files and open it. Generate it again and look the generated files, you will see that you have duplicated comments.

Sorry, I still can't replicate it.  What build of EA are you using?  If it's not the latest, are you able to update it?
Title: Re: Code Generation [COMMENTS]
Post by: moacsjr on July 15, 2005, 11:52:10 am
Quote
Sorry, I still can't replicate it.  What build of EA are you using?  If it's not the latest, are you able to update it?


I´m using EA 5.0 build 767