JET Comment Syntax Reference
JET templates may contain comments between the characters
<%--
and --%>
.
Comments have no impact on the execution of the template, except that they may influence
whitespace stripping rules.
JET comments are copied to the generated Java class as Java line comments.
JET templates accept two special tags in the first non-blank line of a comment. The tag '@header' will
cause the comment to be emitted as the file header comment for the generated Java class.
This can be useful for inserting copyright notices into the generated Java code.
The tag '@class' will
cause the comment to be emitted as the class Java doc comment for the generated Java class.
Valid comments
Comments may span several lines, and may contain any text. The
following are examples of a JET comments:
<%-- @header
This comment will appear as the file header comment
in the generated Java code
--%>
<%--
@class
This comment will appear as the Java class doc comment
in the generated Java code
--%>
<%-- This comment will not appear in the template output --%>
<%-- This directive is not used
<%@taglib id="org.eclipse.jet.controlTags" prefix="cc"%>
--%>
Invalid comments
Comments may not appear within other JET elements. The following
are illegal comments:
<%@taglib id="org.eclipse.jet.controlTags" <%-- illegal comment --%>
prefix="cc" %>
Escaping comment characters
To emit the characters <%--
in a templates
output, enter <\%--
. To emit --%>
,
enter --%\>
.
The following is an example of an escaped JET comments:
<\%-- this will show in the template output --%\>