如何在 Eclipse 中从 Java 源代码创建流程图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4374159/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 16:39:22  来源:igfitidea点击:

How to Create Flowchart from java source code in Eclipse

javaeclipseeclipse-pluginsequence-diagram

提问by Sen

I would like to create the flowchart or sequence diagram from my java source code.
Is there any plug-in which can help me do that?

我想从我的 java 源代码创建流程图或序列图。
有没有插件可以帮助我做到这一点?

采纳答案by Abi

Is this post meant for flow chart? Do You mean Sequence Diagram or Class Diagram eUML is a good tool to create Class Diagram or Sequence Diagram You can find it at http://www.soyatec.com/main.php

这篇文章是针对流程图的吗?您是说序列图还是类图 eUML 是创建类图或序列图的好工具您可以在http://www.soyatec.com/main.php找到它

回答by Raffi Khatchadourian

I am not sure if there is a plugin for this but there are certainly techniques for doing this. If there is no plugin available, theoretically, one could follow the approach of such techniques to build one. One such technique that comes to mind is contained in the paper Object naming analysis for reverse-engineered sequence diagramsby Atanas Rountev and Beth Harkness Connell.

我不确定是否有一个插件,但肯定有这样做的技术。如果没有可用的插件,理论上,可以按照这种技术的方法来构建一个。Atanas Rountev 和 Beth Harkness Connell 所著的逆向工程序列图对象命名分析一文中包含了一种这样的技术。

Here's the abstract:

这是摘要:

UML sequence diagrams are commonly used to represent object interactions in software systems. This work considers the problem of extracting UML sequence diagrams from existing code for the purposes of software understanding and testing. A static analysis for such reverse engineering needs to map the interacting objects from the code to sequence diagram objects. We propose an interprocedural dataflow analysis algorithm that determines precisely which objects are the receivers of certain messages, and assigns the appropriate diagram objects to represent them. Our experiments indicate that the majority of message receivers can be determined exactly, resulting in highly-precise object naming for reverse-engineered sequence diagrams.

UML 序列图通常用于表示软件系统中的对象交互。这项工作考虑了为了软件理解和测试的目的,从现有代码中提取 UML 序列图的问题。这种逆向工程的静态分析需要将交互对象从代码映射到序列图对象。我们提出了一种过程间数据流分析算法,它精确地确定哪些对象是某些消息的接收者,并分配适当的图表对象来表示它们。我们的实验表明,可以准确地确定大多数消息接收者,从而为逆向工程序列图提供高度精确的对象命名。

回答by Plej

I found this Eclipse plugin Flowchart4j V 2.0.0et http://www.codeswat.com/You can use it for flowchartor sequence diagramand export it to MS Visio. It has only one disadvantage. You have to pay for it.

我找到了这个 Eclipse 插件Flowchart4j V 2.0.0et http://www.codeswat.com/您可以将它用于流程图序列图并将其导出到MS Visio。它只有一个缺点。你必须为此付出代价。

回答by Tim

ObjectAidis a free UML tool which can creates sequence diagrams. Another commercial tool to create sequence diagrams from existing code is Architexa. I use Architexa very often at my daily work.

ObjectAid是一个免费的 UML 工具,可以创建序列图。另一种从现有代码创建序列图的商业工具是Architexa。我在日常工作中经常使用 Architexa。

回答by Alan Spark

Our tool, Code Rocket for Eclipsecan produce both pseudocode and flowcharts from Java (and C/C++ code). The design views can be edited and any changes forward engineered into the code. It is not a free tool, but there is a free 30-day trial. Also it is only for Eclipse 32-bit.

我们的工具Code Rocket for Eclipse可以从 Java(和 C/C++ 代码)生成伪代码和流程图。设计视图可以编辑,任何更改都可以提前设计到代码中。它不是免费工具,但有 30 天的免费试用期。它也仅适用于 Eclipse 32 位。