Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpeclipse: jump to function definition?

From zend's IDE I know that Ctrl+left click on a function name opens the corresponding source file and jumps to the functions definition

Is there anything similar in eclipse especially phpeclipse OR CDT? I'm not sure if its just a window->preferences setting I don't see OR some kind of source code indexing I may have disabled which also don't find in the settings (if available)

Anyone knows the right settings? I'm using eclipse 3.4.1 with pdt 2.0.0.v20081229.

like image 855
John Doe Avatar asked Jun 17 '09 14:06

John Doe


People also ask

How to jump to function definition in Eclipse?

When you're positioned on a method call and press F3, Eclipse takes you directly to the definition of that method.

How do I open a function declaration in Eclipse?

You can open any method or type in your workspace using the "Open Type" wizard or the "Open Method" wizard. -Or- press Ctrl+Shift+T (for a type) or Ctrl+Shift+M (for a method). The "Open Type/Method" dialog will appear. If a type/method was previously selected in the editor or outline views, it will be displayed.

How do I go back a call method in eclipse?

⌘ + [ ( Command + [ ) : Go Back.


2 Answers

Using Juno and PDT (PHP Development Tools) you can add this useful feature to a project in this way:

right click on the project -> Configure -> Add PHP Support.

like image 128
lastYorsh Avatar answered Sep 28 '22 14:09

lastYorsh


Ctrl+Left click usually works in Eclipse as well, although it's horribly slow to react. For that reason I usually use F3 after moving the caret to the function name.

The thing with Ctrl+Click can be found in the preferences in "General > Editors > Text Editors > Hyperlinking". It can be turned off, there. But this function apparently required support from the respective editor/parser to be available at all.

The F3 key is bound to "Open Declaration" here. If that's not the case this mapping can be manually added, otherwise it may be that Eclipse is just not able to do that with PHP.

like image 36
Joey Avatar answered Sep 28 '22 14:09

Joey