ASDoc - javaDoc for Flex

In the FlexBuilder IDE using javadoc-style comments (/* ...... / ) behaves as it does for Java, but there's nowhere in the FlexBuilder settings to specify that documentation should be produced. After a little investigation, it seems that ASDoc is a command line tool that has not yet been integrated with FlexBuilder.

Viewing the Adobe help for ASDoc doesn't really give you the impression that it's all that easy to use - it recommends running ASDoc from FlexBuilder's bin directory, passing the location of your source folder as a parameter. If you want to create doco for all of your classes, you have to pass the location a second time. Annoyingly, the output is also created in the bin folder. Ugh.

After a small amount of fiddling I worked out an easier way. Create a Windows batch file and put the following line in it:

"C:Program FilesAdobeFlex Builder 3 Plug-insdks3.0.0binasdoc" -source-path . -doc-sources .

You can copy and paste this batch file into any of your source folders, run it, and the ASDoc output will be created in the src folder.

NB: in order to get ASDoc to work at all I had to use my admin ID to elevate the priveledges of my normal ID so that it had write access to the C:Program FilesAdobeFlexBuilder folder - ASDoc seems to update a config file there, and will fail if it doesn't have access to do so.

On the bright side, the output from ASDoc is quite nice, and well worth the small amount of hassle to create.

 

Update To make life even easier you can import the batch file into your Flex project, then run it by double-clicking it

comments powered by Disqus