Eclipse 插件或开源工具,用于对序列图的 Java 代码进行逆向工程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2972706/
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-13 15:04:05  来源:igfitidea点击:

Eclipse plugin or a Open source tool to reverse engineer java code for sequence diagram

javaeclipseumlreverse-engineeringsequence-diagram

提问by Abhishek

I am looking out for a eclipse plugin or an open source tool to reverse engineer the sequence diagrams. I tried using Alto UML, but it just gives out sequence diagram of the class chose. I would like to have a sequence diagram of the whole call stack with methods, input arguments and output arugments as well.

我正在寻找一个 Eclipse 插件或一个开源工具来对序列图进行逆向工程。我尝试使用 Alto UML,但它只是给出了所选类的序列图。我想要一个包含方法、输入参数和输出参数的整个调用堆栈的序列图。

Could you please let me know some pointers on this? Thanks!

你能告诉我一些关于这个的提示吗?谢谢!

采纳答案by Jordi Cabot

Take a look at the MoDisco open source eclipse project MoDisco

看看MoDisco开源eclipse项目MoDisco

回答by Romain Hippeau

Look at this Wikipedia articlecomparing reverse engineering tools.

看看这篇比较逆向工程工具的维基百科文章

回答by Raffi Khatchadourian

(repeat from How to Create Flowchart from java source code in Eclipsefor completeness):

(为了完整起见,请如何从 Eclipse 中的 java 源代码创建流程图重复):

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

(repeat from How to Create Flowchart from java source code in Eclipsefor completeness):

(为了完整起见,请如何从 Eclipse 中的 java 源代码创建流程图重复):

I found this Eclipse plugin Flowchart4j V 2.0.0et

我找到了这个 Eclipse 插件Flowchart4j V 2.0.0et

http://www.codeswat.com/

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.

您可以将其用于流程图序列图并将其导出到MS Visio。它只有一个缺点。你必须为此付出代价。

回答by Vineet

Architexadoes have sequence diagrams for the whole call stack with methods. What you will find is that unlike typical UML tools Architexa is much more code-centric and therefore would work much better for reverse engineering.

Architexa确实有带有方法的整个调用堆栈的序列图。您会发现,与典型的 UML 工具不同,Architexa 更加以代码为中心,因此更适合逆向工程。

-Vineet (Architexa founder)

-Vineet(Architexa 创始人)

回答by Sean

Diver: Dynamic Interactive Views For Reverse Engineeringcan solve part of your problem. It provides both static and dynamic sequence diagrams for Java applications. It does not store the inputs and outputs though.

Diver: Dynamic Interactive Views For Reverse Engineering可以解决您的部分问题。它为 Java 应用程序提供静态和动态序列图。虽然它不存储输入和输出。

It is a plugin for Eclipse and lets you:

它是 Eclipse 的插件,可让您:

  • Easily trace your Java programs
  • Visualize your program's runtime functionality
  • Filter your traces to make them more compact
  • Filter your IDE based on what occurs at runtime
  • See what code ran in your source code editors
  • 轻松跟踪您的 Java 程序
  • 可视化程序的运行时功能
  • 过滤你的痕迹,使它们更紧凑
  • 根据运行时发生的情况过滤您的 IDE
  • 查看您的源代码编辑器中运行的代码

It's on Githuband there is also a project web site

它在Github 上,还有一个项目网站

Full Disclosure: I am the current project lead for Diver

全面披露:我是 Diver 目前的项目负责人