We’re working on a documentation generator for ActionScript 2 that parses code commented with the JavaDoc style syntax to create HTML help, Flash help, or any other type of documentation. Here’s a sneak peak at the output and feature list…
When we started documenting the next version of our charting components we realized that we need a generator with a lot more features than exists in any available product–our goal is to have all documentation generated without any manual post-run tweaking.
So, we’ve begun work in BLDocs, an AS2 code parser and documentation generator. Here’s the initial feature list we expect to include in the first release.
- Read AS2 files and parse both code and comments.
- Recursively parse all files in a directory and sub-directories.
- Parse class info, functions, properties, and all meta tags (events and such) from code even without comments.
- Support for any comment tag without requiring program modifications or extensions to support new tags.
- Support for either collapsing or preserving white-space in comment tags (particularly as related to the @example tag).
- Support for comments with leading asterisk or without.
- Handle meta-tags intelligently where a class based meta-tag (event) can have it’s own complete set of documentation but a function based meta-tag (inspectable) is owned by the function and doesn’t have it’s own comments.
- Write the parser such that it creates an internal abstract ActionScript tree representation so the program can be extended for any output format.
- Support for documentation collapsing (collapse the inheritance chain for documentation purposes).
- Support for documentation-only function/property overrides–provide new documentation for a base-class function even if the function isn’t overridden in the class.
- Support for documentation based access levels (public, internal, package, protected, and private).
- Filter classes based on access level, meta-tags, comment-tags, or package.
- By default output an all-encompassing XML format and support XSLT translations to final files.
- Support a command file interface that allows parsing multiple class paths, specifying various translations to run on XPath based node sets each with their own destination directory.
- Include XSLT translations and command file for JavaDoc style framed HTML output listing packages, classes in each package, package summary pages, and class pages that list all class info in one page.
- Include XSLT translations and command file for Flash MX 2004 style documentation with ActionsPanel, TOC, Index, Search, and Contents page generation.
- Make a nice GUI for the whole application. Right now it’s command line and we may release it without a GUI since it is a developer tool.
Here’s a snap-shot of the HTML-style generated documenatation for our charting components.
If there are other features not listed that you would like, please drop me a line and I’ll add them to the list for consideration.