VS Code mapping is used PlantUML

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/stone0823/article/details/100058365

PlantUML is an open source project, supported by the script drawing, so PlantUML is a modeling language. The http://plantuml.com/zh/ , PlantUML can draw the following types of UML diagram:

  • Timing diagram
  • Use Case Diagram
  • Class Diagram
  • Activity Diagram
  • Component diagram
  • State diagram
  • Object graph
  • Deployment diagrams
  • Timing FIG.

It also supports the following non-UML diagrams:

  • Wireframe graphical interface
  • Chart
  • Specification and Description Language (SDL)
  • Ditaa diagram
  • Gantt chart
  • mind Mapping
  • Work Breakdown Structure diagram
  • Mathematical formula AsciiMath or JLaTeXMath symbols
  • Entity Relationship diagram

This article describes how to use PlantUML in the VS Code, and gives an example when a drawing sequence of FIG.

Graphviz software installation and expansion PlantUML

PlantUML install extensions VS Code, the method of mounting the same with other extensions. Open the Extensions panel, search PlantUML, then click on the install button to install.

In Graphviz's official website ( https://graphviz.gitlab.io/_pages/Download/Download_windows.html ) msi file Graphviz download the software and install it.

Drawing Example

Here is an example where the timing chart drawing, the drawing describes, using a method derived. As for how to draw a variety of different figures, you need to learn control PlantUML documents.

Create a markdown file (extension md), and then enter a drawing start and end markers:

@startuml

@enduml

In @startumland @endumlbetween a drawing script. The following example explains this specification FIG WSGI:

PlantUML script can be described as follows:

@startuml

Client -> HttpServer: request

HttpServer -> WebApp: application_callable()
note right: application_callable(environ, start_response)

WebApp -> HttpServer: start_response()
note right: start_response(status, headers, exc_info)

WebApp -> HttpServer: return iterator

HttpServer -> Client: response

@enduml

In order to be able to see the immediate effect, in the Windows version of VS Code by Ctrl + Shift + P to open the command panel, enter PlantUML, find Preview Current Diagram command or through the shortcut Alt + D, open the preview page. Interface at this time is as follows:

After the completion of the drawing, can export a variety of formats, but also by the Ctrl + Shift + P, to open the command panel, find command Export Current Diagram derived. Diagram Below is the completed.

Guess you like

Origin blog.csdn.net/stone0823/article/details/100058365