ASDoc and Keith Peters’ FlashDevelop templates

2006 August 28th by todd anderson

… via Joa Eberts fairwell to AS3Doc

Adobe had release their ASDoc command line tool around the 11th- i was otherwise occupied, but am happy to find a way to figure documentation into Keith Peters’ FlashDevelop templates for Flex2 and As3 projects now that i am back at my computer.

( If you haven’t already, follow that link to Keith’s tutorial on adding project templates if you are interested in creating an excellent dev environment in FD and are curious about what i added to target auto-documentation in the ANT process ).

To sum it up, all i added was a couple properties to the build.properties file and a conditional target to the build.xml. The modified files are here:

build.properties
build.xml

… be aware that these are modified files downloaded from keith’s post, so if you have changed some values in the properties file on your own machine you shouldn’t explicitly replace these with your own.

[Note: it's not really actionscript code below, i'm just being lazy]

The additions to build.properties:

1 – under the project properties header…

#document titles  

docbuild=false  

doc.maintitle=templatetest  

doc.windowtitle=’template test’

_
… the docbuild property is a string boolean evaluated in a conditional in the build.xml. The others are command params found here. Remember that anything with spaces needs quotes around it, as is the value for doc.windowtitle._

2 – under the tools header…

# where you installed your documenter:  

asdoc.dir=C:/Flex_2_sdk# most of this shouldn’t need to change  

…  

documenter=bin/asdoc.exe  

…  

… where asdoc.dir and documenter are relative to where you unzipped the ASDoc – in this case i threw it into the directory of the sdk.

the additions to build.xml:

1- conditional added to the compile target:

2 – the document target

3 – antcall added to build target:

… Changing the doc.build value in build.properties to any string other than ‘true’ will cause this to not rebuild the documentation, which can be handy if you are just doing quick tests or bug finding – otherwise, if set to ‘true’ it will document any AS files recursively found in ${source.dir}.

I had a similar build made up for AS2 projects and BlDoc in FlashDevelop using ANT earlier and thought i’d have a go with it using ASDoc, maybe someone else will find this useful…

Posted in AS3, Flash.