[Pydev-code] Code completion
Brought to you by:
fabioz
From: Aleks T. <a...@to...> - 2004-03-15 19:41:24
|
Here are some of the Fabio's thoughts on it. I agree that it is tricky, that is why I did not want to dive into it. Aleks >>> Fabio wrote: Nice... code completion is something that I'm really missing too... Anyway, I have a question: How do they intend to implement it in Python? I mean, true code completion in Python without a running Python environment doesn't seem trivial... specially to get all the classes on the PYTHONPATH... I think it shouldn't be based on Jython either, because, you know, we might be using Python and not Jython, so we don't care about Java classes anyway (Altough we could have 2 code completions available, one for Jython and one for Python) Well, I'm just curious because I still haven't found a good way to do it without a running shell... Statically parsing it is kind of hard, because some simple cases like: Class A(object): def a(self): pass Class B(object): def b(self): pass aOrB = A() aOrB. <-- should appear just a()(and maybe built-ins, like __dict__, etc) aOrB = B() aOrB. <-- should appear just b()(and built-ins) require a lot of effort for working correctly without a running shell... ( I don't think a running shell is a good think, because of side effects that can happen when importing a module - I used an editor that used that approach before and I really didn't like it, because it crashed sometimes - later I found that it was because I was using qt and it can only have one QApplication at any time and the editor was reimporting the module and trying to instanciate it more that once, so I had to change my program because of the IDE... and this, I think can be really annoying sometimes...) Well, as I said, I'm just curious... []'s Fabio |