我们如何从可编辑的 Java 代码在 IntelliJ IDEA 中生成序列图?

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

How can we generate sequence diagram in IntelliJ IDEA from Java code which is editable?

javaintellij-ideaumlreverse-engineeringsequence-diagram

提问by user2077648

I am currently using SequenceDiagram Plugin from https://plugins.jetbrains.com/plugin/8286?pr=to generate Sequence Diagrams. But here the drawback is that I am not able to save them in a format like .uml or any other format so anyone can open this file and edit it. It only allows to export the sequnce diagram as an image.

我目前正在使用https://plugins.jetbrains.com/plugin/8286?pr= 中的SequenceDiagram 插件 来生成序列图。但这里的缺点是我无法以 .uml 或任何其他格式保存它们,因此任何人都可以打开此文件并对其进行编辑。它只允许将序列图导出为图像。

Is there any way to save the sequence diagrams generated so they can be edited later?

有没有办法保存生成的序列图以便以后编辑?

回答by Hash

As the file https://github.com/Vanco/SequencePlugin/blob/master/src/org/intellij/sequencer/diagram/app/actions/ExportAction.javashows the plugin is able to export into images only. According to the licenceyou can modify the software if you keep in mind this partof the licence.

由于文件https://github.com/Vanco/SequencePlugin/blob/master/src/org/intellij/sequencer/diagram/app/actions/ExportAction.java显示插件只能导出为图像。如果您牢记许可证的这一部分,则可以根据许可证修改软件。

I think it is a good feature you suggested, it is not an easy job tho. If you plan to extend the feature try to contact with https://github.com/Vanco. I think it would be a handy thing for all of us!

我认为这是你建议的一个很好的功能,这不是一件容易的事。如果您打算扩展该功能,请尝试联系https://github.com/Vanco。我认为这对我们所有人来说都是一件方便的事情!

Edit:I posted it as a comment, but it is part of the answer:

编辑:我将其作为评论发布,但它是答案的一部分:

Here is a github repo: https://github.com/sherif181/java-sequence-diagram-generatorit is not a plugin but looks handy for your case. It will generate LaTex documents that could be edited.

这是一个 github 存储库:https: //github.com/sherif181/java-sequence-diagram-generator它不是插件,但看起来很适合您的情况。它将生成可编辑的 LaTex 文档。