Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse JET Guide
Previous Page Home Next Page

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 --%\>
    
    

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire