views:

70

answers:

3

Hi!

I find myself reading 10 times more code than writing. My IDEs all are optimized to make me edit code - with completion, code assist, outlines etc. However if I'm checking out a completely new project: getting into the application's logics isn't optimized with these IDE features. Because I cannot extend what I don't fully understand.

If you for example check out a relatively new project, frama-c, you realize that it has got plugins that are helpful to gain insight into "unfamiliar code": http://frama-c.com/plugins.html - However of course the project has a different scope. What I'm fully aware of.

I'm looking for something that does helpful things for code-reading. Like:

  • providing a graph, - reverse engineering UML e g.,
  • showing variable scopes
  • showing which parts are affected by attempted modifications
  • visualizing data-flow semantics
  • showing tag-lists of heavily utilized functions
  • ...

My hope is that something like that exists. - That there're some Eclipse plugins I don't know or that there's a code-browser that has some of these features?

A: 

The first and fourth bullet in your question, together describe a 'call graph'.

Of course these are ideal when you have digest a lot of code that was written by someone else.

Here's one implementation in C++ which includes the source and docs. There are quite a few 'call graphs' (graphical display of function calls) implementations--i've found them (src + docs) on the Web for a variety of languages. Rolling your own isn't difficult though. Most (all?) of the call graph scripts i've come across are based on graphviz, which as you might know is a layout engine that uses a very easy-to-learn syntax ('dot') to represent graphs.

I've also seen graphviz used for other purposes related to testing/diagnostics; for instance, Gprof2Dot, is a python script that converts profiler output to a dot file (which can then be rendered as a graph by graphviz).

doug
+1  A: 

Source Navigator is a tool to look at. Its a bit old but does have call graph visualization.

Sid H
well... call graph visualization isn't exactly what I'm looking for. That's more profiling than overview.
wishi
+1  A: 

Coupled with graphviz, Doxygen can do wonders when there is no high-level design documentation.

JRL