Finally I managed to put it on CodePlex.
Update: SequenceViz for Reflector
SequenceViz can now show dependencies between different modules. It is probably not as good as some other proprietary softwares but it is fine for a start and I'm hoping to add more to this in the next release.
As always, here is a screenshot for the assembly dependency view.
Here is another screen shot of the type dependency graph
You can see that the interfaces are shown in a different way to make it more obvious. The anchor direction is towards the interface to illustrate that the type implements the interface. In this version, only the base type and the interfaces are classified as dependencies. I looking to include the private/public fields into that list as well; which will then show the true picture of the selected type.
In some cases, you will see clutter like the following due to the large number of tree nodes.
Here you can either Zoom (Ctrl + Mouse Wheel) to see this view in more detail or you can filter out specific type of items by using the options on the top of the screen. Here is the same diagram with types filtered out.
Currently, it is also not possible to filter out individual types from the user interface. In case you want to remove any individual type(s) then check the IgnoredTypeList property in the LiveSequence.exe.config file. The default setting looks like this.
<add key="IgnoredTypeList" value="Form|Type|Control|ControlCollection|String|Assert"/>
Hopefully, I'll also try to include filtering directly from the user interface. As always, try this out and see if you can get any benefit from this. I'll appreciate your comments or suggestions.
** I have no problem if you are willing to add this to Reflector. I may not help you in writing any code in that case but I'll be able to help in any other issue.
With the help of Mike and Steve, finally there are few visitors coming to the site looking for SequenceViz. For those new visitors and the existing loyal readers (if there are any :)), here is another version of SequenceViz.
A quick screenshot first.
1) Namespace Supports:
Now you can see in the assembly tree that the classes are grouped under namespaces.
2) Assembly Pie Chart:
In this version, I put a Tab control to easily add multiple views of the assembly data.
Assembly Stats is a new view where you can see the size of assemblies and namespaces. It works when you either select Assembly or Namespace in the left hand pane and switch to Assembly Stats tab.
If you have selected an assembly then the pie charts shows the different namespaces within the assembly. The size of each pie is proportional to the size of classes in each namespace. For eg. Here is a nice view of log4net assembly. You can see that the classes are nicely distributed among namespaces.
The view changes when you select a namespace as shown below. Now it shows the different classes in the selected namespace . Similarly, the size of the pie in this case is proportional to the size of methods in each class.
I was initially thinking about adding the chart to show the number of IL count for each method. In the end, I decided not to go along that path because IL doesn't reflect the true number of lines in a higher level language and can give an incorrect picture.
Finally, a big thanks to ZedGraph for building a wonderful open source chart package which comes with excellent document even though it is really really simple to use.
I'm trying to setup a CodePlex project so that SequenceViz can get its own home, but currently there are few areas of that website not working so I'll to wait until that get fixed. In the meantime, if you would like to see anything in the next release then please leave your comments. The main theme of SequenceViz is to use visualization to help people understanding an existing project.
For comments on putting this as Reflector Plugin:
I would like to control the shell and now as I am getting comfortable with using Cecil therefore I am sorry that I won't be able to integrate this in Reflector any time soon. In addition there are some features that I want to see in SequenceViz which would not be possible without controlling the shell application.
For SequenceViz, the next thing on the list was to export the SVG output to an image. I would like it to be included within the application but unfortunately I am unable to find a working implementation which I can use. (tried SVG# but didn't wok).
There are few ways where you can take the generated SVG and convert it into a raster image manually. These options are described below:
Please note that the SVG image of the diagram is generated to a file named Seq.svg before rendering in the browser control. So that is the file you should be converting.
1) Apache Batik:
Apache Batik is a wonder Java toolkit to manipulate SVG images and it does a lot more than that. See the website (http://xmlgraphics.apache.org/batik/index.html) for more information. For our purpose, it includes a tool called SVG Rasterizer (http://xmlgraphics.apache.org/batik/tools/rasterizer.html) which can convert SVG file to a raster format. There is sufficient information on the website to use that tool therefore I would recommened you to look at the above website.
2) Inkspace: (http://www.inkscape.org/)
Inkspace is an open source vector graphics editor similar to Illustrator, Freehand and Corel Draw. It can also be also to convert SVG to other formats.
Letme know if you have more information on any other way to convert SVG into other formats.
What is SequenceViz?
SequenceViz is a tool to generate sequence diagrams by reverse engineering .NET Assemblies. Read this post for setup and installation.
The latest release has the following enhacements:
See this post for introduction to MethodViz.
For those, who don't like Python or IronPython, here is a pure C# version of Method Visualizer. The following screenshot shows it in action.
As I said in the last post, the output from Microsoft GLEE looked but not ideal and as the method tree gets bigger with more relationships, the diagram gets out of control. Disappointed with that, my further search takes me to the Netron Project, which is a diagramming and graph layout toolkit for Microsoft .NET Framework.
UPDATE: [ Part III with Netron Project ]
I started this exercise thinking about visualizing the methods tree in a diagram. There are several ways to do that. I was planning to use the GraphViz project to render a dot file showing the connections between the methods. But then I found that pydot (python library for wrapping GraphViz) is not yet supported on IronPython and QuickGraph doesn't look like it is updated for some time.
Don't miss Part II of this tutorial
What is Cecil:
I personally use my own host to store snapshots that I embed on this blog. Normally the workflow from taking the snapshot to FTP'ing on the server requires three steps.
Now, with the help of Cropper and the "Send To FTP" Plugin, it is reduced to a single step which saves time as well as effort.
The plugin will get the image stored on your hard disk by Cropper and upload it on your selected FTP address. Once the file is copied, the generated URL is automatically copied to the clipboard. Easy, isn't it?
The plugin will also ask you to name the target file name on the FTP Server. You don't need to enter the file extension here. Currently, It uses the png file format and add (.png) to the file name automatically. If you press Escape or Cancel then it will use the default file name that Cropper generated automatically.
-- Extract and copy the files in the
pluginCropper folder. If you already have plugins then just copy the files to the plugins directory.
How to configure FTP Settings:
Make sure that you have placed the dll in the plugins directory.
Then Right Click -> Select Options -> Then Plug-ins
Here is a brief description of the different options:
Username and Password are self-explanatory. Use Anonymous/Email address for anonymous access.
The HTTP address which will be used to generate the final URL.
For E.g.: If you are uploading file abc.png on FTP Address ftp://ftp.example.com/
And HTTP Address is http://www.example.com/dir
Then the generated URL will be http://www.example.com/dir/abc.png
Brian Scott: http://blogs.geekdojo.net/brian/articles/Cropper.aspx
Hope you'll like this plugin. Please leave a comment If you have any question about the source or the addin.