]> code.delx.au - gnu-emacs/blobdiff - etc/srecode/java.srt
Merge from emacs-24; up to 2013-01-03T02:31:36Z!rgm@gnu.org
[gnu-emacs] / etc / srecode / java.srt
index 764c6fb1ed5be60a5bcaad6ed0230a40acb64e92..e1fbb50eff69a6337d6460246c5836b95410cbec 100644 (file)
@@ -1,6 +1,6 @@
 ;; java.srt
 
-;; Copyright (C) 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2013 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 
@@ -43,6 +43,23 @@ package {{FILENAME_AS_PACKAGE}};
 ----
 bind "e"
 
+template empty-main :file :user :time :java :indent
+"Fill out an empty file with a class having a static main method"
+sectiondictionary "CLASSSECTION"
+set NAME macro "FILENAME_AS_CLASS"
+----
+{{>:filecomment}}
+
+package {{FILENAME_AS_PACKAGE}};
+
+{{<CLASSSECTION:declaration:class}}
+public static void main(String args[]) {
+       {{^}}
+}
+{{/CLASSSECTION}}
+----
+bind "l"
+
 context declaration
 
 template import :blank :indent
@@ -74,8 +91,8 @@ Override this to affect applications, or the outer class structure for
 the user-facing template."
 ----
 {{>:declaration:javadoc-class}}
-public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}}
-{     
+public class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}}
+{
    {{^}}
 };
 ----
@@ -83,7 +100,7 @@ public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}impl
 template include :blank
 "An include statement."
 ----
-import {{NAME}};
+import {{?NAME}};
 ----
 
 context misc
@@ -178,4 +195,4 @@ template javadoc-section-comment :blank :indent
 ----
 
 
-;; end
\ No newline at end of file
+;; end