Single-line comments // text
An end-of-line comment: all text from the ASCII characters
// to the end of the line
Example 4.130. Single-line comment
// [PENDING] this should be part of the ErrorManager
|
Multi-line comments /* text */
A traditional comment: all text from the ASCII characters /*
to the ASCII characters */
Example 4.131. Multi-line comment
/* public int getSubregionStartOffset(int line, int subregion)
{
ChunkCache.LineInfo[] lineInfos = chunkCache.getLineInfosForPhysicalLine(line);
return buffer.getLineStartOffset(lineInfos[subregion].physicalLine)
+ lineInfos[subregion].offset;
} */
|
Javadoc comments /** text */
A documentation comment: actually a special kind of
multi-line comment as defined by the Sun Javadoc specification;
all text from the ASCII characters /**
to the ASCII characters */
Example 4.132. Javadoc comment
/**
* A scroll listener will be notified when the text area is scrolled, either
* horizontally or vertically.
*
* @author Slava Pestov
* @since jEdit 3.2pre2
*/
|
Separator comments //~ text
A Jalopy-specific separator comment: actually a special kind of single-line comment;
all text from the ASCII characters
//~ to the end of the line
Example 4.133. Separator comment
//~ Inner classes .......................................
|
Pragma comments //J[directive]
A Jalopy-specific control comment: actually a special kind of single-line comment;
all text from the ASCII characters
//J[-|+] to the end of the line
Example 4.134. Control comments
//J-
if {condition()) return value;
//J+
|
Currently, Jalopy recognizes two pragma comments: //J- and //J+
With these comments you can disable formatting for certain code sections.
//J- tells Jalopy to disable formatting until //J+
will enable it again. Note that these comments can only be used in conjunction! Omitting the //J+ will certainly produce errors.