JavaDoc Comment
The JavaDoc comment model is based on the JavaDoc tool developed by Sun Microsystems. While originally developed for documenting Java source code, TechWriter extends the use of JavaDoc for commenting databases.
If you are using or plan to use JavaDoc for your database comments, you must set the comment format to JavaDoc on the Database Settings dialog.
As TechWriter processes your comments, it will recognize the following JavaDoc tags:
JavaDoc Tag | Description |
---|---|
@param | Allows a description of a parameter to be included in the comment. |
@column | Allows a description of a database column to be included in the comment. |
@return | Allows a description of the return value to be included in the comment. |
@example | Allows an example to be included in the comment. |
@link | Specifies a link. See Creating Topic Links for more information. |
@linkplain | Specifies a link. See Creating Topic Links for more information. |
In addition to JavaDoc tags, the JavaDoc comment model also includes support for a subset of HTML tags that can be used for formatting.
HTML Tag | Description |
---|---|
<B> or <STRONG> | Changes the font to bold. |
<I> or <EM> | Changes the font to italic. |
<SUP> | Changes the text to a superscript |
<SUB> | Changes the text to a subscript |
<OL> and <LI> | Formats a numbered list. The type attribute can also be specified to control the numbering scheme for the list as follows:
|
<UL> and <LI> | Formats a bulleted list. |
<DIV class='othertitle'> | Formats text as a document title. |
<H1>,<H2>,<H3> and <H4> | Formats text as a heading |
<BLOCKQUOTE> | Indents the text. |
<P> | Starts a new paragraph and separates the description from the remarks section of the comments. |
<BR> | Inserts a line break. |
<IMG SRC='...'> | References an image. The style attribute can also be specified that includes one or more of the following CSS attributes:
See Referencing Images for more information. |
<TABLE>, <COL>, <THEAD>, <TBODY>, <TR>, <TH> and <TD> | Used to create a table. See "Using Table Tags" below for an example. |
Any other JavaDoc or HTML tags that appear in the comments will be discarded.
Horizontal Alignment
The style attribute that contains a definition for the CSS text-align property can be used to specify specify horizontal alignment for the following tags:
- <P>
- <TH>
- <TD>
- <H1>
- <H2>
- <H3>
- <H4>
- <DIV>
- <IMG>
Example
Below is an example of a comment that uses JavaDoc:
Table for storing employee information.
<P>
This table contains information related to an employee.
@column EmployeeID ID of the employee.
@column FirstName First name of the employee.
@column LastName Last name of the employee.
@column ManagerID ID of the employee's {@link Tables.CorpDb#Manager manager}
In the above example, the <P> tag separates the text that represents the description from the text that represents the remarks.
Using Table Tags
Below is an example of a table created using HTML tags:
<table>
<col width="25%"/>
<col width="75%"/>
<thead>
<tr><th>Role</th><th>Description</th></tr>
<thead>
<tbody>
<tr><td>User</td><td>Typical end-user</td></tr>
<tr><td>Admin</td><td>System administrator</td></tr>
<tr><td>Manager</td><td>Project manager</td></tr>
</tbody>
</table>
Encoded JavaDoc
If you have already embedded JavaDoc tags within your comments, but have done so by encoding the tags, you will want to select the JavaDoc (encoded) model. For example, if you have encoded your paragraph tag as <P> instead of <P>, this alternative to the standard JavaDoc model will decode your encoded tags replacing the character entities such as the less than sign so that the tags can be properly parsed.
'IT > Android[안드로이드]' 카테고리의 다른 글
Eclipse에서 AIDL 참조 에러 혹은 AIDL에서 Class 찾지 못하는 경우. (0) | 2012.03.23 |
---|---|
Eclipse에 Phone 연결시 에러 "EventLogTags" 찾지 못하는 경우 (0) | 2012.03.23 |
Android.mk file syntax specification (0) | 2011.12.28 |
Permission (0) | 2011.12.15 |
키에 따른 포커스 이동 (0) | 2011.12.13 |