0
votes

Here is what I want to do:

  1. Generate class diagrams

  2. Import/open class diagrams in to a UML editor (e.g. ClassA with method Foo(), and ClassB)

  3. I can then create create new sequence diagrams manually by leveraging the data I imported from the class diagram (e.g. ClassB calls Foo() in ClassA)

How can I accomplish this?

1
Are you looking for "UML Round Trip Engineering"?S.Lott
What do you mean by "UML Round Trip Engineering"? Do you mean generating the diagrams back in to code? No that is not what I need. Just one way conversion: Java Code -> editable Class Diagram -> create new sequence diagram using Class Diagram data (without retyping the data in).TERACytE
@TERACytE: "diagrams back in to code? No that is not what I need". Please update the question to be very, very specific on what you need. Please update the question without writing lots of comments.S.Lott
Tools that support round-trip engineering are what you're after (you don't have to use the whole trip round, of course!) but I've never really found one that I thought was truly satisfactory on a realistic codebase. YMMV of course.Donal Fellows
And I think you removed a bit too much description; the background text is actually useful as a preamble.Donal Fellows

1 Answers

1
votes

Enterprise Architect by Sparx can generate sequence diagrams for you, but it means running the code inside the UML tool.

Just about every tool I know of can generate class diagrams for you, of varying fidelity, but sequence diagrams are another animal. You have to tell it where the flows start. I don't see how a tool will read your mind. Doubly so if there's a UI involved. You don't have every JSP in a web app represented as UML, do you? What if you're just using straight HTML pages and no JSPs?

Personally, I don't find sequence diagrams to be all that useful. They lose their value once they exceed a certain level of complexity, as do all diagrams.

UPDATE: If EA is too pricey for you, I'd recommend JUDE (now Astah). The community edition used to be quite good - it even did Java import and diagram generation. Now I see that it's been stripped of that capability. A professional license for Astah is still only $280.