28 Oct 2007

phpeclips, after install hickups.

Class Browser

PHPeclipse is a really nice ide for working on php projects. I have started to use PHPeclipse as my main development editor. It offers so much convenience, like the built in class tree (AKA Outline).

Outline displays a lot of information about your classes. It gives a good overview about visibility (public, protected, private) and also lets you know if a method is abstract, final or if it is an interface. Furthermore, the versioning system status is displayed (CVS/SVN and probably more) for class methods, constants and properties.

Source Control

The Synchronizing Perspective gives great control of the currently edited files. Easy and accessible diffs and tree views of changed files.

The source control features will also integrate cvs/svn blame into the current view. the gutter will be colored in defferent colors (by version) and when you hover over the gutter with the mouse you can see the commit comment, date, etc.

These are the strengths of PHPeclipse after the first impression. But there where some hickups after the first couple of editing sessions:

Color coding for html/xml files


by default, phpeclipse in version 3.2.x does not colorcode html/xml files. This is really needed for php web development. The eclipse Web Tools Platform (WTP) will add the needed features. It has proven (once more) to be very convenient/bulletproof to use the internal eclipse installer to install this features. So i have started eclipse as root user (this is on a debian linux system):

sudo eclipse

Then open "Help » Software Updates » Find and Install ...", select the "Search for new Features to install" radiobutton and click "Next >".



Select the Callisto Discovery site:



Make sure to "Automatically select mirrors" checkbox is active and click "Finish".

On the next dialog I did select "Web and J2EE Development" and did select (and this is important) click on the [Select Required] button to select all dependencies.



This worked for me on ubuntu feisty and debian etch.

Opening class declarations and properties

This did not work after I had created my first php project. I did check it out from an svn repository. Some of my class and functions names were unknown to phpeclipse, altough the include path was correct. I have found out that i need to add some information to the workspace's .project file. Open your project file (it might look different to the example below) and make sure the red lines are in your file.

This forum post describes how you can fix your project.

No comments: