Book a Demo

Author Topic: Java UML  (Read 3827 times)

dsargrad

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Java UML
« on: April 03, 2009, 12:33:52 am »
I am a new user of EA. I have successfully reverse engineered some of my java code into a model. I am creating sequence diagrams based on this model.


Currently objects that use or derive java/swing elements do not have the corresponding methods exposed within the model.


Is there a way to enhance the model with objects from the Java/Swing baseline itself?

Thanks in advance.

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: Java UML
« Reply #1 on: April 04, 2009, 04:06:32 am »
The easy way is to start with a model that contains the framework you are interested in.

You have several choices, Import the entire RT.jar. This is quite large and may contain more than you need.
Or you can also extract the class files from RT.jar (make sure directories are created).
Then use [Code Engineering][Import Source Directory]; set the Root Directory to the library branch you want and make sure to import ".class" files.
For the Java classes I've also found it best to select "Create Package per File" in the "Package Structure" buttons.
Also since you're interested in the interfaces, I'd also select [Do not import private members] to cut down on the model size.

Jim

dsargrad

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Java UML
« Reply #2 on: April 06, 2009, 11:29:14 pm »
Thank you.

I have created a new view within my model called JRE. I have imported rt.jar to this view. I tried to select the single package per file option (per your suggestion). However EA suggested that I stick with the default "Create Package Per Namespace" (so I did).

Why is it best (in your mind) to go with the single package per file option? I dont really understand the implications.

Thanks.
« Last Edit: April 06, 2009, 11:57:45 pm by dsargrad »

dsargrad

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Java UML
« Reply #3 on: April 07, 2009, 02:44:42 am »
I have a related question. Now that I have imported rt.jar (that took a loooong time) I can click on a class within my class diagrams and turn on "inherited operations". Unfortunately this shows all inherited operations. I want to be able to selectively hide some of these operations (similar to the available functionality at the class level). This is because I want to only show those operations that are pertinent to my design description.

How can I hide selective inherited operations/attributes?

Thanks in advance