开发者

Eclipse Auto-Complete for Included PHP Source

I've installed Eclipse 3.5.1 (PDE), which I believe I got from Zend's download site (it was a while ago on my travel laptop). I can't get auto-complete to work for any of my included libraries. I've tried both adding the libraries to the 开发者_运维问答'include path' and just linking the files to a subdirectory of the project. Neither gets me auto-complete of the library classes.

My normal development system has an older version of Eclipse which I don't update, because it currently works well, and I fear an update will change that. I find configuring eclipse more work that actual coding, and more voodoo that mod_rewrite. I doubt I'm alone.

Any secret to getting auto-complete working?


No you're definitely not alone! I have experienced this problem in many installations of Eclipse (after updates and such etc etc). Try running Build Project. I know that solution has worked in some instances for me. My last installation I was running Eclipse Galileo and once I finally got the intellisense to at least work it was extremely slow. I tried lowering the time delay for the intellisense which helped in php files (still had a 1.5 second delay at least) but made it way over-sensative in my view scripts for example.

I finally bit the bullet and switched to Zend Studio 8. (At least they've knocked the price down $100 haha).

Eclipse has a quirky auto-complete but the Zend one is excellent! :)


You can add a PHP library to the project in Project properties/PHP Include Path/Libraries. After that, autocomplete will index all php files in that directory.

Maybe it's not the best solution for you, because it doesn't care about whether the file is included or not in the given script. If I include /usr/share/pear, and now I see all PEAR libs' functions everywhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