Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: henrikbe on August 27, 2010, 06:25:30 pm
-
Hi,
say I have a class containing a (private) attribute "value". By checking the "Propery" checkbox, EA can automatically create functions getvalue() and setvalue(v).
Simplest questions first: Can I instruct EA to capitalize the attribute name in these functions? I prefer "getValue()" over "getvalue()"...
Another question: Can EA create similar function for associations? Say I have a class A with a (private) 1:1 association to a class B, can EA give me a function "getB()" in A?
Henrik
-
Henrik,
You can edit the code generation templates via Settings|Code Generation Templates
Geert
-
Tools | Options | Source Code Engineering | Capitalized Attribute Name for Properties.
If you want the same thing for associations you'll have to use a transformation.
-
Tools | Options | Source Code Engineering | Capitalized Attribute Name for Properties.
If you want the same thing for associations you'll have to use a transformation.
OK,
thank you for your reply. As a complete newbie, I don't even know what a transformation is. Is there anything like a tutorial on how to do this anywhere on the web?
Henrik
-
Have you thought of searching our help file?