I’ve basically spent about a day working out how to use ASDoc, and all I can say is, what a nightmare! If I wanted this kind of unintuitive, problem-ridden, poorly-documented ridiculousness I’d be a Linux user! (no offense meant, but you Linux guys seem to thrive on this sort of thing!)
Excluding external libraries
Our project has loads of external classes in libraries (one is papervision, others are various Plug-in Media libs), and I really would rather it didn’t try to document them all in the same documentation. And I couldn’t figure out how to stop ASDocs from trying to compile the classes in these libraries.
And if you don’t include the libraries, ASDoc fails badly! So I could either include them in to the docs (which seemed to break anyway) or just exclude them. But is there a way to exclude them?
It turns out that there is, and that is to list every class that you want to exclude! Er yeah that’s probably about 2,000 classes so not going to happen!
Although there is a handy way to generate this HUGE list of classes using the AIR app Dita. But I think I’ve kinda worked out how to use ASDocs now in a way that stops you needing to do that.
Adding external swcs
The big secret that no one seemed to be telling me! If you add a swc file it no longer fails to find the classes you’re referring to. But most importantly it doesn’t try to write docs for them!
So here’s how we set it up :
Step 1 : Set up an external tool in Flex.
Open Flex Builder (we’re using FB 3). See that little green play button with a suitcase on it? In the top left? Click on the down arrow next to it and then “Open external tools dialog”.
Step 2 :
Click on the “New Launch Configuration” Button. it’s the white sheet of paper with a “+” on it.
Step 3 : Find your asdoc file.
Give it a name. Maybe ASDocs or something equally unimaginative. Then set up the Location field; click on Browse File System and find your ASDoc file in the Flex SDK. For me it was in /Applications/Flex Builder 3/sdks/4.0.0.4021/bin/asdoc. If you’re on a PC you should probably point to asdoc.exe.
Step 4 : Point to the project folder.
In the “Working Directory” field, type ${project_loc} – this will point to the project folder for whichever project you are currently in.
Step 5 : Set up the arguments.
in the arguments field point to your source path with the following two arguments :
-source-path src
-doc-sources src
This assumes that you set up your projects with the default source folder called src. So it’ll look into your project folder’s src to find all the classes to make docs for.
And then add arguments to point to the swcs for your library projects, for us it’s :
-external-library-path=/Users/seb/Documents/FBWorkspace/PluginLibs/bin
-external-library-path=/Users/seb/Documents/FBWorkspace/PluginBrain/bin
-external-library-path=/Users/seb/Documents/FBWorkspace/Papervision3D/bin
Of course this assumes that you use library projects in Flex Builder. I guess this will work as long as you have swcs for your code library. Either way you need to point at it.
I’m sure that this won’t work for all of you but I haven’t seen this approach documented anywhere so I thought it may help. And good luck!
thanks:
http://sebleedelisle.com/2009/03/how-to-set-up-asdoc-in-flex-builder/
相关推荐
Flash-Builder-里利用ASDOC生成在线API文档配置.doc
AsDoc是Adobe Flex SDK中的一个工具,用于生成ActionScript、Flex组件和其他Flex项目的API文档。它以类似于JavaDoc的方式工作,通过解析源代码注释来创建专业的、易于阅读的HTML文档。 在Flex开发中,创建清晰的API...
### ASDoc生成ActionScript的API类文档 #### 一、简介 随着软件项目的规模逐渐增大,维护和协作的需求也日益凸显。为此,编写详细的API文档成为了一项必不可少的任务。Adobe官方提供了一个强大的工具——ASDoc,它...
`asdoc`是Adobe Flex SDK提供的一款工具,专门用于生成ActionScript和Flex项目的API文档。这篇博客“终于成功使用asdoc生成了文档”可能详细记录了博主在使用asdoc过程中遇到的问题及解决方案,虽然具体的博客内容未...
本篇文章将详细探讨ASDoc和Flex之间的紧密关系,以及如何利用ASDoc提升Flex项目的开发效率。 一、ASDoc简介 ASDoc是ActionScript文档生成器的缩写,它能够从ActionScript源代码中提取类、方法、属性等元数据,并...
【标题】"生成AS3版CHM官方文档项目完整源码"所涉及的知识点主要集中在ActionScript 3(AS3)编程语言、Adobe ASDoc工具和CHM(Microsoft Compiled HTML Help)格式上。 ActionScript 3是Adobe Flash Platform的...
下面我们将深入探讨Flex SDK和ASDoc的主要概念、功能和重要性。 **Flex SDK概述** Flex SDK是Adobe开发的一个工具集合,它允许开发者使用ActionScript 3.0编程语言和Flex框架创建交互式的、基于Web的应用程序。这个...
生成的文档默认是全英文的,如果需要汉化文档,可以修改FlexBuilder安装目录下的asdoc/templates文件夹里的模板文件,添加或替换为公司自己的图标和汉化内容。 在使用ASDoc的过程中,还需要特别注意源代码注释的...
状态管理和ASDoc的改进对于文档生成和团队协作提供了便利。另外,运行时共享库和本地化功能的增强,使得Flex4更适合大型、多语言的应用开发。 Flash Builder 4作为Flex4的主要开发工具,提供了两种安装选项:...
这个版本可能是针对Flex项目的ASDoc生成器,可以帮助开发者自动生成清晰的API文档,方便团队协作和后期维护。 4. Readme.txt:这是一个重要的文件,通常包含安装和使用工具的说明。在这个场景下,安装Flex格式化...
### Flex3与Flex4对比分析 #### 一、概述 ...对于希望利用最新技术和工具进行开发的团队来说,Flex4无疑是一个更好的选择。然而,具体选择哪个版本还需要根据项目的具体需求和技术团队的能力来进行决策。
【标题】"sina-microblog-api-asdoc-rc.zip" 涉及的主要知识点是新浪微薄API的ASDoc文档,这是一种针对ActionScript开发者的官方接口文档。...ASDoc生成的文档将帮助他们理解和利用API的各项功能,提高开发效率和质量。
- ASDoc的使用:学习如何通过ASDoc生成清晰的ActionScript API文档,以便于团队成员之间交流和后续的代码维护。 - 自动化工具:掌握如何利用自动化工具提升开发效率,例如代码格式化、代码检查和构建工具。 - 版本...
以flexbuilder为例,在你安装的目录下X:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\asdoc\templates。改文件夹就是控制稳定框架本地化的。你只要办里面的相关文字翻译为中文就可以了。关联文件就是xsl格式的...