Skip to content

Commit

Permalink
Merge pull request doomemacs#5142 from sei40kr/java-file-templates
Browse files Browse the repository at this point in the history
lang/java: Add file templates
  • Loading branch information
hlissner authored Jun 5, 2021
2 parents 9fb96f9 + 63cc08b commit 5038ba9
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 5038ba9

Please sign in to comment.