PlantUml可以在很多工具上使用,这里使用了atom和vscode
当网站https://atom.io/下载 安装后需要安装两个插件 atom下 File -> Settings -> Install 安装: language-plantuml plantuml-viewer 不要安装plantuml-preview,因为这个使用还需要安装plantuml.jar

1.png
对文本格式的代码,按ctrl+alt+p就显示图形
需要设置 plantuml-viewer atom下 File -> Settings -> Packages 找到plantuml-viewer后选择settings,在Charset中填写 UTF-8

2.png
参考文档http://plantuml.com/zh/sequence-diagram 中在参与者中使用非字母符号部分:

3.png
vm_service_impl.go->native/vm_impl.go: RunContract activate native/vm_impl.go 改成 vm_service_impl.go->"native/vm_impl.go" as NativeVmImpl: RunContract activate NativeVmImpl
需要参考https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml 以管理员的身份运行cmd,并执行下面的命令
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install plantuml然后在vscode上安装PlantUML插件,编写代码后,保存为.pu文件,按alt+D执行显示预览 如果要保存文件,在文件内容上右键鼠标,选择Export Current Diagram,会自动保存到当前项目\out\test\目录