Kinesis SoftwareKineticFusion

[Show Table of Contents]

9 Working with ActionScript

[Hide Table of Contents]

9.5.4 Using the Class Compiler

When performing incremental development it is not necessary to continually recreate an SWF movie in order to check ActionScript classes for correctness. KineticFusion provides the facility to analyze classes for correctness without generating any code. Analyzing from the command line

Classes can be analyzed from the command line using the -check command line option. This option can take a combination of class file names, class IDs, and wildcard-enabled class IDs. Using wild cards enables a user to automatically select an entire package or arrange of sub packages to analyze. KineticFusion will apply the supplied specification to all known classes on defined class paths.

All dependent classes are always automatically analyzed.

For example to check a single class com.kinesis.Log, the command line could be:

java -jar KFDeveloper.jar -check com.kinesis.Log

To analyze all classes in the com.kinesis package the command line could be:

java -jar KFDeveloper.jar -check com.kinesis.*

To analyze all classes in or under the com.kinesis package the command line could be:

java -jar KFDeveloper.jar -check com.kinesis.**

To analyze all classes that implement a Listener interface, the command line could be:

java -jar KFDeveloper.jar -check **Listener

The class paths used can be specified on the command line using the -Dkinesis.actionscript.userClassPath=<class folder list> configuration option.

For example to analyze the com.kinesis.Log class that is located under c:\classes the command line could be:

java -Dkinesis.actionscript.userClassPath=c:\Classes -jar KFDeveloper.jar -check c:\classes\com\kinesis\

Class caching is not relevant for command line class analysis as no persistent caching of classes is carried out by KineticFusion. Analyzing using the GUI

Classes can be analyzed from the KineticFusion GUI using the Class Analyzer application panel. Using this panel, the class paths for analysis can be set up to include folder locations and SWC components. Once the class paths are set up the user can specify individual classes or sets of classes using the class ID input field. Alternatively, the full list of all known classes can be displayed and the user can selected one or more classes from this list to analyze. Once all the desired classes have been selected, the user can select the 'Analyze' Button at the base of the panel.

All output is redirected to the ActionScript warnings tab in the output panel. Class Caching

Class caching can be enabled or disabled using the system configuration option kinesis.actionscript.useCachedClasses. When enabled, classes that have been previously parsed without error (warning messages are not considered errors) will not be re-analyzed unless they or their dependent classes have been modified. However, if you are trying to reduce warning messages generated with a compiled class and you wish a class to be recompiled, the existing class cache must be cleared. To clear cached classes press the 'Clear Cached Classes' button at the base of the application panel. Classes will be able to be re-analyzed once the cache is cleared. Rebuilding Class Hierarchy

By default KineticFusion will only read the class hierarchy under each class path component once. This behaviour is defined using the kinesis.actionscript.packagesAreStable configuration option. When true, new classes that are added to a class path after it has been initially read by KineticFusion will not automatically be detected my KineticFusion. To tell KineticFusion to refresh the class hierarchy, the Menu option 'Classes->Refresh Class Hierarchy' must be selected. This will refresh all defined class paths.