From 63cc08be984dda317c2e0c4933902f5ead8e9199 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Sat, 5 Jun 2021 23:19:04 +0900 Subject: [PATCH] lang/java: Add file templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `__annotation-type` - `__enum` - `__interface` - `__record` - `__` → `__class` (rename) --- .../file-templates/templates/java-mode/__annotation-type | 9 +++++++++ .../file-templates/templates/java-mode/{__ => __class} | 2 +- modules/editor/file-templates/templates/java-mode/__enum | 9 +++++++++ .../file-templates/templates/java-mode/__interface | 9 +++++++++ .../editor/file-templates/templates/java-mode/__record | 8 ++++++++ 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 modules/editor/file-templates/templates/java-mode/__annotation-type rename modules/editor/file-templates/templates/java-mode/{__ => __class} (77%) create mode 100644 modules/editor/file-templates/templates/java-mode/__enum create mode 100644 modules/editor/file-templates/templates/java-mode/__interface create mode 100644 modules/editor/file-templates/templates/java-mode/__record diff --git a/modules/editor/file-templates/templates/java-mode/__annotation-type b/modules/editor/file-templates/templates/java-mode/__annotation-type new file mode 100644 index 00000000000..73160895173 --- /dev/null +++ b/modules/editor/file-templates/templates/java-mode/__annotation-type @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: Java annotation type file template +# -- +package `(+java-current-package)`; + +public @interface `(+java-current-class)` +{ + $0 +} \ No newline at end of file diff --git a/modules/editor/file-templates/templates/java-mode/__ b/modules/editor/file-templates/templates/java-mode/__class similarity index 77% rename from modules/editor/file-templates/templates/java-mode/__ rename to modules/editor/file-templates/templates/java-mode/__class index 180f0a14348..ce9a5796025 100644 --- a/modules/editor/file-templates/templates/java-mode/__ +++ b/modules/editor/file-templates/templates/java-mode/__class @@ -1,5 +1,5 @@ # -*- mode: snippet -*- -# name: Java file template +# name: Java class file template # -- package `(+java-current-package)`; diff --git a/modules/editor/file-templates/templates/java-mode/__enum b/modules/editor/file-templates/templates/java-mode/__enum new file mode 100644 index 00000000000..e8d0f56d3d1 --- /dev/null +++ b/modules/editor/file-templates/templates/java-mode/__enum @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: Java enum file template +# -- +package `(+java-current-package)`; + +public enum `(+java-current-class)` +{ + $0 +} \ No newline at end of file diff --git a/modules/editor/file-templates/templates/java-mode/__interface b/modules/editor/file-templates/templates/java-mode/__interface new file mode 100644 index 00000000000..7b0fe8c7fe0 --- /dev/null +++ b/modules/editor/file-templates/templates/java-mode/__interface @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: Java interface file template +# -- +package `(+java-current-package)`; + +public interface `(+java-current-class)` +{ + $0 +} \ No newline at end of file diff --git a/modules/editor/file-templates/templates/java-mode/__record b/modules/editor/file-templates/templates/java-mode/__record new file mode 100644 index 00000000000..3ea4020fd88 --- /dev/null +++ b/modules/editor/file-templates/templates/java-mode/__record @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: Java record file template +# -- +package `(+java-current-package)`; + +public record `(+java-current-class)`($0) $1 +{ +} \ No newline at end of file