Since my study at the Hochschule Furtwangen University I’m using Eclipsse PDT. And what can I say? I really love it. But even within a fantastic IDE like Eclipse sometimes problems appear. Today I got such a problem. I was working on a PHP project and I was wondering why the auto complete function was not working. This article should answer the question “How to change default project into PHP project in Eclipse“.

A little research results that the project I was working on wasn’t defined as a PHP project. Therefore Eclipse PDT didn’t provide PHP support. Another reserach delivers the following solution:

  1. Close desired project in Eclipse
  2. Open file .project of specific project, e.g. with Notepad
  3. Replace
    <buildSpec>
    </buildSpec>
    <natures>
    </natures>

    with

    <buildSpec>
      <buildCommand>
        <name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name>
        <arguments></arguments>
      </buildCommand>
      <buildCommand>
        <name>org.eclipse.php.core.ValidationManagerWrapper</name>
        <arguments></arguments>
      </buildCommand>
    </buildSpec>
    <natures>
      <nature>org.eclipse.php.core.PHPNature</nature>
    </natures>

After changing the .project file and reopening the project it will be detect as a PHP project by Eclipse PDT. Now everything should work as expected.

, ,
Trackback

no comment untill now

Add your comment now