#349 Analyze method return types to improve code completion

open
nobody
5
2009-03-19
2009-03-19
No

Pydev 1.4.4 with pydev extensions, Python 2.4, Eclipse 3.4.1

Having a simple sources like:
model.py with content

class First(object):
def second(self):
value = Second()
return value

class Second(object):
def third(self):
value = None
return value

and view.py with

def dummy():
first = model.First()
second = first.second()
third = second.third()
print third
return

I can see a method second() in code completion but I miss method third when typing next line. IMO this is because Pydev knows that type of first is model.First but is not able to find that the result value of method second() is model.Second.

I see that it is a hard problem but it would be nice to cover at least some trivial cases.

Discussion