画图之C4架构图idea和vscode环境搭建篇

2023-12-20 11:30

本文主要是介绍画图之C4架构图idea和vscode环境搭建篇,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

VS Code 下C4-PlantUML安装

安装VS Code

直接官网下载安装即可,过程略去。

安装PlantUML插件

在VS Code的Extensions窗口中搜索PlantUML,安装PlantUML插件。
在这里插入图片描述

配置VS Code代码片段

安装完PlantUML之后,为了提高效率,我们最好安装PlantUML相关的代码片段。
打开VS Code菜单,层级为Code→Preferences→User Snippets,如下图:
在这里插入图片描述
或者
在这里插入图片描述

在选择Snippets File Or Create Snippets弹窗中,选择New Global Snippets file,如下图:
在这里插入图片描述
在接下来的弹窗中,输入Snippets file的文件名,如下图:
在这里插入图片描述
使用浏览器打开以下链接,并将浏览器返回的文本内容粘贴到VS Code编辑区
github链接地址
内容如下

{"C4_Include_Context": {"scope": "plantuml","prefix": "Include C4 Context Diagram","body": ["!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml"],"description": "Include C4 Context Diagram"},"C4_Include_Container": {"scope": "plantuml","prefix": "Include C4 Container Diagram","body": ["!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml"],"description": "Include C4 Container Diagram"},"C4_Include_Component": {"scope": "plantuml","prefix": "Include C4 Component Diagram","body": ["!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml"],"description": "Include C4 Component Diagram"},"C4_Include_Deployment": {"scope": "plantuml","prefix": "Include C4 Deployment Diagram","body": ["!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml"],"description": "Include C4 Deployment Diagram"},"C4_Include_Dynamic": {"scope": "plantuml","prefix": "Include C4 Dynamic Diagram","body": ["!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml"],"description": "Include C4 Dynamic Diagram"},"C4_Person": {"scope": "plantuml","prefix": "Person","body": ["Person(${1:alias}, \"${2:label}\")"],"description": "Add Person to C4 diagram"},"C4_Person_Descr": {"scope": "plantuml","prefix": "Person with Description","body": ["Person(${1:alias}, \"${2:label}\", \"${3:description}\")"],"description": "Add Person with Description to C4 diagram"},"C4_Person_Ext": {"scope": "plantuml","prefix": ["External Person","Person (External)"],"body": ["Person_Ext(${1:alias}, \"${2:label}\")"],"description": "Add External Person to C4 diagram"},"C4_Person_Ext_Descr": {"scope": "plantuml","prefix": ["External Person with Description","Person (External) with Description"],"body": ["Person_Ext(${1:alias}, \"${2:label}\", \"${3:description}\")"],"description": "Add External Person with Description to C4 diagram"},"C4_Container": {"scope": "plantuml","prefix": "Container","body": ["Container(${1:alias}, \"${2:label}\", \"${3:technology}\")"],"description": "Add Container to C4 diagram"},"C4_Container_Descr": {"scope": "plantuml","prefix": "Container with Description","body": ["Container(${1:alias}, \"${2:label}\", \"${3:technology}\", \"${4:description}\")"],"description": "Add Container with Description to C4 diagram"},"C4_Container_Ext": {"scope": "plantuml","prefix": ["External Container","Container (External)"],"body": ["Container_Ext(${1:alias}, \"${2:label}\", \"${3:technology}\")"],"description": "Add External Container to C4 diagram"},"C4_Container_Ext_Descr": {"scope": "plantuml","prefix": ["External Container with Description","Container (External) with Description"],"body": ["Container_Ext(${1:alias}, \"${2:label}\", \"${3:technology}\", \"${4:description}\")"],"description": "Add External Container with Description to C4 diagram"},"C4_ContainerDb": {"scope": "plantuml","prefix": "Database Container","body": ["ContainerDb(${1:alias}, \"${2:label}\", \"${3:technology}\")"],"description": "Add Database Container to C4 diagram"},"C4_ContainerDb_Descr": {"scope": "plantuml","prefix": "Database Container with Description","body": ["ContainerDb(${1:alias}, \"${2:label}\", \"${3:technology}\", \"${4:description}\")"],"description": "Add Database Container with Description to C4 diagram"},"C4_ContainerDb_Ext": {"scope": "plantuml","prefix": ["External Database Container","Database Container (External)"],"body": ["ContainerDb_Ext(${1:alias}, \"${2:label}\", \"${3:technology}\")"],"description": "Add External Database Container to C4 diagram"},"C4_ContainerDb_Ext_Descr": {

这篇关于画图之C4架构图idea和vscode环境搭建篇的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/515865

相关文章

IDEA如何切换数据库版本mysql5或mysql8

《IDEA如何切换数据库版本mysql5或mysql8》本文介绍了如何将IntelliJIDEA从MySQL5切换到MySQL8的详细步骤,包括下载MySQL8、安装、配置、停止旧服务、启动新服务以及... 目录问题描述解决方案第一步第二步第三步第四步第五步总结问题描述最近想开发一个新应用,想使用mysq

IDEA如何将String类型转json格式

《IDEA如何将String类型转json格式》在Java中,字符串字面量中的转义字符会被自动转换,但通过网络获取的字符串可能不会自动转换,为了解决IDEA无法识别JSON字符串的问题,可以在本地对字... 目录问题描述问题原因解决方案总结问题描述最近做项目需要使用Ai生成json,可生成String类型

Java中的Opencv简介与开发环境部署方法

《Java中的Opencv简介与开发环境部署方法》OpenCV是一个开源的计算机视觉和图像处理库,提供了丰富的图像处理算法和工具,它支持多种图像处理和计算机视觉算法,可以用于物体识别与跟踪、图像分割与... 目录1.Opencv简介Opencv的应用2.Java使用OpenCV进行图像操作opencv安装j

mysql-8.0.30压缩包版安装和配置MySQL环境过程

《mysql-8.0.30压缩包版安装和配置MySQL环境过程》该文章介绍了如何在Windows系统中下载、安装和配置MySQL数据库,包括下载地址、解压文件、创建和配置my.ini文件、设置环境变量... 目录压缩包安装配置下载配置环境变量下载和初始化总结压缩包安装配置下载下载地址:https://d

Idea调用WebService的关键步骤和注意事项

《Idea调用WebService的关键步骤和注意事项》:本文主要介绍如何在Idea中调用WebService,包括理解WebService的基本概念、获取WSDL文件、阅读和理解WSDL文件、选... 目录前言一、理解WebService的基本概念二、获取WSDL文件三、阅读和理解WSDL文件四、选择对接

将Python应用部署到生产环境的小技巧分享

《将Python应用部署到生产环境的小技巧分享》文章主要讲述了在将Python应用程序部署到生产环境之前,需要进行的准备工作和最佳实践,包括心态调整、代码审查、测试覆盖率提升、配置文件优化、日志记录完... 目录部署前夜:从开发到生产的心理准备与检查清单环境搭建:打造稳固的应用运行平台自动化流水线:让部署像

idea如何开启菜单栏

《idea如何开启菜单栏》文章介绍了如何通过修改IntelliJIDEA的样式文件`ui.lnf.xml`来重新显示被关闭的菜单栏,并分享了解决问题的步骤... 目录ijsdea开启菜单栏第一步第二步总结idea开启菜单栏手贱关闭了idea的js菜单栏,花费了半个小时终于解决,记录并分享一下第一步找

使用IntelliJ IDEA创建简单的Java Web项目完整步骤

《使用IntelliJIDEA创建简单的JavaWeb项目完整步骤》:本文主要介绍如何使用IntelliJIDEA创建一个简单的JavaWeb项目,实现登录、注册和查看用户列表功能,使用Se... 目录前置准备项目功能实现步骤1. 创建项目2. 配置 Tomcat3. 项目文件结构4. 创建数据库和表5.

gradle安装和环境配置全过程

《gradle安装和环境配置全过程》本文介绍了如何安装和配置Gradle环境,包括下载Gradle、配置环境变量、测试Gradle以及在IntelliJIDEA中配置Gradle... 目录gradle安装和环境配置1 下载GRADLE2 环境变量配置3 测试gradle4 设置gradle初始化文件5 i

最新版IDEA配置 Tomcat的详细过程

《最新版IDEA配置Tomcat的详细过程》本文介绍如何在IDEA中配置Tomcat服务器,并创建Web项目,首先检查Tomcat是否安装完成,然后在IDEA中创建Web项目并添加Web结构,接着,... 目录配置tomcat第一步,先给项目添加Web结构查看端口号配置tomcat    先检查自己的to