<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gaurav&#039;s Blog &#187; ASDoc</title>
	<atom:link href="http://gauravj.com/blog/tag/asdoc/feed/" rel="self" type="application/rss+xml" />
	<link>http://gauravj.com/blog</link>
	<description>Tips and Tools of Flex</description>
	<lastBuildDate>Thu, 18 Mar 2010 18:34:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Creating SWC files with asdoc comments..</title>
		<link>http://gauravj.com/blog/2010/01/creating-swc-files-with-asdoc-comments/</link>
		<comments>http://gauravj.com/blog/2010/01/creating-swc-files-with-asdoc-comments/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 06:36:28 +0000</pubDate>
		<dc:creator>Gaurav</dc:creator>
				<category><![CDATA[Flex Tools]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ASDoc]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[SWC]]></category>

		<guid isPermaLink="false">http://gauravj.com/blog/?p=572</guid>
		<description><![CDATA[<p>Have you tried the latest Flash Builder? If not, the latest beta can be downloaded from http://labs.adobe.com/technologies/flashbuilder4/?sdid=EUHSU</p>
<p>But if you have already tried it, you would have noticed that now ActionScript and MXML editors show ASDoc documentation when you hover over variables/method/class names. See screen shot below:
</p>
<p>This means that you can now see the documentation as you <span style="color:#777"> . . . &#8594; Read More: <a href="http://gauravj.com/blog/2010/01/creating-swc-files-with-asdoc-comments/">Creating SWC files with asdoc comments..</a></span>]]></description>
			<content:encoded><![CDATA[<p>Have you tried the latest Flash Builder? If not, the latest beta can be downloaded from <a href="http://labs.adobe.com/technologies/flashbuilder4/?sdid=EUHSU">http://labs.adobe.com/technologies/flashbuilder4/?sdid=EUHSU</a></p>
<p>But if you have already tried it, you would have noticed that now ActionScript and MXML editors show ASDoc documentation when you hover over variables/method/class names. See screen shot below:<br />
<img src="examples/ASDoc/FlashBuilder_ASDoc_Help.png" /></p>
<p>This means that you can now see the documentation as you are writing code. You can see the method/variable signature or any other documentation associated with any of the class elements. And for all this you don&#8217;t need to open the language reference in a separate browser window or search for the documentation.</p>
<p>Behind the scenes Flash Builder pulls this information from the Flex SDK swc files and the ASDoc info is stored in XML files inside the SWC files. For all nightly builds of Flex SDK, the swcs will come with these ASDoc XML files. In case you want to add similar ASDoc XML files to your custom swcs, you can do that too. Currently there is no single command to generate swc with ASDoc XML files, it is done in three simple steps. And the three steps are:</p>
<ol>
<li>Generate SWC</li>
<li>Generate doc XML Files using ASDoc tool</li>
<li>Update SWC with doc XML fIles</li>
</ol>
<p>I hope you already know how to generate a swc file. If not, take a look at <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_22.html">http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_22.html</a><br />
In order to generate the doc XML files using ASDoc tool, you will have to run the asdoc tool using <strong>-keep-xml=true</strong> and <strong>-skip-xsl=true</strong><br />
A swc file is a compressed file, so to update it (with doc XML files) you can simply use a zip command. </p>
<p>For reference, you can also look at the build.xml file in the framework project of the Flex SDK. Following is the &#8220;doc&#8221; target which performs step #2 and #3:</p>
<blockquote>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;target name=<span style="color: #ff0000;">&quot;doc&quot;</span> depends=<span style="color: #ff0000;">&quot;clean-temp-docs&quot;</span> description=<span style="color: #ff0000;">&quot;updates framework.swc with asdoc xml&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Load the &lt;asdoc&gt;</span></span> task. We can't do this at the <span style="color: #000000;">&lt;project<span style="color: #7400FF;">&gt;</span></span> level --&gt;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- because targets that run before flexTasks.jar gets built would fail. --&gt;</span></span>
		<span style="color: #000000;">&lt;taskdef resource=<span style="color: #ff0000;">&quot;flexTasks.tasks&quot;</span> classpath=<span style="color: #ff0000;">&quot;${FLEX_HOME}/lib/flexTasks.jar&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
	    <span style="color: #000000;">&lt;condition property=<span style="color: #ff0000;">&quot;asdoc.jvm.args&quot;</span> value=<span style="color: #ff0000;">&quot;-Xmx384m&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	        <span style="color: #000000;">&lt;os family=<span style="color: #ff0000;">&quot;windows&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	    <span style="color: #000000;">&lt;/condition<span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	    <span style="color: #000000;">&lt;condition property=<span style="color: #ff0000;">&quot;asdoc.jvm.args&quot;</span> value=<span style="color: #ff0000;">&quot;-Xmx512m&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	        <span style="color: #000000;">&lt;os family=<span style="color: #ff0000;">&quot;mac&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	    <span style="color: #000000;">&lt;/condition<span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	    <span style="color: #000000;">&lt;condition property=<span style="color: #ff0000;">&quot;asdoc.jvm.args&quot;</span> value=<span style="color: #ff0000;">&quot;-Xmx512m&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	        <span style="color: #000000;">&lt;os family=<span style="color: #ff0000;">&quot;unix&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	    <span style="color: #000000;">&lt;/condition<span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Call asdoc to generate dita xml files --&gt;</span></span>
		<span style="color: #000000;">&lt;asdoc output=<span style="color: #ff0000;">&quot;${FLEX_HOME}/tempDoc&quot;</span> lenient=<span style="color: #ff0000;">&quot;true&quot;</span> failonerror=<span style="color: #ff0000;">&quot;true&quot;</span> keep-xml=<span style="color: #ff0000;">&quot;true&quot;</span> skip-xsl=<span style="color: #ff0000;">&quot;true&quot;</span> fork=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		    <span style="color: #000000;">&lt;compiler.source-path path-element=<span style="color: #ff0000;">&quot;${basedir}/src&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		    <span style="color: #000000;">&lt;doc-classes class=<span style="color: #ff0000;">&quot;FrameworkClasses&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		    <span style="color: #000000;">&lt;doc-namespaces uri=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		    <span style="color: #000000;">&lt;namespace uri=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> manifest=<span style="color: #ff0000;">&quot;${basedir}/manifest.xml&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		    <span style="color: #000000;">&lt;jvmarg line=<span style="color: #ff0000;">&quot;${asdoc.jvm.args}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;">&lt;/asdoc<span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- updates framework.swc with asdoc xml --&gt;</span></span>
		<span style="color: #000000;">&lt;zip destfile=<span style="color: #ff0000;">&quot;${FLEX_HOME}/frameworks/locale/en_US/framework_rb.swc&quot;</span> update=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		    <span style="color: #000000;">&lt;zipfileset dir=<span style="color: #ff0000;">&quot;${FLEX_HOME}/tempDoc/tempdita&quot;</span> prefix=<span style="color: #ff0000;">&quot;docs&quot;</span><span style="color: #7400FF;">&gt;</span></span>
			    <span style="color: #000000;">&lt;include name=<span style="color: #ff0000;">&quot;*.*&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
				<span style="color: #000000;">&lt;exclude name=<span style="color: #ff0000;">&quot;ASDoc_Config.xml&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
				<span style="color: #000000;">&lt;exclude name=<span style="color: #ff0000;">&quot;overviews.xml&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		    <span style="color: #000000;">&lt;/zipfileset<span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;">&lt;/zip<span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;">&lt;/target<span style="color: #7400FF;">&gt;</span></span></pre></div></div>

</blockquote>
<p>So give it a try, and if you find any bugs you can log them at <a href="http://bugs.adobe.com/flex">http://bugs.adobe.com/flex</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gauravj.com/blog/2010/01/creating-swc-files-with-asdoc-comments/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Setting ASDoc description for packages</title>
		<link>http://gauravj.com/blog/2009/06/setting-asdoc-description-for-packages/</link>
		<comments>http://gauravj.com/blog/2009/06/setting-asdoc-description-for-packages/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 21:28:07 +0000</pubDate>
		<dc:creator>Gaurav</dc:creator>
				<category><![CDATA[Flex Tools]]></category>
		<category><![CDATA[ASDoc]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://gauravj.com/blog/?p=357</guid>
		<description><![CDATA[<p>So you have a lot of packages and you want to add description for all your package for ASDoc? You can use the -packages.package parameter but it can be tedious to repeat the ASDoc command line parameter (-packages.package) for each individual package. </p>
<p>Now you don&#8217;t have to repeat the parameter because you can now use the <span style="color:#777"> . . . &#8594; Read More: <a href="http://gauravj.com/blog/2009/06/setting-asdoc-description-for-packages/">Setting ASDoc description for packages</a></span>]]></description>
			<content:encoded><![CDATA[<p>So you have a lot of packages and you want to add description for all your package for ASDoc? You can use the -packages.package parameter but it can be tedious to repeat the ASDoc command line parameter (-packages.package) for each individual package. </p>
<p>Now you don&#8217;t have to repeat the parameter because you can now use the new parameter (-package-description-file) instead. </p>
<p>Using the new parameter (-package-description-file) you can now specify a xml file that contains the description for all your packages.</p>
<p>The format of the file is as follows:</p>
<blockquote><pre><code>&lt;overviews&gt;
	&lt;packages&gt;
		&lt;package name="package.name1"&gt;
			&lt;shortDescription&gt;&lt;/shortDescription&gt;
			&lt;description&gt;&lt;/description&gt;
		&lt;/package&gt;
	&lt;/packages&gt;
&lt;/overviews&gt;
</code></pre>
</blockquote>
<p>Here is a sample file (pkgDescription.xml)</p>
<blockquote><pre><code>&lt;overviews&gt;
	&lt;packages&gt;
		&lt;package name="mx.core"&gt;
			&lt;shortDescription&gt;
			&lt;![CDATA[
				The mx.core package contains the
				base classes and interfaces,
				such as UIComponent, used by Flex.
			]]&gt;
			&lt;/shortDescription&gt;
			&lt;description&gt;
			&lt;![CDATA[
				The mx.core package contains the
				base classes and interfaces,
				such as UIComponent, used by Flex.
			]]&gt;
			&lt;/description&gt;
		&lt;/package&gt;
		&lt;package name="mx.controls"&gt;
			&lt;shortDescription&gt;
			&lt;![CDATA[
				The mx.controls package contains
				the Flex user-interface controls.
			]]&gt;
			&lt;/shortDescription&gt;
			&lt;description&gt;
			&lt;![CDATA[
				The mx.controls package contains
				the Flex user-interface controls.
			]]&gt;
			&lt;/description&gt;
		&lt;/package&gt;
	&lt;/packages&gt;
&lt;/overviews&gt;
</code></pre>
</blockquote>
<p>Here is how you can use it:</p>
<blockquote><pre><code>
./asdoc -package-description-file=pkgDescription.xml
-doc-classes=mx.controls.Button
-source-path=&lt;sdk root&gt;/frameworks/projects/framework/src
</code></pre>
</blockquote>
<p>This parameter is available in <strong>Flex SDK 4 only</strong>. And the nightly build of Flex SDK 4 can be found at http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4 (choose a build after 4.0.0.8245 to use this parameter)</p>
]]></content:encoded>
			<wfw:commentRss>http://gauravj.com/blog/2009/06/setting-asdoc-description-for-packages/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>ASDoc integration with build scripts</title>
		<link>http://gauravj.com/blog/2009/06/asdoc-integration-with-build-scripts/</link>
		<comments>http://gauravj.com/blog/2009/06/asdoc-integration-with-build-scripts/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 17:34:21 +0000</pubDate>
		<dc:creator>Gaurav</dc:creator>
				<category><![CDATA[Flex Tools]]></category>
		<category><![CDATA[ASDoc]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://gauravj.com/blog/?p=328</guid>
		<description><![CDATA[<p>If you work in a team and use Flex, then you definitely use code written by other developers on your team. Wouldn&#8217;t it be nice to see the asdoc for their code the same way you see asdoc for the Flex SDK? Well now you no longer have to manually run asdoc, you can now leverage <span style="color:#777"> . . . &#8594; Read More: <a href="http://gauravj.com/blog/2009/06/asdoc-integration-with-build-scripts/">ASDoc integration with build scripts</a></span>]]></description>
			<content:encoded><![CDATA[<p>If you work in a team and use Flex, then you definitely use code written by other developers on your team. Wouldn&#8217;t it be nice to see the asdoc for their code the same way you see asdoc for the Flex SDK? Well now you no longer have to manually run asdoc, you can now leverage the &lt;asdoc&gt; ant task which is part of the Flex SDK.</p>
<p>The &lt;asdoc&gt; is available in the <strong>Flex 4 SDK only</strong> (<em>not available in Flex 3</em>). Nightly builds for the Flex 4 sdk can be downloaded from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</p>
<p>Here is an sample asdoc target that can be used in ant build file.</p>
<blockquote><pre><code>&lt;target name="asdocgen"&gt;
		&lt;!-- for svn users the flexTasks.jar is
			under &lt;sdk root&gt;/lib --&gt;
		&lt;available property="flexTasksJar"
			value="${sdk.dir}/lib/flexTasks.jar"
			file="${sdk.dir}/lib/flexTasks.jar"/&gt;

		&lt;!-- for sdk package (zip) the flexTasks.jar is
			under &lt;sdk root&gt;/ant/lib --&gt;
		&lt;available property="flexTasksJar"
			value="${sdk.dir}/ant/lib/flexTasks.jar"
			file="${sdk.dir}/ant/lib/flexTasks.jar"/&gt;

	    &lt;property name="FLEX_HOME" value="${sdk.dir}" /&gt;	

		&lt;asdoc output="${output.folder}/asdoc-output"
			main-title="My asdoc main title"
			footer="&lt;u&gt;My custom footer.&lt;/u&gt;"
			window-title="Custom asdoc documentation"
			left-frameset-width="300"
			failonerror="true" fork="true"&gt;

			&lt;packages.package name="com.test"
				description="description for com.test" /&gt;

			&lt;!-- top level class to include in asdoc.
				These should be in the source-path (src1, src2) --&gt;
			&lt;doc-classes class="com.test.CustomMain"/&gt;
			&lt;doc-classes class="com.test.Foo"/&gt;

			&lt;!-- generate asdoc for all as/mxml files in the doc-sources --&gt;
			&lt;doc-sources path-element="${basedir}/src3"/&gt;

			&lt;!-- don't try to generate asdoc for
				includeFile.as (its an include file
				and can't be independently compiled --&gt;
			&lt;exclude-sources path-element="${basedir}/src3/includeFile.as"/&gt;

			&lt;!-- source path for asdoc --&gt;
			&lt;compiler.source-path path-element="${basedir}/src1"/&gt;
			&lt;compiler.source-path path-element="${basedir}/src2"/&gt;

			&lt;!-- namespaces to include in asdoc --&gt;
			&lt;doc-namespaces uri="http://www.gauravj.com/blog/"/&gt;

			&lt;!-- namespace declaration for asdoc --&gt;
			&lt;namespace uri="http://www.gauravj.com/blog/"
			manifest="${basedir}/manifest.xml"/&gt;

			&lt;jvmarg line="-Xmx512m"/&gt;
		&lt;/asdoc&gt;
	&lt;/target&gt;</code></pre>
</blockquote>
<p>As you can see it supports all the options of command line asdoc (doc-classes, doc-sources, doc-namespaces, source-path, etc.). So you can now write ant targets for your asdoc generation.</p>
<p>If you face any issues or have any feedback, you can log bugs at http://bugs.adobe.com/flex</p>
]]></content:encoded>
			<wfw:commentRss>http://gauravj.com/blog/2009/06/asdoc-integration-with-build-scripts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ASDoc for Flex SDK Builds</title>
		<link>http://gauravj.com/blog/2009/06/asdoc-for-flex-sdk-builds/</link>
		<comments>http://gauravj.com/blog/2009/06/asdoc-for-flex-sdk-builds/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 04:01:30 +0000</pubDate>
		<dc:creator>Gaurav</dc:creator>
				<category><![CDATA[Flex Tools]]></category>
		<category><![CDATA[ASDoc]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://gauravj.com/blog/?p=136</guid>
		<description><![CDATA[<p>Do you work with the SDK nightly builds or the Flex SDK svn repository? If yes, then you have probably faced the situation where the flex public language reference is slightly older (compared to the nightly builds). If you are working with some new APIs then you obviously want to look at the latest asdoc. </p>
<p>Here <span style="color:#777"> . . . &#8594; Read More: <a href="http://gauravj.com/blog/2009/06/asdoc-for-flex-sdk-builds/">ASDoc for Flex SDK Builds</a></span>]]></description>
			<content:encoded><![CDATA[<p>Do you work with the SDK nightly builds or the Flex SDK svn repository? If yes, then you have probably faced the situation where the flex public language reference is slightly older (compared to the nightly builds). If you are working with some new APIs then you obviously want to look at the latest asdoc. </p>
<p>Here is what you can do:<br />
1. Go to the root folder of your local SDK (doesn&#8217;t matter if you are using a SDK zip or the public svn repository)<br />
2. Run the command:<br />
<em><strong>ant asdoc</strong></em></p>
<p>This command will generate the asdoc for all projects that are part of the Flex SDK, and the documentation (in html format) will be created in a folder named <em>&#8220;asdoc-output&#8221;</em> inside the sdk root folder. It takes around 7-8 minutes, so have patience (it is going through a lot of source files in the SDK <img src='http://gauravj.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) </p>
<p>It is also a good option if you sometimes work offline or can&#8217;t access internet for some reason.</p>
<p>Couple of caveats:<br />
1. It only works from the SDK root folder<br />
2. Only available in builds for FLEX 4.<br />
3. You will get the documentation only for projects that are in the FLEX SDK, so don&#8217;t freak out when you don&#8217;t see the documentation for Flash Player classes or charting classes etc. </p>
<p>You can grab the latest nightly builds from http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</p>
]]></content:encoded>
			<wfw:commentRss>http://gauravj.com/blog/2009/06/asdoc-for-flex-sdk-builds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
