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

1

6

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.

Among answered 1/10, 2014 at 3:52 Comment(7)
What's the manual say?Emanative
You cannot generate sequence diagrams in EA by reverse engineering (static analysis). You can only generate sequence diagrams by executing your code and tracing the execution.Countervail
@Countervail is correct, EA cannot create sequence diagrams from source code. It can create them by recording an actual execution (attaching EA to the process like you would a debugger), but this will only give you a partial view, since it will only follow one branch of 'if' and 'switch' statements, etc.Motherwell
@Motherwell Can you please tell me the process of recording as actual execution (attaching EA to the process like you would a debugger). I was asking this only in my question. Thanks for correction my point, I will update my question accordingly.Among
@chimp, how can you generate sequence diagrams by execution?Riffraff
There is a whole chapter in the EA help file, under Execution Analyzer, called Recording Sequence Diagrams. You will need to work your way through this chapter. I'm sorry I can't be more helpful but it's something I've only done once, quite a long time ago.Countervail
Links to 2 tutorials about sequence diagrams using the "Execution Analyzer" are available in #26461019Countermarch
R
3

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.)

Rawlinson answered 8/11, 2015 at 1:20 Comment(1)
I will check this solution... Thanks for the replyAmong

© 2022 - 2024 — McMap. All rights reserved.