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
Flex Library AsDoc Demo 查看我的博客<Flex AsDoc 完整版>,有详细的Flex Library AsDoc说明
ASDoc生成ActionScript的API类文档 ASDoc生成ActionScript的API类文档 ASDoc生成ActionScript的API类文档
NULL 博文链接:https://damoqiongqiu.iteye.com/blog/1481207
此文档主要是用于讲述ASDoc中各种标签的作用,文档中附有详细的说明和插图能够让您更加容易理解。
asdoc.zip flex
用于制作并生成as3 api 帮助手册chm的项目源码,把adobe官方的离线文档生成chm手册用,给有需要的朋友。
以flexbuilder为例,在你安装的目录下X:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\asdoc\templates。改文件夹就是控制稳定框架本地化的。你只要办里面的相关文字翻译为中文就可以了。关联文件就是xsl格式的...
咕as声一个Grunt任务插件,用于为Adobe Flex / ActionScript / MXML / FLV / etc生成文档。 Apache / Adobe Flex SDK中带有asdoc工具的应用程序。入门这个插件需要~0.4.2 如果您以前从未使用过 ,请务必查看...
Flex Realspace产品在sp3时上线,急需制作帮助文档,由于在开发的时候没有考虑后期的帮助文档,查了很多资料,希望通过ASDoc达成愿望,感兴趣的朋友可以了解下,或许对你有所帮助
从技术上来讲,Flex 框架的不是一个黑盒子,你可以阅读和查看它的所有源码。由于代码 的复杂性及它是如何设计的,我们往往把框架看成是如何输入、得到什么样的输出。大多数 开发人员,包括作者,往往在工作中学习...
非常全的flex 学习文档 目录 第 1 章 : 关于 Flash Builder 使用 Flash Builder 可以完成的工作 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
教案ASDoc标签材料.pdf
ASDoc标签知识点.pdf
flex3的cookbook书籍完整版dpf(包含目录),目录... 使用ASDoc和Ant生成文档 25.11节. 使用Rake编译Flex应用程序 25.12节. 使用ExpressInstall 25.13节. 使用Flex Builder 3的Memory Profiling查看内存快照 第二十六章...
apache-flex-sdk-4.9.0-asdocs
sina-microblog-api-asdoc-rc.zip
Flex 4概述 (与学习资源) MXML 2009 新增MXML标签 改进的视图状态 (1) 改进的视图状态 (2) MXML图形元素与FXG Spark组件架构 Spark容器 Spark布局模型 Spark动画和特效组件 Pixel Bender集成 Spark文本...
3.4 自动生成EventHandler 3.5 条件断点 第四章 Flex SDK 4 新特性 4.1 主题 4.2 布局 4.3 特效 4.4 样式 4.5 状态 4.6 双向绑定 4.7 ASDoc 4.8 SWFObject 与 HTML Template 第五章 自定义组件开发 5.1 ...