CodeLogic for C# 2.0
CodeLogic is a product that does just a few things - but it does them
exceedingly well, and developers are likely to find them exceedingly
useful. It comes in versions for Java (with support for Eclipse,
JBuilder, JDeveloper, and IntelliJ IDEA), and C# (with support for
Visual Studio .NET). In either case, there's a standalone version as
well as the IDE plugins. I took a look at the C# version.
So, what does it do? The point of CodeLogic is to take source code and
generate diagrams. Specifically, it will take any C# project (or at
least any one that I threw at it, including somre pretty big collections
of junk) and come up with three separate diagrams on demand: a standard
UML Class diagram, a standard UML sequence diagram, and CodeLogic's own
flow diagram. The latter lets you see how code fits together, with a
graphical representation of branching and looping constructs.
Diagram generation is definitely fast, even after making changes to the
code; it's not an operation you can completely ignore, but it only
interrupts your work for a few seconds. Compared to trying to reverse
engineer the UML in other ways, it's spectacularly fast. You can
customize the diagrams to a certain extent. For example, in the class
diagrams, you can choose to show the details or only classes and their
connections. In the sequence diagram you can decide which classes in the
solution should be treated as players.
Navigation between the diagrams and the code is easy and feels natural.
You can right-click in code to go to the appropriate diagram. You can do
the same in a diagram to go to the corresponding source code. Filtering
and searching capabilities in the diagrams make it easy to narrow things
down to the parts of the source code that concern you. You can also
export things to Visio, Rational, or several different graphics formats.
I can see two immediate uses for this tool (and there are probably
more). First, if you need to produce UML documentation but you're not
keen on UML as a design technique, you could use CodeLogic to produce
the documentation from the code. While some will view this as cheating,
it does mean the docs will match the code exactly. Second, the flow
diagram will be amazingly valuable the next time you get stuck with a
big code-base that someone else didn't bother to document properly.
Being able to trace the logic of the code graphically is a great way to
start to figure out what's going on.
If you want to give it a spin, you can download a trial version from the
Logic Explorers Web site.