Book a Demo

Author Topic: java String, Integer, Double etc  (Read 10264 times)

AlexPeake

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
java String, Integer, Double etc
« on: November 07, 2005, 02:06:27 pm »
Sorry for such a simple question. I cannot find the answer in Help.

How do a get attribute types of String, Integer, Double etc, to show up when I create attributes for a class? (Obviously I can type in the word String, but I do not get the full capabilities of a real type.)

I looked at Import Binary (a jar) but this deos not seem the right way to add something so widely used?

Thanks.

Alex

JulianH

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: java String, Integer, Double etc
« Reply #1 on: November 07, 2005, 02:17:52 pm »
Quote
Sorry for such a simple question. I cannot find the answer in Help.

How do a get attribute types of String, Integer, Double etc, to show up when I create attributes for a class? (Obviously I can type in the word String, but I do not get the full capabilities of a real type.)

I looked at Import Binary (a jar) but this deos not seem the right way to add something so widely used?

Thanks.

Alex



Hi.

If yu want to assign data types to attributes, (I think) you have to set the language (C#, Java,...) for the class _before_ you can use data types.

But after you "assigned" a programming language to a specific class, you will be able to set the data type for each attribute via the "type" dropdown-menu (in the attribute form).

Julian

EDIT:
More easily:

Draw a class, double-click, select the language in the language dropdown menu.
then go on to detail - attributes. You will notice, that you can choose from more data types now :)
« Last Edit: November 07, 2005, 02:19:30 pm by JulianH »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: java String, Integer, Double etc
« Reply #2 on: November 07, 2005, 03:45:49 pm »
Julian, the datatypes that will show up there are the built in datatypes.  Not the standard library types.

EA requires that these types are imported in order to use them.  This gives the benefit that correct import statements can be generated when these classes are used.

Without this requirement EA developers would need to keep track of all different library versions for all languages that are supported and provide a mechanism for selecting which library version is to be used.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: java String, Integer, Double etc
« Reply #3 on: November 07, 2005, 04:27:55 pm »
Simonm

How and from where (i.e.; which *.jar file) would I import the Java standard library types and not get into a huge import process?

Verbal Use Cases aren't worth the paper they are written upon.

thomaskilian

  • Guest
Re: java String, Integer, Double etc
« Reply #4 on: November 07, 2005, 11:54:41 pm »
Jim,
I guess you either have to import everything in a separate repository and ex/-import via XML. Or you create what you need manually.

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: java String, Integer, Double etc
« Reply #5 on: November 08, 2005, 04:52:46 am »
I'm impressed...NOT !  ::)
Verbal Use Cases aren't worth the paper they are written upon.

lhale

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: java String, Integer, Double etc
« Reply #6 on: December 21, 2005, 05:45:44 pm »
So, are all you EA gurus telling us that even when we've selected JAVA as the package language, and see that JAAV is chosen in the class properties, we're not going to see any JAVA types in the operation parameters and the properties types until we do some kind of undocumented magical import operation or create our own Java types from scratch.

I am evaluating the DEMO version 6.0. If I can't see any Java types because I'm running the Demo version, please tell me NOW.

If you have to define your (possibly) hundreds of Java types yourself, then this EA product is crap (let's hope it's the learning curve thing, and the answer is lost in one sentence of the whole documentation tree or an EA forum somewheres).

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: java String, Integer, Double etc
« Reply #7 on: December 21, 2005, 07:03:18 pm »
Ihale;
The Java primative data types are already defined in EA.  All you need to do is tell EA to use them.

What we are talking about are all the predefined Classes available in the Java API, like the Math classes, Collections classes, etc.  Unfortunnately, Java has dumped all their classes in to a few huge jar files.  With just a few mouse clicks, you can import them all if you want, but it takes time (1-2 hours on my machine) and you get much more than you want for your project;  at least from my perspective you do.

I understand EA's point about the need for us to point EA at the specific jar files to be included, but we desire the ability to filter out the specific packages & classes we don't want in our current project.

