You are currently browsing the Eric Feminella blog archives for March, 2009

Flex Quick Tip: ASDoc Package comments

Documenting ActionScript elements such as a Class, Interface, method, property, event, style and so forth with ASDoc is a rather simple and straightforward process. However one element which is a bit more tricky to document with ASDoc is package declarations.

Determining how to document package declarations is a bit more complicated than say, documenting classes as there is not a specific ASDoc tag intended for documenting packages in source code form. To do so one might assume to simply add an ASDoc comment to a package declaration, such as the following:

However the above will not generate ASDoc source documentation; it will simply be ignored by the asdoc compiler.

In order to document packages you need to specify the -package argument to the asdoc compiler. This is specified in the form:
-package <package-name> '<package-comment>

In general, I think most developers would prefer not to specify any kind of source file documentation via a compiler argument as this type of metadata ideally should be defined as an annotation (in the documentation sense of the word) to the actual source file itself, however if you find a need to document packages the -package compiler option will do the job.