Navigation Improvements

The new RoR plugin looks good. It has come a long way since the last version. That said, there are still some things about navigation that don't quite work as well as I'd like. I know that this can be difficult with dynamic typing, but Aptana and Net Beans do a decent job. The specific navigation issue is navigating to a method called from a variable that is passed into a function. For example, in the function below I would like to navigate to the check_access function. This does not work in the current release as far as I can tell. Is this something that will be addressed in the future or even the near future?

def foo(user)
user.check_access
end

Thanks,
Ryan

8 comments
Comment actions Permalink

Hello Ryan,

The new RoR plugin looks good. It has come a long way since the last version. That said, there are still some things about navigation that don't quite work as well as I'd like. I know that this can be difficult with dynamic typing, but Aptana and Net Beans do a decent job. The specific navigation issue is navigating to a method called from a variable that is passed into a function. For example, in the function below I would like to navigate to the check_access function. This does not work in the current release as far as I can tell. Is this something that will be addressed in the future or even the near future?

def foo(user)
user.check_access
end

What behavour of the IDE is expected for you in this case?
We have built-in type inference system within RubyMine and Ruby plugin for IntelliJ IDEA.
Read more at: http://blogs.jetbrains.com/ruby/2008/11/type-inference-in-rubymine/
In this case we cannot infer type of variable user passed and cannot tell anything about it`s methods. Maybe we should navigate to all methods named check_access?

Regards,
Oleg

Edited by: Oleg Shpynov on Nov 10, 2008 11:43 AM

0
Comment actions Permalink

Netbeans seems to take the 'show all methods called xxxx' aproach, but I find that leads to far too many matches in most cases. Personally I find the 'Cyclic expand word' feature useful in this case, though it would be more useful if it looked into other open files, a bit like dabbrev does in Emacs.

0
Comment actions Permalink

Netbeans seems to take the 'show all methods called xxxx' aproach, but I find that leads to far too many matches in most cases. Personally I find the 'Cyclic expand word' feature useful in this case, though it would be more useful if it looked into other open files, a bit like dabbrev does in Emacs.


What do you mean in 'cyclic expand word' feature?

0
Comment actions Permalink

The option in the menu, "Code -> Complete Code -> Cyclic Expand Word"

0
Comment actions Permalink

I was thinking something along the lines of show all matches or something like that. Aptana does this and it can be unwieldy when the method name is a common one, but I think that it generally works well.

0
Comment actions Permalink

Netbeans got this feature right and this is imho the biggest productivity stopper in rubymine atm. When trying to navigate to a function that rubymine cannot recognize by type-inferencing, it should simply display a list of all functions with the same name to let the user click on the desired one. And, if youre serious about it, you can use this click as information to improve the type inferencing.

0
Comment actions Permalink

Hello,

Netbeans got this feature right and this is imho the biggest productivity stopper in rubymine atm. When trying to navigate to a function that rubymine cannot recognize by type-inferencing, it should simply display a list of all functions with the same name to let the user click on the desired one. And, if youre serious about it, you can use this click as information to improve the type inferencing.


We`ve added simple indeces-based resolve to RubyMine and Ruby plugin. Will be available in next EAP.
Also we`ve updated resolve inspection to handle this case correctly.

Thanks,
Oleg

0
Comment actions Permalink

Woah, you guys are awesome!

0

Please sign in to leave a comment.