None of these seem to be ready for prime time and they are not really
what I have in mind. I was wondering how to invoke existing CPython
stuff from a Jython script in Pydev.
Actually, if you're meaning in the same process, you'd need something that exposed the CPython api to java (as those projects try to do), but I agree, none seems to be in production...
Given that there does not seem to be anything worth using I am assuming
that you run at least some of Pydev's Python code in a separate process
rather that in-process? For stuff like BRM which I doubt you would have
ported that to Jython. I wonder what else is in straight Python?
Yes, BRM, code-completion (for builtins), debugging, code-coverage, etc. are all in Python.
Did you develop a standard protocol for this that could be exposed to
the scripting interface? Or would it be straightforward to do this
directly in Jython.
Actually, there is not an actual protocol for everything... In the debugger it uses xml-rpc, in code-completion it just write messages directly (to try reducing the communication penalty). BRM uses the same thing code-completion does... Actually, thinking about it, that's the most 'standard' approach. The server at the cpython side is at org.python.pydev/pysrc/pycompletionserver.py (altough it is used for BRM too).
Anyway, I'm not sure that would be a good way to go, as you'd have to pass all the objects you need to know about to the python side, so, the communication could make things VERY slow... Besides, you wouldn't have acess to the Eclipse internals. So, it does not appear such a good solution to me (if one of those projects could take care of that in the same process, then it might be worth it, but otherwise, I think jython would be the best way to go).
In more general terms, it would be very interesting to read an
architectural overview of the design of Pydev.
I'll try to write about it as I do a 'developers manual'.
Cheers,
Fabio
