From e64197037750e90354c0d07f87119351a9bdb98d Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Mon, 4 Aug 2025 09:29:27 +0800 Subject: [PATCH] 20250804 --- java.code-snippets | 26 ---------------- javadoc.code-snippets | 50 ++++++++++++++++++++++++++++-- jspecify.code-snippets | 30 ++++++++++++++++++ mybatis-mapper.code-snippets | 12 +++---- popular-dependencies.code-snippets | 6 ++-- 5 files changed, 86 insertions(+), 38 deletions(-) create mode 100644 jspecify.code-snippets diff --git a/java.code-snippets b/java.code-snippets index 9260a3f..a44c038 100644 --- a/java.code-snippets +++ b/java.code-snippets @@ -254,32 +254,6 @@ " */\n", ] }, - "JavaDoc for class": { - "scope": "java", - "prefix": "javadoc-class", - "body": [ - "/**", - " * ${1:$TM_FILENAME_BASE}", - " *", - " *

", - " * ${2:description}", - " *

", - " *", - " *

", - " * NOTE: ${3:content}.", - " *

", - " * @author ${4:${6:ZhouXY}}", - " * @since $7", - " * @see $8", - " */", - ], - "description": "JavaDoc for class" - }, - "inheritDoc": { - "scope": "java", - "prefix": ["javadoc-inheritDoc", "doc-inheritDoc"], - "body": "/** {@inheritDoc} */" - }, "Jdbc Template": { "scope": "java", "prefix": "jdbc", diff --git a/javadoc.code-snippets b/javadoc.code-snippets index 31e9563..3d0c56e 100644 --- a/javadoc.code-snippets +++ b/javadoc.code-snippets @@ -2,8 +2,52 @@ "code": { "prefix": "@code", "body": [ - "{@code $TM_SELECTED_TEXT}" + "{@code ${1:$TM_SELECTED_TEXT}}" ], "scope": "java" - } -} + }, + "link": { + "prefix": "@link", + "body": [ + "{@link ${1:$TM_SELECTED_TEXT}}" + ], + "scope": "java" + }, + "author": { + "prefix": ["@author", "@auth"], + "body": [ + "@author ${1:ZhouXY108}${2: <${3:luquanlion@outlook.com}>}" + ], + }, + "JavaDoc for class": { + "scope": "java", + "prefix": [ + "javadoc-class", + "doc-class" + ], + "body": [ + "/**", + " * ${1:$TM_FILENAME_BASE}", + " *", + " *

", + " * ${2:description}", + " *", + " *

", + " * NOTE: ${3:content}.", + " *", + " * @author ${4:ZhouXY108}${5: <${6:luquanlion@outlook.com}>}", + " * @since $7", + " * @see $8", + " */", + ], + "description": "JavaDoc for class" + }, + "inheritDoc": { + "scope": "java", + "prefix": [ + "javadoc-inheritDoc", + "doc-inheritDoc" + ], + "body": "/** {@inheritDoc} */" + }, +} \ No newline at end of file diff --git a/jspecify.code-snippets b/jspecify.code-snippets new file mode 100644 index 0000000..998189e --- /dev/null +++ b/jspecify.code-snippets @@ -0,0 +1,30 @@ +{ + "Import all JSpecify annotations": { + "scope": "java", + "prefix": "jspecify-import-all", + "body": [ + "import org.jspecify.annotations.*;", + "" + ], + "description": "import all JSpecify annotations" + }, + "Import JSpecify annotations": { + "scope": "java", + "prefix": "jspecify-import", + "body": [ + "import org.jspecify.annotations.Nullable;", + "import org.jspecify.annotations.NonNull;", + "" + ], + "description": "import JSpecify annotations" + }, + "Import JSpecify annotations (Nullable)": { + "scope": "java", + "prefix": "jspecify-import-nullable", + "body": [ + "import org.jspecify.annotations.Nullable;", + "" + ], + "description": "import JSpecify annotations (nullable)" + }, +} diff --git a/mybatis-mapper.code-snippets b/mybatis-mapper.code-snippets index e2b065d..2c69b7e 100644 --- a/mybatis-mapper.code-snippets +++ b/mybatis-mapper.code-snippets @@ -267,7 +267,7 @@ "/**", " * Entity 和 Info 的父类", " * ", - " * @author ZhouXY", + " * @author ZhouXY108 ", " */", "public abstract class BaseDomain implements Serializable {", "\tprotected Long id;", @@ -304,7 +304,7 @@ "/**", " * ${5:ModuleShortName}${7:Entity} 的基本属性", " * ", - " * @author ZhouXY", + " * @author ZhouXY108 ", " */", "public class ${5:ModuleShortName}${7:Entity}Info extends BaseDomain {", "\tprivate String username;", @@ -352,7 +352,7 @@ "/**", " * 查询参数的基本属性", " * ", - " * @author ZhouXY", + " * @author ZhouXY108 ", " */", "public abstract class BaseQueryParams {", "\tprotected Long id;", @@ -383,7 +383,7 @@ "/**", " * ${5:ModuleShortName}${7:Entity} 的查询参数", " * ", - " * @author ZhouXY", + " * @author ZhouXY108 ", " */", "public class ${5:ModuleShortName}${7:Entity}Query extends BaseQueryParams {", "\tprivate String email;", @@ -407,7 +407,7 @@ "/**", " * ${5:ModuleShortName}${7:Entity} 实体", " *", - " * @author ZhouXY", + " * @author ZhouXY108 ", " */", "public class ${5:ModuleShortName}${7:Entity} extends BaseDomain {", "\tprivate String username;", @@ -533,7 +533,7 @@ "/**", " * BaseEntityBuilder", " * ", - " * @author ZhouXY", + " * @author ZhouXY108 ", " */", "public abstract class BaseEntityBuilder {", "", diff --git a/popular-dependencies.code-snippets b/popular-dependencies.code-snippets index eb6e732..29ec80e 100644 --- a/popular-dependencies.code-snippets +++ b/popular-dependencies.code-snippets @@ -123,19 +123,19 @@ "", "\torg.junit.jupiter", "\tjunit-jupiter-api", - "\t5.12.2/version>", + "\t5.12.2", "\ttest", "", "", "\torg.junit.jupiter", "\tjunit-jupiter-engine", - "\t5.12.2/version>", + "\t5.12.2", "\ttest", "", "", "\torg.junit.jupiter", "\tjunit-jupiter-params", - "\t5.12.2/version>", + "\t5.12.2", "\ttest", "", ]