Monday 27 April 2009

Eclipse: Check out a project from CVS and use PHP specific features

How do you check out a project from cvs in eclipse and retain the php specific functionality you get from being able to build the project?

The question comes because I had many projects checked out which had the option 'build project' greyed out and others that didn't. I noticed that only the CVS projects had this problem. I checked in my team and some helpful guys told me the answer so I thought I'd post it so I won't forget and others might find it useful. 

The problem arises simply because eclipse sees this project as a CVS project not a php one. To fix this you can go into the actual project file itself of a project that works how you want and copy a couple of lines into the project file of the project that doesn't. But there is a simpler gui based way that avoids messy work with files. 

Begin by creating a project from CVS and working through the relevant screens. When you reach the screen titled 'Check OutAs' simply choose the option 'check out as a project configured using the New Project Wizard' and pick php project when asked. 

You'll then be tying a CVS project to a PHP based project and all php related features will work. 

No comments: