Monday, October 23, 2006

Issues doing the Package Explorer for Pydev

Yeap, sometimes developing in Eclipse can become hard... especially when things don't go your way ;-)

The major problem for doing the Package Explorer in Pydev is that the CNF (Common Navigator Framework) that is provided in Eclipse has some deficiencies when it commes to providing the default actions that are provided to the default resources (IFile, IFolder) for objects that are not really implementations of those interfaces, but should be able to adapt to that interface.

The first stop in the way was that you have to provide a factory to the adapt protocol, whereas it is common in Eclipse to just make your object IAdaptable and have it working... after having that solved, it appears that the default actions only work on actual implementations, and not objects that adapt to that interface... maybe a sign that the CNF is still not completely ready (still has lots of rough edges)...

Anyway, I hope to have a first working version in the next release -- there are already some things that may deserve a release, such as some significant changes in the debugger and some niceties provided by Gergely Kis to save the project pythonpath in a file to be added to the repository and having a 'default interpreter' in the combo for selecting which interpreter to use for a run.

Sunday, October 08, 2006

Package Explorer for Pydev

Ok, I've been thinkering about the next thing to do in pydev, and after taking a look at several options, creating a package explorer (instead of just using the regular navigator) seemed like a nice addition -- that's actually an old request but only when Eclipse 3.2 was added, a 'default' way of doing it was provided, so, here we go...

After searching the net for some time, the best resources to help in this implementation were:

After passing the first and second tutorial in the blog, it became clear how to actually add content to make the outline of the python files in the custom navigator... I've already checked in a version that has a basic outline for python classes, but there are still some points to play with, such as making the sort of the tokens from files and making the flat/hierarchical view.

The working sets will not be available right now, as this 'common navigator framework' still does not support it (but it appears that Eclipse 3.2.1 will support it).