Flash Builder 4 ASDoc Configuration

There is not a lot of information out on the net on how to configure ASDoc to work with Flash Builder 4.  Well I should clarify… there actually is some but it is kind of confusing.

Here is the official Adobe Documentation for (FB3) ASDoc

This is based on a this post by jason madsen and this post by Seb Lee-Delisle

You might think that this is a little redundant with this information out there but I am posting this as it is a slightly different way to reach a workable configuration.   I did not find it necessary to include the SWC files that Seb talks about and that while including every class you want to document in the command line would be problematic, including the base classes in the flex-config.xml file is actually very workable.   I am sure there are issues with this method as well but I wanted to make the information available.

Here are my short little instructions for how I was able to get it to work in Flash Builder 4 specifially how to set it up for a different version of the SDK (in this case 3.4)   It should be possible to set up for each version of the SDK however you must make sure that you use the correct ASDoc.exe file depending on which version of the SDK your project is compiling against….

Setup ASDoc as an external program in Flash Builder

Open the menu :  Run -> External Tools -> External Tools Configuration.

In the External Tools Configuration window, add a new program item.

Location

The location is the location of the executable which will be the asdoc.exe for the SDK you are using on the project.  This is usually located in the bin directory for the given SDK.  If you use different versions of the SDK for different projects, you should set up different shortcuts for each SDK as they are not compatible.  (i.e.  you should use the asdoc that comes with the version of the SDK with which you are compiling the project.)

Arguments

–load-config+=../flex-config.xml  -output ../docs

These arguments will cause the builder to load the remaining settings on a per project basis from the projects flex-config.xml file and output to a directory in the project root called docs.

Modify the flex-config.xml file

You will need to add or modify the doc-classes section in the flex-config.xml file for each of your projects that you wish to use the ASDoc shortcut .    You should add a reference for each class you  wish to have documented.  However, as long as document dependant classes is turned on (default) you can get by with just adding a few classes that live at the root of your project.    These will depend on your project but would typically include your model and controller classes.

It should look something like this…

<doc-classes>
<class>com.company.product.project.model.AppModel</class>    <class>com.company.product.project.control.AppController</class>
</doc-classes>

Run the ASDoc utilitity

You will need to make sure that you have a file from the given project open and are active in the document window.  You should then be able to just select  item from the menu;  Run -> External Tools -> ASDoc

Advertisement

Leave a Comment

Filed under Adobe, AIR (Adobe Integrated Runtime), Flash, Flex

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s