Skip to main content
summaryrefslogtreecommitdiffstats
blob: b66ee88feab9a37cd30aa0209a9fde5b85394ce7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

  <head>

    <title>JET Comment Reference Syntax</title>

    <link charset="ISO-8859-1" href="../../book.css" rel="STYLESHEET"
     type="text/css"/>

  </head>

  <body>

    <h2>JET Comment Syntax Reference</h2>

    <p>JET templates may contain comments between the characters 
    <code>&lt;%--</code> and <code>--%&gt;</code>.
    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. </p>
    <p>
    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.
    </p>

    <h3>Valid comments</h3>

    <p>Comments may span several lines, and may contain any text. The 
    following are examples of a JET comments:</p>

    <pre>  
    &lt;%-- @header
    This comment will appear as the file header comment 
    in the generated Java code
     --%&gt;
    &lt;%-- 
    @class
    This comment will appear as the Java class doc comment 
    in the generated Java code
     --%&gt;
     &lt;%-- This comment will not appear in the template output --%&gt;
     &lt;%-- This directive is not used 
     &lt;%@taglib id=&quot;org.eclipse.jet.controlTags&quot; prefix=&quot;cc&quot;%&gt;
     --%&gt;</pre>
    <h3>Invalid comments</h3>

    <p>Comments may not appear within other JET elements. The following 
    are illegal comments:</p>

    <pre>&lt;%@taglib id=&quot;org.eclipse.jet.controlTags&quot; &lt;%-- illegal comment --%&gt;
          prefix=&quot;cc&quot; %&gt;</pre>
    <h3>Escaping comment characters</h3>

    <p>To emit the characters <code>&lt;%--</code> in a templates 
    output, enter <code>&lt;\%--</code>. To emit <code>--%&gt;</code>, 
    enter <code>--%\&gt;</code>.</p>

    <p>The following is an example of an escaped JET comments:</p>

    <pre>&lt;\%-- this will show in the template output --%\&gt;
    
    </pre>
  </body>

</html>

Back to the top