Book a Demo

Author Topic: why there's a space before the type of an attrib  (Read 3631 times)

doru

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
why there's a space before the type of an attrib
« on: May 22, 2009, 11:03:45 pm »
Hy, i just download the enterprise architect 7.5.844 to give it a try. Now my project it's writed in Actionscript 3 and I am pretty at the begining with UML.
Ok the program its great, but for now I have some really big  :o question (for me at least)
So I create a class I put an attribute in it some like number:Number or _image:BitmapData or ever and the I chose to generate the code for that class. Now the problem its why in the as file generated (as3) I get something like this number: Number or _image: Bitmapdata. There's a space after : character. Why? And what can I do do not get that space there :-/
the same space its in the class diagram view too

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: why there's a space before the type of an attr
« Reply #1 on: May 23, 2009, 03:14:47 am »
You can remove the space by modifying the language template.

select  Settings | Code Generation Templates

which will bring up the Code Template Editor. Select ActionScript as the language and then Attribute Declaration in the Templates.

Near the end of the Template you will see the following lines
Code: [Select]
%attName%
%if attType != "" and attType != "var"%
: %attType%

Just remove the space between the colon and %attType% and make sure that you save the template.

This does not affect the display in the class diagram view however, just the generated code.

Jim

doru

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: why there's a space before the type of an attr
« Reply #2 on: May 23, 2009, 10:12:38 pm »
thank you very much :)
It works, so for the diagram I just have to live with it.
thank you again for helping me