Book a Demo

Author Topic: Add type to class attribute  (Read 5874 times)

hatem_elshenawy

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Add type to class attribute
« 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.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Add type to class attribute
« Reply #1 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.
No, you can't have it!

hatem_elshenawy

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Add type to class attribute
« Reply #2 on: September 15, 2006, 11:38:59 pm »
thanks alot , i have change the defuat language to c# and it fine now,  thanks again.

jonniesavell

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Add type to class attribute
« Reply #3 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

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Add type to class attribute
« Reply #4 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.

jonniesavell

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Add type to class attribute
« Reply #5 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