简体   繁体   English

静态动作脚本代码分析的可能性

[英]Static Actionscript code analysis possibilities

I want to see class, function and variable/property, dependencies visually, like NDepend , but for ActionScript 2 or AS3 code. 我想像NDepend那样直观地看到类,函数和变量/属性,依赖项,但适用于ActionScript 2或AS3代码。

Any programs or ideas? 有什么计划或想法吗?

Use doxygen in some way? 以某种方式使用氧气

FlexUnit? FlexUnit?

Update Nov 2018: 2018年11月更新:

It would appear that Structure101 ( new download page ) no longer has an ActionScript variant. 似乎Structure101( 新的下载页面 )不再具有ActionScript变体。

Original answer, links outdated: 原始答案,链接已过期:

Download Structure101g and select the Actionscript flavor after installing the software. 安装软件后,下载Structure101g并选择Actionscript版本。

I've confirmed that it is able to map out class level and even function call dependencies in Flex/AS3 projects, and generate a visual map of the same. 我已经确认它能够在Flex / AS3项目中映射出类级别甚至函数调用依赖项,并生成相同的可视化映射。

Take a look at the attached screenshot. 看一下所附的屏幕截图。

(non-SSL link dead: i40.tinypic.com/e8qptu.png) (非SSL链接无效:i40.tinypic.com/e8qptu.png)

Hope that helps. 希望能有所帮助。

Far from a complete solution, but to start you may want to use flex SDK ASDoc to generate the class path structure in a single XML (thanks to the -keep-xml -skip-xsl arguments). 距离完整的解决方案还很远 ,但是从一开始,您可能想使用flex SDK ASDoc在单个XML中生成类路径结构(由于使用了-keep-xml -skip-xsl参数)。

Thereafter you could probably get a nice result if you have a play with graphviz ( http://www.graphviz.org/Resources.php ). 此后,如果您使用graphviz( http://www.graphviz.org/Resources.php ),可能会得到不错的结果。

Automating it all via ANT and you're sorted ; 通过ANT自动化一切,您便得到排序; )

ItDepends , a Visual browser for class and package dependencies in Flex applications. ItDepends ,一个可视浏览器,用于Flex应用程序中的类和包依赖项。

It lacks the visualization capabilities of NDepends but its a big step up from trying to make sense of link reports. 它缺乏NDepends的可视化功能,但是比试图理解链接报告有了很大的进步。 Its source is there so if one was sufficiently motivated it could be extended with visualizations. 它的来源就在这里,因此如果有足够的动力,可以通过可视化进行扩展。

I was going to post a link to Big Kahuna Burger's Link Report Visualizer, but I see that darrinm has found a much better tool. 我打算发布一个指向Big Kahuna Burger的链接报告可视化工具的链接,但是我发现darrinm找到了一个更好的工具。

Still, could be of some use 仍然可能有用

LinkReportAIR LinkReportAIR

The Flex SDK compilers have a -link-report argument that will give you some good information about the classes compiled into the SWF and their dependencies. Flex SDK编译器具有-link-report参数,它将为您提供有关编译到SWF中的类及其依赖项的一些很好的信息。

See Examining Linker Dependencies from the Flex 3 documentation for more information. 有关更多信息,请参阅Flex 3文档中的检查链接器依赖项

At runtime you an also get information about individual classes via the describeType method (Part of flash.utils). 在运行时,您还可以通过describeType方法(flash.utils的一部分)获取有关各个类的信息。 It returns an XML document that describes the class you give to it. 它返回描述您提供给它的类的XML文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM