3 ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
5 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software: you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
28 set comment_start "/**"
30 set comment_prefix " *"
32 template empty :file :user :time :java :indent
33 "Fill out an empty file."
34 sectiondictionary "CLASSSECTION"
35 set NAME macro "FILENAME_AS_CLASS"
39 package {{FILENAME_AS_PACKAGE}};
41 {{>CLASSSECTION:declaration:class}}
48 template import :blank :indent
49 "Template to import a package."
51 {{>:declaration:include}}
55 template class :blank :indent
56 "Template to declare a variable."
57 sectiondictionary "DOCSECTION"
60 {{>DOCSECTION:declaration:javadoc-class}}
61 public class {{?NAME}} {
69 ;;; Semantic Tag support
71 template class-tag :indent :blank
72 "Insert a Java class with the expectation of it being used by a tag inserter.
73 Override this to affect applications, or the outer class structure for
74 the user-facing template."
76 {{>:declaration:javadoc-class}}
77 public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}implements {{/NOTFIRST}}{{NAME}}{{/PARENTS}}
83 template include :blank
84 "An include statement."
92 "Insert an argument list for a function.
93 @todo - Support smart CR in a buffer for not too long lines."
95 ({{#ARGS}}{{TYPE}} {{NAME}}{{#NOTLAST}},{{/NOTLAST}}{{/ARGS}})
100 template function :indent :blank
102 public {{?TYPE}} {{?NAME}}{{>:misc:arglist}} {
108 template variable :indent :blank
109 "Insert a variable declaration."
111 {{?TYPE}} {{?NAME}}{{#HAVEDEFAULT}} = {{DEFAULT}}{{/HAVEDEFAULT}};
115 ;;; Java Doc Comments
119 prompt GROUPNAME "Name of declaration group: "
121 template javadoc-function-group-start :indent :blank
130 template javadoc-function-group-end :indent :blank
140 template javadoc-class :indent :blank :time :user :tag
153 template javadoc-function :indent :blank :tag
158 * @param {{?NAME}} - {{DOC}}{{/ARGS}}
159 * @return {{TYPE}}{{#THROWS}}
160 * @exception {{NAME}} - {{EXDOC}}{{/THROWS}}
164 template javadoc-variable-same-line
169 template javadoc-section-comment :blank :indent
170 "Insert a comment that separates sections of an Emacs Lisp file."