Book a Demo

Author Topic: Sequence Diagrams from existing code (legacy)  (Read 2442 times)

Dave001

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Sequence Diagrams from existing code (legacy)
« on: March 20, 2009, 12:21:06 pm »
I am trying to use EA to reverse engineer java code into sequence diagrams.  The basic steps are within the manuals and Sparx's website, yet I can not successful use the "attach-to-process".  I have obtained a sequence diagram from a trivial "helloworld" program using the "Package Build Scripts", build and debug tabs.    

Below is the display when I just try using "program" radio button with one of the many files in the legacy code.  Btw, the legacy code was built from within "IntelliJ" with debug set. (doing debug from EA).

Once I have this working, the next thing is to attach to a running process.  

Note that I start EA from a Window console that has a basic plus specific run environment variables set.

Code: [Select]
Warning, no java.class.path property set, defaulting to environment variable if present      
 classpath used will be:-      
 -Djava.class.path=D:\Root\Source\BuiltDir\BuiltSubDir\WanSeg\class;D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class;D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class\vis.jar;D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class\jcchart400K.jar;D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class\jcchart400Kjb.jar;D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class;D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\ifl.jar;D:\Root\Source\Windows      
 classpath 0 = D:\Root\Source\BuiltDir\BuiltSubDir\WanSeg\class      
 classpath 1 = D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class      
 classpath 2 = D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class\vis.jar      
 classpath 3 = D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class\jcchart400K.jar      
 classpath 4 = D:\Root\Source\BuiltDir\BuiltSubDir\VisualSeg\class\jcchart400Kjb.jar      
 classpath 5 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class      
 classpath 6 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\ifl.jar      
 classpath 7 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\infobus.jar      
 classpath 8 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\xml4j_1_1_9.jar      
 classpath 9 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\activation.jar      
 classpath 10 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\js.jar      
 classpath 11 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\jh.jar      
 classpath 12 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\stdicons.jar      
 classpath 13 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\JimiProClasses.zip      
 classpath 14 = D:\Root\Source\BuiltDir\BuiltSubDir\GraphSeg\class      
 classpath 15 = D:\Root\Source\BuiltDir\BuiltSubDir\GraphSeg\class\graph.jar      
 classpath 16 = D:\Root\Source\BuiltDir\BuiltSubDir\WindowSeg\class      
 classpath 17 = D:\Root\Source\BuiltDir\BuiltSubDir\WindowSeg\class\win.jar      
 classpath 18 = D:\Root\Source\BuiltDir\BuiltSubDir\WindowSeg\class\symbols.jar      
 classpath 19 = D:\Root\Source\BuiltDir\BuiltSubDir\BaseSeg\class\comm.jar      
 classpath 20 = D:\Root\Source\BuiltDir\BuiltSubDir\CommsSeg\class      
 classpath 21 = D:\Root\Source\BuiltDir\BuiltSubDir\CommsSeg\class\comms.jar      
 classpath 22 = D:\Root\Source\BuiltDir\BuiltSubDir\CommsSeg\class\disa\comms\CommsStdIcons\CommsStdIcons.jar      
 classpath 23 = D:\Root\Source\BuiltDir\BuiltSubDir\ServerSeg\class      
 classpath 24 = D:\Root\Source\BuiltDir\BuiltSubDir\ServerSeg\class\server.jar      
 classpath 25 = D:\junit\junit3.8.1      
 classpath 26 = D:\junit\junit3.8.1\junit.jar      
 classpath 27 = D:\Root\Source\icsfAnt.jar      
 classpath 28 = D:\Temp\HmmmPlugin.jar      
 classpath 29 = D:\Root\Source\ThisProblemSrc\ProbSeg\src\Java      
 Loading Java Virtual Machine from path C:\j2sdk1.5.0_12\jre\bin\client\jvm.dll      
 Obtained Java Virtual Machine version 1.4      
 Default Directory is D:\Root\Source\ThisProblemSrc\ProbSeg\src\Java
 Unhandled exception stacktrace:      
 Frame:0  !00000000      
 Frame:1  !00000000      
 Frame:2  !00000000      
 Frame:3  !00000000      
 Frame:4  !00000000      
 Frame:5  !00000000      
 Frame:6  !00000000      
 Unhandled exception stacktrace:      
 Frame:0  !00000000      
 Frame:1  !00000000      
 Frame:2  !00000000      
 Frame:3  !00000000      
 Frame:4  !00000000      
 debug starts for package1.package2.probpackage.oneOfmanypacks.MainMethod            

Dave001

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Update on seq diag from existing code
« Reply #1 on: March 24, 2009, 12:00:38 pm »
If I did not mention, the programming lanuage used is Java.  I was able to get sort of a response when I attached after a little more tweaking.  

It looks like you have to pay careful attention on where you start your build, run, and debug scripts.  EA allows the user to establish Scripts for each package.  This influences the environment for the debug script.

The other part to this issue was setting the namespace root.  The namespaces are set by the user by selecting the check box for the packages that you are setting up.  When the packages are as namespace root the packages will have a red tag at the lower right bottom of the icon.

The source code will take breakpoints and will also allow setting automatic start and stop record breaks.  It will not however stop at the simple breakpoints when the program enters that code.   Also the sequence diagram when it records comes back with a single box.   Any ideas?

I am still looking for any help to clear what looks to be that last hurdle in getting a good sequence diagram.  As noted above I do get something.   :)