Migration from PHPEclipse to PHP IDE

Published on December 27, 2006 and tagged with configuration  eclipse  phpeclipse  phpide

Yesterday, I migrated from PHPEclipse (and Eclipse 3.1) to the PHP IDE (and Eclipse 3.2). After importing the projects to the PHP IDE I noticed that the Outline view (which lists class variables, methods, etc.) and the auto-completion didn’t work. Hm. The problem was that the .project file still contained references to PHPEclipse. So I had to replace:

<buildSpec>
    <buildCommand>
        <name>net.sourceforge.phpeclipse.parserbuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
</buildSpec>
<natures>
    <nature>net.sourceforge.phpeclipse.phpnature</nature>
</natures>

with:

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

And voilà, the project was now recognized as a PHP project, and both Outline view and auto-completion worked.

Thanks to Seva Lapsha for this tip!

20 comments baked

  • kiri- December 27, 2006 at 14:55

    by looking at both PHPEclipse and PHP IDE project pages I cannot figure out which would be better and why.

    currently I’m using PHPEclipse, would you please mention some features why PHP IDE is better? I’m curious, cause changing plugins can be a litte bit fumbling… :)

  • cakebaker December 27, 2006 at 18:53

    @kiri: The code-completion is much better in PHP IDE. But else I noticed no big differences yet. Anyway, I didn’t switch because of the features. I switched because the PHPEclipse project seems rather dead.

    I had no problems with plugins, I installed the PHP IDE all-in-one package ;-) The only additional plugin I had to install was Subclipse, and that worked without problem.

  • CraZyLeGs December 28, 2006 at 05:25

    Hmm yeah, I use PHPEclipse too..it’s not the best but I got used to it..so kinda need a reason to switch, because I’m one of these that don’t switch as long as the tool does the job.
    But I’ll give it a try

  • joelmedia December 28, 2006 at 17:42

    I have used both phpeclipse and PHP IDE. the biggest difference that I noticed is that PHP IDE is a bit more sluggish.

  • Duende December 29, 2006 at 17:52

    I have just switched from PHPEclipse to PHP IDE, too. And mainly for one reason: with PHP IDE, I can debug my CakePHP code. Yes, supposedly you can debug any PHP code with PHPEclipse too… but I got tired of trying.

    I’m thinking about writing a small how-to in the Bakery, something like “Debugging your CakePHP code in Eclipse”. Just let me find a moment…

  • cakebaker December 29, 2006 at 19:46

    @Duende: I think that could be interesting for some people. Personally, I never used the debug functionality of those projects.

  • Dieter@be December 31, 2006 at 14:14

    Hey guys check out this article http://pooteeweet.org/blog/348/p/1

    It says (among other interesting things) that PHP IDE’s debugging facilities are based on a closed source component from Zend !

  • cakebaker January 01, 2007 at 11:09

    @Dieter@be: Interesting article, thanks.

  • lucaspirola January 23, 2007 at 16:21

    thanks a lot, u help me!
    i am confused with this issue..
    thanks again!

  • cakebaker January 24, 2007 at 11:50

    @lucaspirola: I am glad this article was useful for you :)

  • Jasmon blogi » Blog Archiv » Eclipse April 12, 2007 at 00:04

    [...] oli jäänyt kummittelemaan PHPEclipsen haamuja, joten homma ei tietenkään pelittänyt. Cakebakerista löytyy ohjeet, kuinka asian voi [...]

  • Dario May 21, 2007 at 14:34

    I tried to migrate a project from PhpEclipse to PDT and followed your suggestion (which is also officially reported here: http://www-128.ibm.com/developerworks/library/i-osource13/index.html) but my PHP Project Outline is still empty and autocompletion not working. I tried to manually rebuild the project via the Project menu but this didn’t help either. Am I missing something trivial? Any help appreciated.

    My config:
    Eclipse version: 3.2.2 (Build id: M20070212-1330)
    PDT version: 0.7 RC3 (v.20070401)
    PHPEclipse version: 1.1.8

  • cakebaker May 23, 2007 at 17:26

    @Dario: Hm, did you remove the PHPEclipse files in the /plugins and /features folders of your Eclipse installation?

  • Asimov June 09, 2007 at 09:21

    Thanks for this, I was tearing my hair out. By the way, another way if your not stressed to rebuild your project file from scratch, simply delete your .project file, and delete the project from within Eclipse (but make sure that the default “Do not delete contents” is selected so that you don’t lose your files).

    Then simply recreate the project in the same location as previously, and Eclipse will rebuild your project file correctly from scratch.

  • cakebaker June 09, 2007 at 11:26

    @Asimov: Yes, that’s another way, but it is a bit cumbersome if you have many projects to migrate.

  • eff July 21, 2007 at 02:42

    Thanks for this. I would have been searching for days. My buildSpec and natures nodes were empty by default. Strange.

  • Jimmy Forrester-Fellowes April 15, 2008 at 10:21

    I’ve moved from PHPEcilpse to PDT due to PHPEclipse seems to be very unstable since upgrading my workstation to ubuntu hardy.

    One thing I really miss from PHPEclipse is the more detailed syntax highlighting palette. PDT needs to add a new colour for method names and not include them in the ‘Normal’ colour. In the following example statement I’d want ‘exampleMethod’ to be highlighted in a different colour than that used for the semantics:

    $exampleObject->exampleMethod($exampleArg)

  • cakebaker April 15, 2008 at 18:23

    @Jimmy: I didn’t even notice that ;-) And yes, it seems it isn’t possible to get the highlighting you want. Maybe it will get implemented if you open a feature request for it…

  • ep September 04, 2008 at 22:07

    Yeepee! I now have outline and autocompletion again!
    You save my day

  • cakebaker September 06, 2008 at 17:32

    @ep: You are welcome :)

Bake a comment




(for code please use <code>...</code> [no escaping necessary])

© daniel hofstetter. Licensed under a Creative Commons License