Generate class diagram using EA [reverse engineering]

早过忘川 提交于 2019-12-04 05:48:56

问题


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?


回答1:


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

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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/21572159/generate-class-diagram-using-ea-reverse-engineering

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!