LotusScript.doc is a series of script libraries that can generate HTML documentation for LotusScript libraries. It is mainly targeted at class delevelopment in script libraries but should be applicable to LotusScript in forms, views and agents.
I wrote the code last night and it looks promising. Below is a sample of some documentation I have generated. As you can see the documentation isn’t much to look at – layout will be the next issue I will address.
Sample documentation:
ScriptLibrary @ CLASS: DocumentationWriterClass @ DocumentationWriterA DocumentationWriter is used to write the documentation to an OutputStream. Method @ New[SUB] (PUBLIC) New(scripts As Vector) Method @ Write[SUB] (PUBLIC) Write(filename As String) |
The method signatures and comments are actually based on parses LotusScript code and shows that the library can parse classes with nested methods and functions. Comments are also included.
I have based the documentation format on the JavaDoc syntax:
'/** ' * Parent class. ' */ Public Class Bar End Class '/** ' * This is a class comment ' * and it may span multiple lines. The class ' * the inherits from the Bar class. ' */ Public Class Foo As Bar '/** ' * Constructor. ' */ Public Sub New() End Sub End Class
The above code generates documentation that looks like this if the code is in a script library called “FooBarLib”:
ScriptLibrary @ FooClass @ BarParent class. Class @ Foo (inherits from Bar)This is a class comment and it may span multiple lines. The class the inherits from the Bar class. Method @ New[SUB] (PUBLIC) New |
I’ll post more once I have worked a little more on the presentation.