« Return to Thread: extraneous(?) autocomplete info
Hi,This is due to Ruby's dynamic nature; in a lot of cases it is difficult for the IDE to figure out what's the real type of the receiver, i.e. the IDE isn't sure about what methods are available for the receiver at runtime, so it falls back to showing all the methods available in the project.
curej wrote:
I'm getting a ton of (what I would call) extraneous autocomplete information in Ruby Netbeans.
For example, if I type the name of a model object and then type a period (whether I'm in a controller or a view), it shows a dizzying dropdown list of thousands of methods, including several hundred different versions of the "new" method (but no documentation - most method signatures are followed by "No comment found").
Has anyone encountered (and solved) this problem, if we agree that this is a problem? Could it be that I simply have access to all of those thousands of methods and so they must be reported by autocomplete?
Some work has already been done in 6.7 to make the IDE more intelligent in this respect, and when the IDE thinks it knows the type it displays the relevant methods first in the code completion dialog. A lot remains to be done still though - it is actually not too difficult to analyze method bodies (to figure out possible return types), but to make it fast enough is a bit of a challenge. In addition there are constructs that are difficult/impossible to analyze - imagine e.g. a method created dynamically using class_eval, as in:
Foo.class_eval(some_user_entered_string)
Going forward, I'm hoping to gradually improve the IDE's type inference so that more and more cases get covered (and hopefully I can make it faster too), that should help wrt. long code completion lists.
Erno
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...
« Return to Thread: extraneous(?) autocomplete info
| Free embeddable forum powered by Nabble | Forum Help |