Book a Demo

Author Topic: Where is the Java String Type? I just see primitiv  (Read 3791 times)

Pimenta

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Where is the Java String Type? I just see primitiv
« on: August 28, 2008, 06:18:07 am »
Hi.

I'm a beginner with EA.
I'm, trying to do a very simple thing:
 * Putting a String type attribute in a class, in my class diagram.
However, the EA allows me just to use primitive Java types ( int, short, boolean, etc). Then, I tried to find an explanation about it, reading the help online, Sparxsystem pages, etc. But nothing...

I suspect I will have to set the JDK API to the EA.

What should I do to see other types, when creating an attribute, as String?

Any help will be very helpful.

Thanks.

Rodrigo Pimenta Carvalho.
==================

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Where is the Java String Type? I just see prim
« Reply #1 on: August 28, 2008, 12:16:53 pm »
Hi Rodrigo,

I think I understand what you want. If EA is only offering you Java data types, that means the default code language (that is, the language EA thinks you are designing for) is Java.

That's the default that is set for the 'seed' model that EA uses as a template for new models.

You need to change this to the language you will be working with. The way to do that for a specific model is to open the Tools | Options | Source Code Engineering dialog. You'll see the Default Language for Code Generation drop-down near the top middle.

You can also change this setting on a per-package and per-element basis. Use the Properties dialog for the package or element. The problem with doing it this way is that you'll need to change every one that you don't want to use the default.

Search my posts over the past month or so for directions on how to solve this problem on a more permanent basis. Use the keywords "EABase" and "seed" (without quotes) to find the correct posts.

HTH, David
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Where is the Java String Type? I just see prim
« Reply #2 on: August 28, 2008, 01:41:47 pm »
Yes, the datatypes dialog in EA is intended to be only the primitive types for any language.  Standard Java classes can be imported into your EA model either from a jar file or source files.

As mentioned by David, you could then use this model as your standard base model.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Where is the Java String Type? I just see prim
« Reply #3 on: August 28, 2008, 08:10:37 pm »
Simon makes a good point about importing the Java classes. This is also true in .Net.

Read up on the Import Binary Module function.

As with the earlier answer, there is considerable advice on this in the forum. I have not seen much lately so you'd have to search quite a way back. Use the function name as your keyword (look for the phrase, not just the words).

David
No, you can't have it!