Code Completion improvements

Hi folks,

after a few weeks of evaluation of RubyMine 3.2, my team ended up choosing NetBeans for a single but vital feature that RM lacks.

I am talking about code completion "Smalltalk style". If you ever used Pharo Smalltalk for example, the code completion (both eCompletion and oCompletion) can do two things:

1) if the type of the object can be inferred with 100% precision, then only methods of its class will be shown
2) otherwise all methods of all known classes are shown

The Ruby plugin for NetBeans does exactly this.

I have tried the several code completion options for RM but I didn't manage to get that behavior. We would really like to switch to RM for its refactoring tools and up-to-date Ruby support, however the lack of this kind of Code Completion is a show-stopper for us.

Is this a planned feature, or can I enable a similar behavior in the current version?

Thank you

Moreno

1 comment
Comment actions Permalink

Hi Moreno,
point 1 should be working and if it does not you can file an issue here. As for 2, we're not showing all available methods intentionally because most of them will be inaccurate for given class, code completion will misguide user and that will result in runtime error. You can use YARD annotations for parameters/return types that are not inferred automatically. They are correctly handled by RubyMine and will not only help RubyMine show better completion results but also will make your code easier to understand

0

Please sign in to leave a comment.