[CVS snippet] Added some javadocs
Aslak Hellesoy <rinkrank-yCVjj/[email protected]> Wed, 25 Feb 2004 19:42:25 -0600
| Newsgroups | gmane.comp.java.nanocontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in snippet/src/main/snippet on MAIN
SnippetMacro.java +47 -1 1.6 -> 1.7
Added some javadocs
----------
snippet /src /main /snippet
SnippetMacro.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- SnippetMacro.java 26 Feb 2004 01:04:39 -0000 1.6
+++ SnippetMacro.java 26 Feb 2004 01:42:25 -0000 1.7
@@ -11,10 +11,56 @@
import java.util.Map;
/**
+ * <p>
+ * Macro that gets a snippet of the content from a URL. The content will be trimmed down to the content
+ * found between some special tags. This is very handy for documentation that includes code. The code
+ * can be in CVS (whatever build system is used will make sure it builds properly) and the URL can
+ * be a ViewCVS URL. (In case of ViewCVS the URL should point to the download URL of a file). The content
+ * is cached for one hour in order to improve performance. The snippet is also unindented to remove excess space.
+ * Example of content of the URL:
+ * </p>
+ * <p>
+ * <pre>
+ * this
+ * // START SNIPPET: something
+ * macro
+ * // START SNIPPET: somethingElse
+ * is
+ * // END SNIPPET: somethingElse
+ * very
+ * // END SNIPPET: something
+ * cool
+ * </pre>
+ * </p>
+ * <p>
+ * Example usage:
+ * <pre>
+ * {snippet:lang=java|id=something|linenumbers=true|url=http://some/url/to/viewcvs}
+ * </pre>
+ * </p>
+ * <p>
+ * This will give the following content
+ * <pre>
+ * {code:java}
+ * 1. macro
+ * 2. is
+ * 3. very
+ * {code}
+ * </pre>
+ * </p>
+ * <p>
+ * Parameters:
+ * <ul>
+ * <li>id - (required) the id of the snippet in the URL content</li>
+ * <li>url - (required) the location of the content</li>
+ * <li>lang - (optional) if present, will wrap the content in {code:lang}</li>
+ * <li>linenumbers (optional) if present and true, will add line numbers</li>
+ * </ul>
+ * </p>
* @author Jon Tirsén
* @author Aslak Hellesøy
* @author Carlos Villela
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class SnippetMacro extends BaseMacro {
private static final int MINUTE = 60 * 1000;