Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: hatem_elshenawy on September 14, 2006, 04:13:31 am

Title: Add type to class attribute
Post by: hatem_elshenawy on September 14, 2006, 04:13:31 am
how i can add string type to the attribute for class? ,i have now seen bool,and other type ,how i can add the c# type for the list of the attributes types.
Title: Re: Add type to class attribute
Post by: «Midnight» on September 14, 2006, 04:39:15 am
Check the language you have set for the class. Open the properties dialog for the class (not the attribute) and look at the language drop-down on the right side of the dialog near the top.

You can set the default language for code generation from the main menu by choosing Tools / Options / Source Code Engineering.
Title: Re: Add type to class attribute
Post by: hatem_elshenawy on September 15, 2006, 11:38:59 pm
thanks alot , i have change the defuat language to c# and it fine now,  thanks again.
Title: Re: Add type to class attribute
Post by: jonniesavell on January 31, 2007, 06:41:31 pm
UML newbie here. I want String.

I wanted to use pure UML types (avoiding platform types), but my choice is then limited to UnlimitedNatural, Boolean, Integer and String. Is this true?

If I decide to use platform types for the Java language, then it looks like I am restricted to the primitives (which won't give me String since it's not primitive).

On the other hand, I was able to create the java.lang package in EA and then import the associated source code (which gave me ALL java types!), but that seemed to be too much. Is there a way to selectively add platform types to the project (without manually creating these types in the Class diagram)?

Thanks in advance to anyone who made it this far.

Sincerely,
jonnie savell
Title: Re: Add type to class attribute
Post by: Eve on January 31, 2007, 07:17:47 pm
Quote
I wanted to use pure UML types (avoiding platform types), but my choice is then limited to UnlimitedNatural, Boolean, Integer and String. Is this true?

Yes, those are the four types defined by UML.

Quote
If I decide to use platform types for the Java language, then it looks like I am restricted to the primitives (which won't give me String since it's not primitive).

On the other hand, I was able to create the java.lang package in EA and then import the associated source code (which gave me ALL java types!), but that seemed to be too much. Is there a way to selectively add platform types to the project (without manually creating these types in the Class diagram)?

The only solution to this currently in EA is to import all the types have you have done and then remove the ones that you don't need.
Title: Re: Add type to class attribute
Post by: jonniesavell on January 31, 2007, 08:43:28 pm
Simon,

I am grateful for a quick response. That is a very important part of a successful forum. Thank you.

Sincerely,
Jon Savell