Author |
Topic |
|
meissnersd
Senior Member
34 Posts |
Posted - Jun 17 2007 : 1:55:28 PM
|
On thing that is really hard is understanding large code bases. This is a common problem when starting on a new project. Often there is a large legacy code base.
Since you have parsed the files and symbols already, how about a call graph visualizer. It would be really nice to see what methods call each other in tree form. Other useful views: Inheritance of course Object membership view. What objects contain other objects. Include file hierarchy.
|
|
sl@sh
Tomato Guru
Switzerland
204 Posts |
Posted - Jun 18 2007 : 07:21:41 AM
|
@call graph: this wouldn't work the moment you invoke virtual functions since VA wouldn't know which implementation would be used at runtime.
@inheritance: check out the Object Browser from the IDE's view menu.
@membership tree: similar to call graphs, expansion would be impossible the moment you encounter pointers or references to base classes. VA wouldn't know what class the reference or pointer really points to.
@include file hierarchy: see this thread: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=6384 |
|
|
meissnersd
Senior Member
34 Posts |
Posted - Jun 18 2007 : 2:33:13 PM
|
I don't see why you think it "wont work" with virtual functions. The compiler doesn't know where the code will go until run time when the object is passed in the the overriden method gets invoked. That is a complicated situation. You need to show that complexity in the call graph browser.
Code analysis is complex....that is why I see an opportunity for a good tool to help me. :-)
If it was simple I would not need a tool.
The same argument applies to a membership graph.
This is a common problem with any call graph visualizer. The tree can get really big and bushy. You need a graph browser that can be little smarter, that can only show a portion of the tree the user is interested in.
I guess my point is that Visual Assist X already had done a lot of the hard work of being able to understand the code.
A GUI to visualize it would be a really useful tool.
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 18 2007 : 4:26:41 PM
|
Just taking virtual functions for a moment, consider a GUI framework where you create forms by deriving your own classes from the GUI framework base classes, over-riding virtual functions in the base class.
Once you get beyond a trivial application this part alone gives you a massive number of classes... and remember that often the actual type create is determined at run time, in response to user interaction, or some other external variable.
I agree that a good tool to handle all of this information, and help you see what is going on would be very useful. At the same time I have some idea of how far away from this VA is... it is all of the "edge" cases, all of the things that still manage to confuse our parser, especially when you get into macro's. |
zen is the art of being at one with the two'ness |
|
|
meissnersd
Senior Member
34 Posts |
Posted - Jun 20 2007 : 2:22:34 PM
|
Ok I can understand it being hard to implement
But check out doxygen. Is is a well known open source C++ code comment extractor. You can configure it to generate call graphs and object dependency graphs along with the comments. But it is really slow and the diagrams are off embedded in a html tree.
I was just thinking using Visuall assist x would be better since you can parse on the fly from within the tool.
|
|
|
meissnersd
Senior Member
34 Posts |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 22 2007 : 08:18:56 AM
|
I have asked internally to get a second opinion on this. I see the appeal, but I also see some of the problems with doing this properly from within VAX. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|