MAC在IDEA上集成PLANTUML Graphviz的步骤
1.参考链接:MAC下使用IDEA集成PLANTUML的步骤,以及DOT EXECUTABLE:NULL NO DOT EXECUTABLE FOUND的解决方法 2.PlantUML官方文档:PlantUML官方文档
一、安装plantuml插件
二、安装graphviz
source /Users/dulei/.zprofile
执行下面的命令,否则“brew install graphviz”会有报错:Error: graphviz: Failed to download resource “libtiff”
brew update
若brew慢:mac使用brew update无反应,更新慢解决办法
brew install graphviz
graphviz的安装位置:“/opt/homebrew/Cellar/graphviz/3.0.0/lib/graphviz” dot.exe位置: /opt/homebrew/Cellar/graphviz/3.0.0/bin 测试: 在dot位置执行
dot -v
(base) dulei@192 bin % ./dot -v
dot - graphviz version 3.0.0 (20220226.1711)
libdir = "/opt/homebrew/Cellar/graphviz/3.0.0/lib/graphviz"
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.6.dylib
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
/opt/homebrew/Cellar/graphviz/3.0.0/lib/graphviz/config6
was successfully loaded.
render : cairo dot dot_json fig gd json json0 map mp pic pov ps quartz svg tk visio vml vrml xdot xdot_json
layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
textlayout : textlayout
device : bmp canon cgimage cmap cmapx cmapx_np dot dot_json eps exr fig gd gd2 gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg json json0 mp pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vdx vml vmlz vrml wbmp webp xdot xdot1.2 xdot1.4 xdot_json
loadimage : (lib) bmp eps gd gd2 gif jpe jpeg jpg pdf png ps svg webp xbm
更新idea配置并重启idea
三、新建uml文件
右面实时显示图
四、导出SVG矢量图
图右键选中复制svg源码,并另存为后缀名svg的文件,即可使用。
|