Static Actionscript code analysis possibilities

2019-01-10 09:11发布

I want to see class, function and variable/property, dependencies visually, like NDepend, but for ActionScript 2 or AS3 code.

Any programs or ideas?

Use doxygen in some way?

FlexUnit?

6条回答
在下西门庆
2楼-- · 2019-01-10 09:22

At runtime you an also get information about individual classes via the describeType method (Part of flash.utils). It returns an XML document that describes the class you give to it.

查看更多
仙女界的扛把子
3楼-- · 2019-01-10 09:30

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.

Still, could be of some use

LinkReportAIR

查看更多
ゆ 、 Hurt°
4楼-- · 2019-01-10 09:32

ItDepends, a Visual browser for class and package dependencies in Flex applications.

It lacks the visualization capabilities of NDepends but its a big step up from trying to make sense of link reports. Its source is there so if one was sufficiently motivated it could be extended with visualizations.

查看更多
Deceive 欺骗
5楼-- · 2019-01-10 09:35

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.

See Examining Linker Dependencies from the Flex 3 documentation for more information.

查看更多
对你真心纯属浪费
6楼-- · 2019-01-10 09:36

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).

Thereafter you could probably get a nice result if you have a play with graphviz (http://www.graphviz.org/Resources.php).

Automating it all via ANT and you're sorted ; )

查看更多
狗以群分
7楼-- · 2019-01-10 09:42

Update Nov 2018:

It would appear that Structure101 (new download page) no longer has an ActionScript variant.

Original answer, links outdated:

Download Structure101g and select the Actionscript flavor after installing the software.

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.

Take a look at the attached screenshot.

(non-SSL link dead: i40.tinypic.com/e8qptu.png)

Hope that helps.

查看更多
登录 后发表回答