1

I want to create a sequence diagram for some Java code, using Magicdraw. I have Magicdraw Enterprise version installed.

Is there a plug-in I can install, in Eclipse, which can generate a sequence diagram from the code?

LightCC
  • 9,804
  • 5
  • 52
  • 92
mehta
  • 735
  • 1
  • 11
  • 26

2 Answers2

3

Magicdraw Enterprise has this out of the box - there is no need for Eclipse.

I don't have the tool available at the moment, but I will try to explain from memory.

You need to create a Code Engineering Set for Java.

  1. Configure it using the tab named "Select from disk" (or something similar), and select your Java file from disk.
  2. It should detect the class and its content and create a Code Engineering Set.
  3. Unfold the Code Engineering Set, and your class underneath it. Nested under the class will be the different methods (here, I can't remember if it is in the right pane of the configuration menu or, after you close it, in the containment tree).
  4. Now, if you right click on the method, you should have an option to generate the method implementation as a sequence diagram.

I hope this approximate explanation helps. If you need something more step-by-step (for instance, I assumed you know what a Code Engeneering Set is), feel free to ask.

LightCC
  • 9,804
  • 5
  • 52
  • 92
Steph
  • 1,989
  • 14
  • 18
1

Did you try this yet? http://jdocs.nomagic.com/190/index.html?overview-summary.html (Class: ModelElementsManager --> CreateDiagram()

Magicdraw offers a java API. It is possible to create a sequence diagram programmatically. You might need to follow these instructions before developing: https://docs.nomagic.com/display/MD185/Development+in+Eclipse

I hope, I was able to help.