[Qt-creator] Extract call graph from QtCreator(2)
欧三股四
549088764 at qq.com
Sun Oct 20 02:01:31 CEST 2013
Many Thanks for Nikolai Kosjar's help in my last e-mail. However, as the code of QtCreator is the largest one I have ever encountered and there's few articles about it on the Internet, I have to get more details before I start.
Actually, I want to add a visualization module to QtCreator, which is similar to the CodeMap plugin in Eclipse JDT.
As you can see above, the plugin visualize the code as a map. An island means a cluster of similar files, the red marks indicate the places where a symbol appears, and the arrows mean the call graph of a function.I think this visual metaphor will help when we navigate the code, and I want to introduce it into QtCreator.
Specifically, I want to take the following steps:
1. I extract all call graphes of functions
2. Do some clustering on the graph
3. Map the graph to 2D.
Now, I want to scan all the project files(include .h, .cpp) and in every function, find out which functions it calls in order. I think traverse the AST is a choice. Here's my problem:
1. How can I get the AST ?
2. How to filter the symbols I need(For example: all functions)?
3. Is there any other efficient way to do this?
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20131020/98cd77cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C85C786C at 22433F6B.5B1D6352.jpg
Type: image/jpeg
Size: 187550 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20131020/98cd77cc/attachment.jpg>
More information about the Qt-creator
mailing list