Book a Demo

Author Topic: Code generation settings  (Read 2424 times)

davemord

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Code generation settings
« on: November 08, 2008, 08:15:19 am »
Hello,

I'm trying to configure correctly EA to generate my code. There is only one thing that bother me and I'm not able to fix it. I can't find the place to set the indent size option in Enterprise Architect. In Visual Studio, i set the indent space to 2 (insert space instead of tab), but when I generate my code, it generates it with a tab of 4. How can I change it?

Thank you
Dave

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Code generation settings
« Reply #1 on: November 09, 2008, 12:09:16 am »
Hey Dave,

Perhaps the PI macro is what you need. It seems to be a general cure-all for whitespace woes.

There is an @indent attribute for the %list construct, but I don't know if it will help here. Nor do I think the analogous attribute for class declarations will work. But check them out; I think they are listed in EA help as Control Macros.

There's also a Function Macro [I think that's the title in EA help] for something similar, but once again I am not sure.

Please let us know if you find it.

David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code generation settings
« Reply #2 on: November 10, 2008, 08:23:34 am »
Most of the indenting in code templates is generated from the indent qualifier in the various list calls.  You'll currently see something like this.

%list="Class" @indent="\t" @separator="\n\n"%