Book a Demo

Author Topic: Impossible To Hide Inner Classes & Enums ?  (Read 5860 times)

tamjk

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Impossible To Hide Inner Classes & Enums ?
« on: July 16, 2014, 12:57:20 am »
I've been trialing EA recently.

To me it's main benefits would have been

1. Reverse engineering of existing Java/Ada code to UML.

2.  Generation of skeletal code for new projects based on the project UML design.

While producing UML diagrams from existing code is no problem to EA, the resulting diagrams can far too visually complex to be useful due to EA's treating inner classes and enums on the same basis as parent classes.

The whole purpose of using a reverse engineering tool on an existing package is to get an overview of its workings.

Surely, Sparx has some means of hiding these clutter classes ?  :o


« Last Edit: July 16, 2014, 01:06:51 am by tamjk »

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #1 on: July 16, 2014, 01:19:52 am »
Hi,

EA generated diagrams are mostly
- a first shot
- to see if everything works fine

If you want to have a model which some kind of quality you need to devise your own diagrams. A good diagram has a story to tell the reader and it only visualizes things to understand this story.

I good diagram has to communicate something to the reader and isn't a cluster of elements which some links.

For example after reverse engineering of module code I usually get the following diagrams:
- Context
- Interface view
- Structure of module
- Details of classes, modules and interfaces
- Relationships
- ..

It depends what you want to achieve by modeling.

Helmut

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

tamjk

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #2 on: July 16, 2014, 01:38:13 am »
Thanks for responding, Helmut.

But you have not said how you produced the overview and sub-detail diagrams from your "full" UML  diagram using EA.
Or how EA can be configured to omit elements like enums and inner classes.
Or if it is possible at all.

If the project being converted to UML was one's own, one could simply remove elements one by one from the full UML diagram.

But with unknown projects we are using the conversion to UML as a means to understand the project -- so in these cases manually removing elements (which might not carry any 'enum' or 'inner' descriptor) might be undesirable.

I'd have thought that hiding elements on the UML diagram would not be too difficult a feature to implement.

And the desirability of such a feature to people recoding old projects written by someone else is fairly obvious, surely ?


Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #3 on: July 16, 2014, 03:41:10 am »
Hi,

quality diagrams which are based on a story are usually manually made. They have benefits against simply generating a diagram from the model the diagram view is based on.

With Tools, Options, Source Code Engineering, Language,.. you can customize how the reverse engineering works. As far as I remember does EA visualize all elements on the generated diagram. That's ok because EA don't know your requirements to quality diagrams.

Removing something from the diagram don't mean deleting elements or relationships from the repository. The model is unchanged.

Just see a diagram as a view to your model which is in your opinion worth showing.


If you have a rule to remove elements/connectors from diagrams or from the model then you may write a Script or an Addin to fulfill the task.

In your case it might be removing Inner Classes & Enums from Diagrams or from the model. That isn't a big task for someone who has some experiences in Scripting / Addin.

Helmut






 I don't know of any feature in EA to customize what is
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

tamjk

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #4 on: July 16, 2014, 07:24:50 am »
So EA allows users to customize their diagram visibility by means of user-defined scripts.
I did not know that.

But I suppose it's more than a matter of simply removing minor classes from the full class diagram.

It's more a matter of having them listed between the attributes and the methods within the class' element.
In this way someone overviewing the project can "drill down" into the class element and see that enums and nested classes are within this class.

Right-clicking on the EA diagram and selecting Properties > Features > Visible Class Members shows a list that does not include enums or nested classes.

It appears that EA has overlooked the usefulness of this feature to many software coders.


Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #5 on: July 16, 2014, 03:52:28 pm »
Hi,

if you want to make the best out of EA there are some technologies worth knowing. These are e.g.:
- Script / Addin to automate things
- Query / Search to get the most information out of the model
- Profile / MDG to make your own UML, types, diagrams, ..
- Composite Diagram (drill down)
- etc.

Never forget: The modelers are the most important actors in the modeling game. The modeler has the responsibility to make useful models and useful diagrams / views to understand the model. EA just gives you some tools to make it easier.

A powerful feature are Composite Diagrams. They allow you to drill down by double click into the details of your element (you call it drill down).

There are a lot of powerful techniques which make life with EA much easier. You just have to know them. With time and some interest you will master them.

In my opinion it's a myth to say: EA does the reverse engineering and we are done.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

tamjk

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #6 on: July 16, 2014, 08:17:59 pm »
Ok.
Thanks, Helmut.

I'll look into these features with more intent now. :)
Yet it is strange that EA has not made minor class hiding an option obtainable on the Properties tab options.

Of course, EA is far more than simply a UML<>Code tool.

tamjk

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Impossible To Hide Inner Classes & Enums ?
« Reply #7 on: July 22, 2014, 02:09:05 am »
I am surprised that no one from Sparx has commented on this thread.

I suppose the concerns of EA trialists are not taken seriously.  ;)