Question

I am trying to generate class diagrams using reverse engineering option of EA. I am successfully able to import my code using option 'import source directory'.

How to generate class diagram from this imported files?

Was it helpful?

Solution

after the import the class diagrams are added to each package (I tested with Java):

enter image description here

It only contains the classes of the package. So if you want to create a more complex class diagram you will have to create a new diagram and then add the classes manually.

Andy

OTHER TIPS

You have done something wrong. Create a new project. Check Class Diagrams on model choosing. And after that import the source directory. The class diagram will appear automatically, step by step, before your eyes. But you'll have to do a heavy editing.

After 10 years working with EA I found the most important setting the "Set as Namespace Root" in the Project Browser. This way you can direct the import of classes and their namespaces into different packages e.g. for different libraries.

I ended up creating different root base packages (e.g. model, application, libraryX) and import the classes from their base folder into those packages.

Check the by namespace toggle instead of by folder toggle for Java. You can also select to create a diagram per package during import. The same process works very similar to import a database schema from a DB.

Once you have imported all relevant classes (and libs) you can arrange them on new diagrams as you require. Sequence/ Diagrams to show behavior, or class diagrams to describe related objects. I think the real power of EA lies in connecting design elements with code elements in the various model views.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top