ASDoc compiling error in Flash Builder 4
I can't seem to figure out why i continue getting this error every-time I try to compile ASDoc in Flash Builder 4.
I did succeed in ASDoc creating a asdoc-output folder but it is incomplete. There is only toplevel.xml and a tempdita folder that show up.
This is the error that shows up on my Console
Error at xsl:choose on line 46 of processHTML.xslt: java.io.FileNotFoundException: /Users/NEWYORK/abritez/Documents/workspaces/ate/ATE_Shell/asdoc-output/index.tmp (No such file or directory) at xsl:apply-templates (file:/Users/NEWYORK%5Cabritez/Documents/workspaces/ate/ATE_Shell/asdoc-output/tempdita/processHTML.xslt#25) processing /html Transformation failed: Run-time errors were reported
Line 46 is in ProcessHTML.xslt is the initial <xsl:choose>
in the element bellow.
<xsl:template match="html">
<xsl:copy-of select="$noLiveDocs"/>
<xsl:choose>
<xsl:when test=".//frameset">
<xsl:copy-of select="$frameDocType"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$docType"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$isLiveDocs"/>
<xsl:otherwise>
<xsl:value-of select="$markOfTheWeb"/>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="html">
<xsl:apply-templates/>
<xsl:copy-of select="$copyrightComment"/>
<xsl:value-of select="$newline"/>
</xsl:element>
</xsl:template>
I went to External Tool Configuration and added the location of asdoc
/Applications/Adobe Flash Builder 4/sdks/flex_sdk_4.1/bin/asdoc
then i added my Working Directory
${workspace_loc:/ATE_Shell}
And lastly I inserted all my arguments
-lenient -source-path src -doc-sources src -external-library-path=/Users/NEWYORK\abritez/Documents/workspaces/ate/ActivityToolkitLib/bin/ActivityToolkitLib.swc -external-library-path=/Users/NEWYORK\abritez/Documents/workspaces/ate/ATE_Template/bin/ATE_Template.swc -external-library-path=/Users/NEWYORK\abritez/Documents/workspaces/ate/AssesmentCommunicati开发者_StackOverflow中文版onLib/bin/AssesmentCommunicationLib.swc -external-library-path=/Users/NEWYORK\abritez/Documents/workspaces/ate/BFW_UI/bin/BFW_UI.swc -external-library-path=/Users/NEWYORK\abritez/Documents/workspaces/ate/DiagnosticReporter/bin/DiagnosticReporter.swc
UPDATE: I ended up rolling back to 3.5 and did a test application with only one method to document and got this error.
My method
package com.test
{
import mx.containers.Canvas;
public class Grouptest extends Canvas
{
public function Grouptest()
{
super();
}
/**
* Hello
*
* @param value Some string
* */
public function set testMe(value:String):void
{
trace("value " + value)
}
}
}
My Error
Loading configuration file /Applications/Adobe Flash Builder 4/sdks/3.5.0/frameworks/flex-config.xml Adobe ASDoc Version 3.5.0 build 12683 Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved. Error: '' is not a directory Use 'asdoc -help' for information about using the command line
Any help or point to the right direction would be greatly appriciated. I've gotten ASDoc running in the past so I am sure I must be overlooking something.
ASDoc is notoriously bad at reporting errors and giving red herrings.
The following was suitable for Flex 3. I assume that it is still appropriate for Flex 4.
Main thing to remember is that ASDoc only does one pass, unlike the compiler which does (at least) two. This exposes issues that the Compiler hides for you, classically if you declare something as bindable but don't make the class an IEventDispatcher, the compiler cheats for you on the first pass, but ASDoc will simply fail.
Another common issue is file not founds when using tags like @see. If you've named the path wrong, ASDoc used to fall over and not generate.
Third most common problem in my experience is malformed html tags. Forgetting to add the
or adding HTML tags into ASDoc tags which don't accept them.Sadly, because ASDoc is SO bad at reporting these errors and doesn't gracefully handle mistakes, its a royal nightmare to find where the problem is without going over the code line by line...
I realize you're dealing with 4, but I ran into the same issue with 3.5 so the following may apply:
This is happening because the asdocs folder, and more importantly asdocs/templates folder wasn't included in the 3.5 distribution of the Flex SDK. Simply copy asdocs from 3.4 or another 3.x sdk and it'll work.
http://michael.omnicypher.com/2011/05/flex-35-and-using-asdocs.html
I had this same problem. I finally found a random post about this same issue and that fixed it for me.
Another time black hole with asdoc generation
[asdoc] [Fatal Error] toplevel.xml:90:2: The content of elements must consist of well-formed character data or markup.
[asdoc] Error: Could not create toplevel.xml: The content of elements must consist of well-formed character data or markup.
This one is caused by a random character in your asdoc comments that the parser doesn’t like. In my case a couple of < or > along with a @.
精彩评论