Skip to content

Commit

Permalink
lang/java: Add file templates
Browse files Browse the repository at this point in the history
- `__annotation-type`
- `__enum`
- `__interface`
- `__record`
- `__` → `__class` (rename)
  • Loading branch information
sei40kr committed Jun 5, 2021
1 parent 9fb96f9 commit 63cc08b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: Java annotation type file template
# --
package `(+java-current-package)`;

public @interface `(+java-current-class)`
{
$0
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- mode: snippet -*-
# name: Java file template
# name: Java class file template
# --
package `(+java-current-package)`;

Expand Down
9 changes: 9 additions & 0 deletions modules/editor/file-templates/templates/java-mode/__enum
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: Java enum file template
# --
package `(+java-current-package)`;

public enum `(+java-current-class)`
{
$0
}
9 changes: 9 additions & 0 deletions modules/editor/file-templates/templates/java-mode/__interface
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- mode: snippet -*-
# name: Java interface file template
# --
package `(+java-current-package)`;

public interface `(+java-current-class)`
{
$0
}
8 changes: 8 additions & 0 deletions modules/editor/file-templates/templates/java-mode/__record
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: Java record file template
# --
package `(+java-current-package)`;

public record `(+java-current-class)`($0) $1
{
}

0 comments on commit 63cc08b

Please sign in to comment.