Navigating to method definitions


#1

In eclipse IDE we can navigate to the source file where the actual method was declared and defined from the place where that method is being used. For example, if method class B is using method name displayName() which has it’s definition is class A, we could navigate to the actual definition of method displayName() in class A with a key & mouse strokes combination.

I am not able to find this feature in Cloud9. Please suggest.

Thanks.
Shivam


#2

Hey @m0dernm0nk :slightly_smiling:,

Which language/workspace template are you working in? Clicking to open the file with the method definition is possible in the new python workspace. See “Jump to definition, Django, Flask, and other frameworks” in this blog post:

:bookmark_tabs: :snail:


#3

If you go to your workspace settings and then look at your keybindings, this should be called jumptodef. You can then assign it whatever shortcut you’d like and try it on the language you’re using.

These languages currently have support for jump to definition:

  • Javascript
  • PHP
  • Python

These do not:

  • Ruby

#4

what about ruby?
I see ‘jump to definition’ grayed when I right click on editor. Not supported yet?


#5

I’ve updated my post above to include a few languages. I made it a wiki so other community members can expand upon each language.