AsDoc with Eclipse
July 10th, 2008 • ActionScript, Flash
If you don’t like to use Ant for generating your ActionScript docs you can create an External Tools Configuration in Eclipse (or Flex Builder).
overview
step-by-step
1. Open External Tool Dialog

2. Create new configuration for “Run a program”

3. Location
Click “Browse File System” to insert the location of your AsDoc tool. It’s included in the Flex SDK “flex_sdk_3/bin/asdoc” (or “flex_sdk_3/bin/asdoc.exe” for Windows).

4. Working Directory
This is your projects root directory. Click “Browse Workspace” if your project is available in Eclipse (or Flex) or “Browse File System” to locate your project somewhere on your harddrive.

5. Arguments
You have to insert all the needed AsDoc comands here, e.g. ‘ -doc-sources ./src -output ./doc -main-title “Test API” -window-title “Test API” ‘. You can find more about the AsDoc commands in the Flex docs

6. Run
You’re done. Whenever you launch this configuration it generates the docs in the specified folder.
9 Responses (Add Your Comment)
-
-
nextgenapp August 15, 2009at 12:13 am
great description. works great.
-
Hi – My project has references to several movieClips set to export as classes in a swc file. When I try to build documentation using AsDoc I get several errors saying “Type was not found or was not a compile-time constant” or “Call to a possibly undefined method” for all the movieClip instances. The project compiles fine without any errors though.
Any suggestions on how to fix this AsDoc problem?
-
I haven’t tried it yet, but could this work? This way you could re-use the same tool on different projects, depending on which project you have currently selected.
-doc-sources ./src -output ./doc -main-title “${project_name} Documentation” -window-title “${project_name} Documentation”
-
Hello Martin,
This is a very helpful post. I don’t know how to use asdoc at the moment, so I ran into trouble when documenting my current project.
I am using Flash Player 10 classes and did set the external-library-path so that’s fine. I am using MinimalComps(dependency) in my project so I’ve set -exclude-dependencies, but this causes an Error. It seems I cannot use both -ds/-doc-sources and -exclude-dependencies:
“Error: exclude-dependencies can not be used with doc-sources.”
My arguments look like this: -output ./doc -source-path ./src -library-path ./lib -main-title “${project_name}” -window-title “${project_name}” -external-library-path “/Applications/FDT/plugins/com.powerflasher.fdt.shippedFlexSDK4_4.0.0.14159_1000/flex/frameworks/libs/player/10.0/playerglobal.swc” -exclude-dependencies -ds ./src
How can I generate the documentation ?
I’ve also tried using -doc-classes and adding the full class names, but I get another error:
oading configuration file /Applications/FDT/plugins/com.powerflasher.fdt.shippedFlexSDK4_4.0.0.14159_1000/flex/frameworks/flex-config.xml
_654c83ca96a62fe72776d64d86c4163b9683d1818934514561acf824b0fbf8e5_mx_core_FlexModuleFactory.as(26): col: 16 Error: Interface IFlexModuleFactory was not found.implements IFlexModuleFactory, ISWFContext
^_654c83ca96a62fe72776d64d86c4163b9683d1818934514561acf824b0fbf8e5_mx_core_FlexModuleFactory.as(26): col: 36 Error: Interface ISWFContext was not found.
implements IFlexModuleFactory, ISWFContext
^Any hints ?

Description is spot on and worked like a charm!
Thank you