I’ve been enjoying my time fighting pretty hard since yesterday with this awesome piece of c… that is ASDoc. Basically, it’s a user-friendly GUI command-line app provided with Flex sdks. Its purpose is to help give hell to the developer by automatically creating the API documentation of a project. The process is pretty much straightforward excruciating and above all the app is very reliable buggy.
Anyway, ASDoc is what people use to generate docs, and most of it it generates docs with AS classes AND MXML files. That’s a new feature of Gumbo (Flex 4) sdk and that was one of the reasons I kept fighting and not just dropped everything and simply used VisDoc. VisDoc works pretty well, is reliable, but doesn’t generate any documentation about mxml files. Also, it’s a Mac only software which is not perfect as my colleagues use Windows (idiots).
So basically the idea is to try and use ASDoc as much as the picky thing accepts to generate the documentation. And use VisDoc when it doesn’t.
The easiest (appreciate the italic) way to use it I’ve found so far was to use Eclipse’s External Tools. So, here is the walkthrough:
- Download and install the latest version of Gumbo. I am using at the moment the latest milestone version: 4.0.0.4021
Note: we are using Gumbo here only for its ASDoc app. Our projects will still remain (at least for a while) based on 3.1 / 3.2 sdks. - In Eclipse:
- In location, replace with the path of your version of the sdk. Then enter the following:
In Working Directory:${project_loc}And in Arguments:
-source-path ${project_loc}/src -doc-sources ${project_loc}/src -output ${project_loc}/asdocs -library-path “${project_loc}/libs”
-library-path “/Applications/Adobe Flex Builder 3 Plug-in/sdks/4.0.0.4021/frameworks/libs” -window-title “${project_name}” -main-title “${project_name}” -lenient
(again, replace /Applications/Adobe Flex Builder 3 Plug-in/sdks/4.0.0.4021/frameworks/libs by the correct path).
Ok, now select the root of your project in the Flex Navigator, then go run your new External Tools template (RUN > External Tools > Generate ASDoc).
And pray in the hope everything goes fine… If (miraculously) so, then you should find a brand new asdocs folder in your project with (oh, joy) the long desired documentation.
Adobe’s documentation about ASDoc and some infos about the new arguments and mxml ASDoc tags here.Related posts:
- Yet another Flash Catalyst / Builder workflow method A new attempt in solving the workflow issue between Flash...
- My LFPUG presentation about Mate A summary of my Mate presentation for the July meeting...
- Get access to Flash Catalyst preferences Flash Catalyst Beta 1 Preferences menu is not accessible? Yes...
Related posts brought to you by Yet Another Related Posts Plugin.

Subscribe





If you’re running Flex Builder 3 you could try the ANT task as mentioned in Eric Feminella’s blog.
I found I got it working fairly quickly.
http://www.ericfeminella.com/blog/2007/12/28/running-asdoc-against-air-projects/
I agree with Adam, ANT is really the way to go with ASDoc. I still can’t believe that Adobe hasn’t built this into Flash Builder yet, I mean come on we now have support for unit testing. I guess code documenting is not high on people’s list.
For the most part, I haven’t had to many issues with ASDoc. You really have to use ANT and having multiple external libraries/swcs can be a real pain to deal with in the command line part of the external tools area in Eclipse. Make sure you keep your commenting clean and you should be fine. I noticed right away that ASDoc really freaks out when you have broken/missing HTML tags in your comments.
The most important reason to run ASDoc though ANT is that if you can get your ActionScript/Flex project to compile with ANT you simply copy over that target and point it to ASDoc. This way you do all the leg work ahead of time.
Hi,
Thanks for your info.
I’m actually in the same situation: need ASDoc to generate documentation for mxml classes, but the team is still working with sdk 3.x. Could you explain how I can use the Gumbo ASDoc version with sdk 3.x? If I follow your example (and have the frameworks/lib point at the Gumbo sdk), I get a lot of errors because it is trying to complie my 3.x project with an 4.x sdk. At least, I think that that’s happening.
I tried to copy some file from Gumbo to the 3.x sdk (bin/asdoc and asdoc/) but that wasn’t very succesful.
Could you please shine a light on this issue?
Thanks!
Eugene
Well, I wish I could help but like I said already a year ago when I initially wrote this post, ASDoc is a bag of hurt and the solution I offered is, well, one year old now. Gumbo has turned into Flex 4, Flex Builder has become Flash Builder, so what was true by then is very likely not being true anymore… Maybe you should have a look at Jesse’s and Adam’s solutions as well.
Actually, Grant Skinner might have saved your day guys: check his new AIR2 application, ASDocr
You saved my day!! No, not with ASDoc, but with VisDoc – that’s how easy ASDoc should be.
I really tried, also downloaded the great ASDocr from Grant, but with anything but bloody simple stuff there was no way. My projects usually rely on other libraries, and those libraries usually are kept up to date using svn, having them in external directories (not in src), and having them as source code (not as swc). ASDoc just has no way of dealing with anything like that.
In my opinion the only way around this is a decent integration into Flash Builder (as they’ve done with compc). Anything else is a pain in the ass, and Adobe, I don’t want you to be that
Again, Gilles, thanks for pointing me to VisDoc! (How could I not know about that!)
Hehe, I must say I ended up doing that the other day for the exact same reason. Better, now VisDoc is open source!