3 Replies Latest reply on Sep 7, 2009 10:41 PM by leybniz

    Generate a list of all classes, methods and parameters for ActionScript

    Abobo

      I would like to add some code completion for ActionScript to another editor (besides FlexBuilder).

       

      In order to do this I need a list of:

      1.  All ActionScript classes.

      2.  Methods for each class.

      3.  Optional, but preferred, a list of parameters for each method.

       

      I have seen some code written in Flex to generate output.  This Google Code (http://code.google.com/p/xsd4mxml/downloads/list) will build an XML document which can be used to build completion for MXML.

       

      I am ok writing Flex apps, but I never get down deep and dirty like I need to do figure out if Flex can provide this information via some form a meta classes / data.

       

      Is anyone aware of:

      1.  A full list of all the data I need (already available somewhere).

      2.  A simple Flex program which can generate the data I am looking for?

      3.  Some general suggestions.

      4.  Other sources or questions of similar nature (google searches have revealed little).

       

      Thanks for any feedback.

      Dave

        • 1. Re: Generate a list of all classes, methods and parameters for ActionScript
          leybniz Level 4

          Dig into asdoc utility, it's capable to generate xml classes map for you, just pass Flex SDK classes folders as params..

          asdoc is producing xml data transformable via xsl sheets to html stuff, hope this helps ))

          • 2. Re: Generate a list of all classes, methods and parameters for ActionScript
            Abobo Level 1

            Thanks for the response, I think that will get me what I need.

             

            I downloaded the source for the 3.4 release of the SDK.

             

            When I attempt to run asdoc, I get error after error.

            Just wondering if anyone has been able to successfully run asdoc.

             

            asdoc -source-path C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\frame work\src -doc-sources C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\frame work\src -main-title "Flex API Documentation" -window-title "Flex API Documentation" -output C:\test\flex\classes_doc

             

             


            C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\framew ork\src\mx\styles\me
            tadata\AnchorStyles.as: Error: A file found in a source-path must have an externally visible definition. If a
            definition in the file is meant to be externally visible, please put the definition in a package.

            C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\framew ork\src\mx\styles\me
            tadata\SkinStyles.as: Error: A file found in a source-path must have an externally visible definition. If a de
            finition in the file is meant to be externally visible, please put the definition in a package.

            C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\framew ork\src\mx\core\IDis
            playObjectInterface.as(22): col: 18 Error: Function does not have a body.

                function get root():DisplayObject;
                             ^

            C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\framew ork\src\mx\core\IDis
            playObjectInterface.as(28): col: 18 Error: Function does not have a body.

                function get stage():Stage;
                             ^

            C:\download\Adobe\Flex\flex_sdk_3.4.0.9271_mpl_only_open_source\frameworks\projects\framew ork\src\mx\core\IDis
            playObjectInterface.as(34): col: 18 Error: Function does not have a body.

                function get name():String;
                             ^

             

            These errors are repeated over and over again to eventually.

             

            Loading configuration file C:\Programs\Adobe\FlexBuilder3\sdks\3.3.0\frameworks\flex-config.xml
            Encountered too many errors!

             

             

            Any ideas on how to run this successfully against the full SDK?

             

            TIA,

            Dave

            • 3. Re: Generate a list of all classes, methods and parameters for ActionScript
              leybniz Level 4

              Try to exclude classes having errors from being used by asdoc, not literally all of them can be accessed, but only published ones via namespace mx:*

              as well consider asdoc "strict" option, anyway this method is realy tricky, but if you can handle it you'll have everything you want...