Thursday, August 16, 2007

PDE Dependency View (SoC)

It has been too long since my last update. I meant to post this early this week, so this isn't the latest code. I will do another update this weekend.

Anyways, I thought I would give a brief overview of what the PDE Viz tool looks like and how to use it (My SoC project). The PDE Viz Tool is targeted at developers trying to understand the dependencies of their bundles. Once you get the tool (currently only available in source, but that will change soon) from here, you can find it using the now famous CTRL-3 :)

Once loaded, you can right click on the canvas to select a bundle.

For this example I selected ecore.


Producing a nice little graph.
I have also added a few small analysis tools, so if you ever wondered why javax.servlet was needed by EMF, you could see the dependency path:

A few other small notables in this version. I have updated my labels to use gradient colours. Also, if you double click a node it will refocus the graph on that node. The arrow keys (at the top of the view) can be used to navigate forward and backwards through the graph. Finally, I added a "Screenshot" action so you can save your dependency graph to a PNG.

I have tested this on some of the large IDEs built on Eclipse and it worked (albeit a little slow). My hunch is that it was not slow because of the large number of nodes, but rather because of the even larger number of edges. But for all the bundles I tested in Europa it worked without problems.

13 comments:

Eugene Kuleshov said...

It look nice, but why it is not a editor? Views generally have less space, and even if you couldn't add another tab to the PDE's manifest editor, perhaps you could just show a separate one. Also, that settings area on the right takes too much screen real estate and should probably go into the properties

Bull said...

I was just thinking the same thing about the editor. The reason it is not an editor, is because you cannot edit it. But it may go nicely in a PDE Tab. For now I am just experimenting with uses for this, but if it ever makes it way into PDE, I think an editor tab makes sense.

As for the stuff on the right, you're right it does need to move, but I don't think properties is the right place. I see this view useful for someone trying to track down a problem, and they can turn / tweak / adjust controls to help them. Probably in the view action bar makes sense.

Peter said...

Don't you know about similar plugin but for showing dependencies between java packages?

trisa said...

I'd love to check that feature, being new to a Eclipse RCP project with tons of plguins. In the code I checked out the pde.visualization.dependency does not compile (I'm using a vanilla europa release). It references bundles org.eclipse.mylyn.zest.core/layout and the code in the cvs still has the id and packages org.eclipse.mylar.xxx. Search and Replace does not help as these 'old' mylar plugins do not provide all Classes. In example org.eclipse.mylar.zest.core.viewers.GraphViewer is referenced in pde.visualization.dependecy and the corresponding mylar plugin does not export any class with that name... I'd appreciate any help a lot!

Bull said...

Thank-you Trisa,

I just realized I checked in something I shouldn't have and it probably doesn't compile.

I will fix that first thing in the morning... sorry about that.

Bull said...

Actually I just fixed it now.

Can you try again?

deaded said...

Looks really nice ... will it function on plain OSGi bundles as well?

Bull said...

I currently uses the PDE model to compute dependencies. But Zest, the underlying graph widget that I created to use this could be easily used to show OSGi bundle dependencies too. It is just a mater of finding someone to do that :)

trisa said...

Thanks!! It now compiles flawlessly... and I get the 'Graph Plug-in Dependencies'-view when running a new eclipse instance with the workspace plugins enabled... I'm impressed! very nice visualisation.

trisa said...

I just built the plugins, installed and everythings fine! I'll probably post the binary plugins on my blog, posting your very pleasant new feature :-)

ousema said...

Your work is very great !! thanks
Please It's very urgent, I want to know if it's possible to delete a node in the graph.
My other question is to know if we can integrate your work in a Gef Editor to print a graph.
Thanks in advance

Sara said...

Your work looks very interesting. I want to print a graph created with Zest, is that possible in your opinion ?

thanks for help

java said...

Hi,
i need to check this thing out. Is there any site from where i can just download the plugin and paste and restart my eclipse and that it!!
i don't want to download the source code and all.

It will be great if someone help me!!!

marshal