No autocompletion on Eclipse(Helios)
I'm having a problem with the autocomplete option in Eclipse (Helios). I've already checked Windows->Preferences->PHP->Editor->Content Assist and everything seems to be correct there. And when I do get completions when I write "self::" in any of my classes, but this is the only situation I get it.
For example.. "parent::" or "$th开发者_JS百科is->".. Don't work at all.. any ideas?
Btw, I'm working under Lunix, Ubuntu 10.10
Thanks in advance.
A few things to check:
1) .project file contains:
<nature>org.eclipse.php.core.PHPNature</nature>
2) .buildpath contains:
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
3) Right-click project and go to Configure -> Add PHP Support
4) Are you using a namespace in your code? If so, does completion work without a namespace i.e. in a global namespace
I can also see quite a few open issues in bugzilla related to code completion in PDT. Take a look.
Since it seems that yoy've already tried the basic solutions that are documented across the web (phpnature, add php support, buildpath, etc.) it's probably best to look at the logs and provide any error that occurs when you try to call auto-completion.
You can "tail" the log and check if anything appears when asking for an autocomplete (press Ctrl+Space after writing "$this->" inside a method of a class):
tail myWorkspace/.metadata/.log -f
The error that appears may be usefull for searching google or for including here for others to help!
Seems like updating Eclipse to Build id: 20100917-0705 solved this issue.
If you just upgrade eclipse you should rename/remove workspace/.metadata
some times there is compatibility issues...
精彩评论