hope that helps.
Verbal Use Cases aren't worth the paper they are written upon.

lhale

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: java String, Integer, Double etc
« Reply #8 on: December 21, 2005, 08:00:24 pm »
Well, I already can see the primitive Java types. I like you would like to import the Java API types as well. Question is ....

   How did you accomplish this feat of import magic ???

   I'm not assuming that I have any of this magic available on the demo version (it's best to keep expectations low on eval software). Thanks.

-- Larry Hale

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: java String, Integer, Double etc
« Reply #9 on: December 21, 2005, 09:14:09 pm »
Project | Source Code Engineering | Import Source Directory

or

Project | Source Code Engineering | Import Binary Module

depending on if you have the appropriate source or just the relevant jar files.

None of EAs magic is limited in the demo version.

lhale

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: java String, Integer, Double etc
« Reply #10 on: December 22, 2005, 06:55:17 am »
Yup, Project->Source Code Engineering->Import Binary Module is the magic - thanks very much, guys.

Funny, I searched for "import" in my doc search and came up empty - there's no reference to importing libraries. I actually looked in the Project and Tools and Settings folders, but nothing at the time looked at all promising. I can see this is going to be a slow uphill learning slope.

EA needs a voice interface - I can talk to it and it can argue back. Next case in point is how to manipulate/cajole/force EA into concocting an abstract class tht I could write up on the whiteboard in thirty seconds ( there's no abstract class selection [created my own abstract guillemet] , and italicized method descriptions in a class diagram can be missed). Oh well...

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: java String, Integer, Double etc
« Reply #11 on: December 22, 2005, 08:02:36 am »
Quote
Next case in point is how to manipulate/cajole/force EA into concocting an abstract class tht I could write up on the whiteboard in thirty seconds ( there's no abstract class selection [created my own abstract guillemet] , and italicized method descriptions in a class diagram can be missed). Oh well...

Have you found the Abstract check box on the general tab of the properties window for the class.  Try right clicking on the class.  3 clicks = 3 seconds. ;D
Verbal Use Cases aren't worth the paper they are written upon.

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: java String, Integer, Double etc
« Reply #12 on: May 19, 2006, 02:32:42 pm »
Hi,

Quote
Yup, Project->Source Code Engineering->Import Binary Module is the magic - thanks very much, guys.


I'd like to play a bit with the Java Code generation capabilities, but as a complete Java novice, I'm unsure which .jar to import.

So, can some kind soul point out the .jar file I need to import in order to have Integer, String (e.g. non-primitive types) available to me in EA?

I've looked in my \jdk and \jre lib directories (running 1.4.2), and nothing in there seems appropriate (e.g. jce.jar, rt.jar).    I've looked on "http://java.sun.com/j2se/1.4.2/docs/api/" and although I see that it is the 'java.lang' package that I need, I don't see what the name of the actual file is!! =8^)

TIA
gary

bmioch

  • EA User
  • **
  • Posts: 81
  • Karma: +0/-0
    • View Profile
Re: java String, Integer, Double etc
« Reply #13 on: May 22, 2006, 04:20:14 pm »
Just so you know Ihale (and anyone else who doesn't) the trial version of EA has full functionality within a time limit, so there's nothing missing. :)

Having said that, there is a watermark added to diagrams, that cannot be changed. This is not the case in the Registered version.
« Last Edit: May 22, 2006, 04:46:17 pm by bmioch »

Gary W.

  • EA User
  • **
  • Posts: 139
  • Karma: +0/-0
    • View Profile
Re: java String, Integer, Double etc
« Reply #14 on: May 23, 2006, 09:41:57 am »
Soooo, answering my own question below, in case other java newbies run into this, the file is rt.jar (i.e. "runtime" jar).  

Quote
Hi,

So, can some kind soul point out the .jar file I need to import in order to have Integer, String (e.g. non-primitive types) available to me in EA?



Boy, it's a huge file though, and it takes a while to import.  I assume people import it once, keep only the commonly used classes, and then export/import the XMI for future projects.

Cheers,
gary