PlantUml for Atom in Windows

Plantuml 是...?

支持快速绘制UML

  • Sequence diagram 时序图

  • Usecase diagram 用例图

  • Class diagram 类图

  • Activity diagram 活动图

  • Component diagram 组件图

  • State diagram 状态图

  • Deployment diagram

  • Object diagram 对象图

  • wireframe graphical interface

PlatUml为Atom,AndroidStudio,sublime text 2 都提供了插件,方便迅速的在你的编辑器里绘制需要的UML。


    Bob -> Alice : hello

PlantUml for Atom in Windows_第1张图片

在Atom中需要...?

  • 两个包是必须的:language-plantumlplantuml-preview.

  • 一个Windows插件:Graphviz 网站打不开?看文末。

如何在Atom中安装Package?

  • 快捷键 ctrl + ,

PlantUml for Atom in Windows_第2张图片

使用

  • ctrl + alt + P 打开.pu文件

  • 保存预览图为本地png


    @startuml
    
    abstract class AbstractList
    abstract AbstractCollection
    interface List
    interface Collection
    
    List <|-- AbstractList
    Collection <|-- AbstractCollection
    
    Collection <|- List
    AbstractCollection <|- AbstractList
    AbstractList <|-- ArrayList
    
    class ArrayList {
    Object[] elementData
    size()
    }
    
    enum TimeUnit {
    DAYS
    HOURS
    MINUTES
    }
    
    @enduml

效果图:

PlantUml for Atom in Windows_第3张图片

注:Graphviz 应该打不开了,科学上网也不好使了,我们可以使用choco来安装Graphviz。

  • 在cmd中安装chocolatey

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
  • choco install Graphviz

  • yes

你可能感兴趣的:(atom,plantuml)