My favorites | Sign in
Logo
             
Search
for
Updated Jun 28, 2009 by jasonm23
Labels: Featured
AS3DacWiki  

AS3dac

AS3dac is an auto commenting script for AS3 classes and interfaces, (an AS2 version has been around for a few years). It scans a named AS3 .as file and provides comment documentation stubs. There are a few options available which will allow you to customise the way the stubs are generated.

Here are some examples of the stub comments generated for classes and interfaces, (click these links to view examples.)

If a method, property or class already has a doc comment that particular item is not given a new comment stub. So if you forget to run as3dac with a particular option, you cannot just re-run it to update the comments.

Output is not saved by default, so you can run as3dac on a file to see how it would be updated, without changes being made to it. The option -o outputfilename is used to save output to a file.

Getting Started

The script is written in Perl you can run it out of the box on Mac OS X or Linux/Unix/BSD, on Windows first install Cygwin (Install Perl as part of the Cygwin setup process.)

Installing as3dac

Checkout the latest source from the repository.

svn co https://as3dac.googlecode.com/svn/trunk ~/as3dac

You can get the latest update by going to your ~/as3dac folder and doing svn up

Once the files are checked out you can run the install script.

~/as3dac/install

This will ask you for your sudo password, and copy the as3dac script to your /usr/local/bin folder. You can now run as3dac, see below for usage details.

Usage

Run from a terminal shell, such as bash, or incorporate into a shell script.

Basic syntax is:

as3dac -c Class.as

This will read the class Class.as and output the commented version to the console.

To write the commented version to a file, specify the -o parameter.

as3dac -c Class.as -o Class.as

This will overwrite the Class.as with the commented version, as usual take care with your own source files ma'am.

Advanced Options

Usage

as3dac [options]

Example

as3dac -c MyClass.as -o MyCommentedClass.as -a "Author Name" -e "email@domain.com" -v "1.0"

Options

-c filename AS3.0 Class or Interface file to auto comment.
-o filename Output to another file - (if not supplied output is sent to the console.)
-p Only add doc comment stubs to public members.
-a "author name" Author name (in quotes if it contains spaces.)
-e "email@domain.org" Author email.
-t Add TODO notes to comment stubs
-T "message" If -t is used, -T allows you to provide a customised TODO string.
-v "version" Version string.
--help this message.

Uninstalling

to uninstall just run the uninstall script from the ~/as3dac folder, or delete /usr/local/bin/as3dac yourself.

~/as3dac/uninstall

Further reading

Working with multiple files and folders.



Sign in to add a comment
Hosted by Google Code