Why does Eclipse code completion not work on some projects?

Edward Tanguay picture Edward Tanguay · Oct 7, 2008 · Viewed 40.3k times · Source

I have Eclipse 3.3.2 with PDT doing PHP development. All projects that I create, even SVN projects have code completion. Now I just opened another SVN project and it has no code completion or PHP templates (CTRL-space does nothing in that project). However, I can open the other projects and code completion all work in them.

Why would code completion and templates be "off" in just one project and how can I turn it back on?

Answer

Guido picture Guido · Oct 7, 2008

Maybe Eclipse doesn't understand the project has a "PHP nature". Try comparing the .project file on both projects to look for differences. It should contain something like:

 <natures>
  <nature>org.eclipse.php.core.PHPNature</nature>
 </natures>

The .project file will be in your workspace under the project directories.