5

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.

Brian Tompsett - 汤莱恩
5,92772 gold badges63 silver badges135 bronze badges
asked Jun 17, 2009 at 14:00

2 Answers 2

11

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.

answered Sep 30, 2013 at 17:25
Sign up to request clarification or add additional context in comments.

2 Comments

Unbeliefable! If upgrading from an older PHPEclipse to Mars with PHP Development Tools ... how can they hide such an important feature so well... Still a helpful answer in 2015, thanks :)
An answer "back to the future" :D ... thanks for the vote up!
3

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.

answered Jun 17, 2009 at 14:02

4 Comments

I had it break on me in 3.4 at some point. running 3.5 beta (Galileo) without problems, though. And yeah... it can be a little slow at times to place the underline. I find there's no need to wait for the underline though. ctrl+click and wait a sec.
Oh, ok, I'll try again some time. But I still need to move my hand to the mouse; somehow I'm more of a keyboard person when it comes to coding :) even though my coworkers always use Ctrl+Click
well if it reacts that slow it sounds to me that CPU should be used by eclipse cause of the "search" - but eclipse does nothing in my case on my linux box 'top' shows that java does nothing and even after a minute it doesnt work it doesnt work with Ctrl+left OR F3 which sounds like the option is turned off - anyone knows where this can be enabled/disabled? and does this function work for class methods too - cause thats what im trying to open like $this->somefunction();
In General > .... > Hyperlinking i have no entry for pdt and it seems there is no way to add it hmm - could be that my installation is broken

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.