Author Topic: C# code generation - starting scope  (Read 3512 times)

mkinnaird

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
C# code generation - starting scope
« on: July 05, 2005, 11:26:09 am »
I am currently evaluating EA for our company as a standard UML Modeling tool and source code generator.  Everything is looking postive for this product, but I had a question regarding the source code generation:

It appears when I generate the source code, it insists on putting the starting scope of the method, class, namespace (ie the open curly brace) on the same line with the class/method/namespace definition.  

Our coding standards encourage the curly brace to start on the next line (so the closing matches with the starting).

Any way I can tell the generator to put the curly brace on the NEXT line??

Thanks in advance!
Michael.
« Last Edit: July 05, 2005, 11:27:12 am by mkinnaird »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: C# code generation - starting scope
« Reply #1 on: July 05, 2005, 03:47:25 pm »
There is no option for this, but the generation is fully customisable.  You make it generate the braces on a new line by making the following changes in the code templates.

If you remove the line %PI=" "% from the namespace and class templates.  Then the line %PI=""% from the operation template.

These mean that the default PI (a newline) is used between lines of the template.

Simon