Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to construct sequence diagrams using reverse engineering in Enterprise Architect for android application

I am new to EA and still learning this tool to generate the sequence diagram using reverse engineering but could not find enough information on this topic. Please help me if anybody knows to create this.

I found out the way to create the class diagram using reverse engineering and that we can do by creating the new model and importing the source project into EA. steps are as mentioned below.

  1. Create a new model
  2. create a new diagram
  3. Go to project tab in EA
  4. Goto source code engineering option
  5. Import source directory

This will import all the java file into EA and will generate the class diagram using reverse engineering.

Next i am looking to create sequence diagram using EA for android application but could not get any information. Please guide me if anyone has done this already or any one want to share information on this.

Thanks in Advance.

like image 733
Devendra B. Singh Avatar asked Oct 01 '14 03:10

Devendra B. Singh


1 Answers

Generating Sequence Diagrams Enterprise Architect 11 and 12

This took me days and hours to get right, but now I use this program all the time.

  • SET UP ENVIRONMENT

    1. Go to 'Analyzer' -> 'Manage Debug Scripts'.

    2. Go to 'Analyzer' -> 'Debug' -> 'Debugger'.

    3. Go to 'Analyzer' -> 'Debug' -> 'Recorder'.

    4. Go to 'Analyzer' -> 'Breakpoints and Markers'


  • SET UP DEBUG SCRIPT (Java)

    1. In the 'Execution Analyzer' window, Add a new script.

    2. Right-click on the new script that was created in the last step, and choose 'edit'.

    3. In the left pane, Select 'debug' -> 'Platform'.

    4. From the 'Debugger' drop-down menu, select 'Java'.

    5. For 'Default Directory', without the square brackets, put your [project root path]

    6. For 'Application Class', without the square brackets, put [name of package with main class].[main class name]

    7. For 'Java Virtual Machine Options' customize the following script.

jre=C:\Program Files\Java\jdk1.8.0_66\jre\bin\server,-Djava.class.path=.;src;bin;lib\some_3rd_party_library01.jar;lib\some_3rd_party_library02.jar

script components that may be different for you:

  • The JDK version.
  • 'src' is the folder containing the java source code.
  • 'bin' is the folder containing the class files.
  • The 3rd party library jar files.

    1. Select the various radio buttons that suit your intentions, i.e. 'x64' and 'Run'.

    2. Click OK.

You may want to check this script at this point by running the debug. Right-click on the script icon and choose debug.


  • MARK-UP CLASS FOR ANALYSIS

    1. In the project browser, right-click on a class from which you want sequence diagrams to begin from.

    2. Choose 'Execution Analyzer' -> 'Markup Class for Recording'.

    3. Give this setup a name.

    4. Select the methods from which you want sequence diagrams to begin.

    5. From the 'Marker Type' drop down box, select 'Record Function'.

    6. Choose the class depth of the sequence diagram.

    7. Click OK.


  • BEGIN RUN-TIME ANALYSIS

    1. On the 'Record & Analyze' window, click on the play symbol.

    2. From the 'Recording Set' drop down menu, choose the name of the configuration saved in step 9.

    3. press OK.


  • GENERATE SEQUENCE DIAGRAM

During debug execution, at least one method/class trace should have appeard in the 'Record & Analyze' window.

  1. Right-click on a 'Record and Analyze' entry and choose 'Generate Sequence Diagram'

DONE. (feel free to ask further questions.)

like image 181
JohnG79 Avatar answered Oct 18 '22 21:10

JohnG79