Skip navigation
Marvin Velo
Currently Being Moderated

Docs folder on SWCs....

Jun 8, 2009 5:54 PM

I notice on flex SDK 4.0.0.7219 a docs folder.

 

How can I generate this docs for my own SWCs?

 

Asdoc? Does it need any special parameter?

 

 

VELO

 
Replies
  • Currently Being Moderated
    Jun 9, 2009 11:27 AM   in reply to Marvin Velo

    Hi VELO,

     

    Yes, we generate the docs using asdoc. The xml files are consumed by Flash builder to show asdoc in the editor.

     

    If you run asdoc with -keep-xml=true and -skip-xsl=true, it will generate the xml files and then you will have to manually package them into the swc.

     

    For reference you can look at the build.xml for the framework project in svn trunk.

     

    It looks like:

     

        <target name="doc" depends="clean-temp-docs" description="updates framework.swc with asdoc xml">
            <!-- Load the <asdoc> task. We can't do this at the <project> level -->
            <!-- because targets that run before flexTasks.jar gets built would fail. -->
            <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/>

     

            <condition property="asdoc.jvm.args" value="-Xmx384m">
                <os family="windows"/>
            </condition>

     

            <condition property="asdoc.jvm.args" value="-Xmx512m">
                <os family="mac"/>
            </condition>

     

            <condition property="asdoc.jvm.args" value="-Xmx512m">
                <os family="unix"/>
            </condition>

     


            <!-- Call asdoc to generate dita xml files -->
            <asdoc output="${FLEX_HOME}/tempDoc" lenient="true" failonerror="true" keep-xml="true" skip-xsl="true" fork="true">
                <compiler.source-path path-element="${basedir}/src"/>
                <doc-classes class="FrameworkClasses"/>
                <doc-namespaces uri="http://www.adobe.com/2006/mxml"/>
                <namespace uri="http://www.adobe.com/2006/mxml" manifest="${basedir}/manifest.xml"/>
                <jvmarg line="${asdoc.jvm.args}"/>
            </asdoc>

     

            <!-- updates framework.swc with asdoc xml -->
            <zip destfile="${FLEX_HOME}/frameworks/locale/en_US/framework_rb.swc" update="true">
                <zipfileset dir="${FLEX_HOME}/tempDoc/tempdita" prefix="docs">
                    <include name="*.*"/>
                    <exclude name="ASDoc_Config.xml"/>
                    <exclude name="overviews.xml"/>
                </zipfileset>
            </zip>
        </target>

     

        <target name="clean-temp-docs">
            <delete dir="${FLEX_HOME}/tempDoc" failonerror="false" includeEmptyDirs="true"/>
        </target>

     

    Thanks,

    Gaurav Jain

    Flex SDK Team

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 9, 2009 2:44 PM   in reply to Marvin Velo

    Flex 4.

     

    Its not in Flex 3.x

     

    -Gaurav

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 9, 2009 3:36 PM   in reply to Marvin Velo

    Not sure.

     

    You are getting this error for a particular swc?

     

    -Gaurav

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 11, 2009 8:59 PM   in reply to Marvin Velo

    No, FB doeesn't look for sources inside the swc.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 7:31 AM   in reply to Marvin Velo

    How did you try to include the DITA xmls? The SDK uses xalan.jar for transformations.

     

    Thanks,

    Gaurav

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 7:59 AM   in reply to Marvin Velo

    >> I do rename all jars when I include they on maven environment.  Can that be related to the problem?

     

    Yes, that could be the issue. The manifest file for asdoc.jar has entry for xalan.jar

     

    -Gaurav

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 8:28 AM   in reply to Marvin Velo

    No coded reference to xalan.

     

    btw. when you have -skip-xsl=true, saxon should not even be in the picture. It is used for xslt transformation.

     

    So there is something wrong with your classpath settings.

     

    -Gaurav

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 8:35 AM   in reply to Marvin Velo

    The SDK does not uses saxon9-dom.jar

     

    Take a look at the manifest file inside asdoc.jar, and make sure all jars listed there are present in your classpath.

     

    -Gaurav

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points