简体   繁体   English

如何在Enterprise Architect中使用逆向工程为android应用程序构建序列图

[英]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. 我是EA新手,仍在学习这个工具,使用逆向工程生成序列图,但无法找到有关此主题的足够信息。 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. 我找到了使用逆向工程创建类图的方法,我们可以通过创建新模型并将源项目导入EA来完成。 steps are as mentioned below. 步骤如下所述。

  1. Create a new model 创建一个新模型
  2. create a new diagram 创建一个新图表
  3. Go to project tab in EA 转到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. 这会将所有java文件导入EA,并使用逆向工程生成类图。

Next i am looking to create sequence diagram using EA for android application but could not get any information. 接下来我期待使用EA为Android应用程序创建序列图,但无法获取任何信息。 Please guide me if anyone has done this already or any one want to share information on this. 如果有人已经这样做或任何人想要分享这方面的信息,请指导我。

Thanks in Advance. 提前致谢。

Generating Sequence Diagrams Enterprise Architect 11 and 12 生成序列图 Enterprise Architect 11和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'. 转到“Analyzer” - >“管理调试脚本”。

    2. Go to 'Analyzer' -> 'Debug' -> 'Debugger'. 转到'Analyzer' - >'Debug' - >'Debugger'。

    3. Go to 'Analyzer' -> 'Debug' -> 'Recorder'. 转到“分析器” - >“调试” - >“记录器”。

    4. Go to 'Analyzer' -> 'Breakpoints and Markers' 转到“分析器” - >“断点和标记”


  • SET UP DEBUG SCRIPT (Java) 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'. 在左侧窗格中,选择“debug” - >“Platform”。

    4. From the 'Debugger' drop-down menu, select 'Java'. 从“调试器”下拉菜单中,选择“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] 对于'Application Class',没有方括号,将[包名称与主类]放在一起。[主类名]

    7. For 'Java Virtual Machine Options' customize the following script. 对于“Java虚拟机选项”,自定义以下脚本。

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 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. JDK版本。
  • 'src' is the folder containing the java source code. 'src'是包含java源代码的文件夹。
  • 'bin' is the folder containing the class files. 'bin'是包含类文件的文件夹。
  • The 3rd party library jar files. 第三方库jar文件。

    1. Select the various radio buttons that suit your intentions, ie 'x64' and 'Run'. 选择适合您意图的各种单选按钮,即“x64”和“运行”。

    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. 从“录制设置”下拉菜单中,选择步骤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. DONE。 (feel free to ask further questions.) (随意提出进一步的问题。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM