[Helma-dev] Extended Manage Application for SingleDocument Docs

Matthias Platzer matthias at knallgrau.at
Fri Sep 5 14:59:54 CEST 2003


Hi List,

I uploaded a first version of my modifications to the manage 
application. (HopDoc)

http://blox.twoday.net/getfile?name=HopDoc_V09

It works with Helma 1.2.x
(if you patch it)

Basically i added:

@doclevel
@skin
@example
(skin doesn't work as expected yet)

and i added a configuration screen where you can choose how to render 
your documentation:

=============================
o JavaDoc Style
Should the source code be included?
   o Render source code
Choose the Documentation Level: (@doclevel)
   o allprivate (0)
   o public(1)
   o userguide(2)

o Printable Version
What should be inlcuded?
   o Introduction
   o TYPE.PROPERTIES
   o ACTIONS
   o FUNCTIONS
   o MACROS
   o SKINS
   o TEMPLATES
Should the source code be included?
   o Render source code
Choose the Documentation Level: (@doclevel)
   o allprivate (0)
   o public (1)
   o userguide(2)

===============================

You can still choose to render it to screen, or to files.


USAGE:
the idea is to render not the whole big allinclusive JavaDoc style 
documentation, but to have also the possibility to generate reduced API, 
or Macro Docs for different target groups.

/**
  * This function demonstrates HopDoc
  * @param one  String
  * @example
  *    var d = demo("eins");
  * @doclevel public
*/
function demo(one) {
...

An API documentation for example is:
--------------------------
JavaDoc Style
all functions
type.properties
doclevel>public


A Macro Documentation is:
--------------------------
printable version
all macros,
doclevel>public,
don't render the source,

...



To make the new tags work you have to patch:
\helma_1_2\src\helma\doc\DocTag.java

....
     public static final int PARAMETER = 0;
     public static final int RETURN = 2;
     public static final int AUTHOR = 4;
     public static final int VERSION = 5;
     public static final int SEE = 6;
     public static final int DEPRECATED = 7;
     public static final int OVERRIDES = 8;
     public static final int SKIN = 9;
     public static final int DOCLEVEL = 10;
     public static final int EXAMPLE = 11;

     public static final String[][] tags = {
                                               { "@arg", "Argument" },
                                               { "@param", "Parameter" },
                                               { "@return", "Returns" },
                                               { "@returns", "Returns" },
                                               { "@author", "Author" },
                                               { "@version", "Version" },
                                               { "@see", "See also" },
                                               { "@deprecated", 
"Deprecated" },
                                               { "@overrides", 
"Overrides" },
                                               { "@skin", "Overrides" },
                                               { "@doclevel", "Overrides" },
                                               { "@example", "Overrides" }
                                           };
     private String name;
....



feedback is welcomed
(errors are part of this version by sure :)

matthias






More information about the Helma-dev mailing list