Checkout Drupal CVS into the Eclipse Workspace
Last modified: December 6, 2007 - 19:13
Eclipse is a good way for developers to contribute to Drupal, it has integrated CVS Support and a good PHP Plugin for full PHP4/PHP5 support including a debugger, syntax highlighting, code completion and more.
Installing Eclipse with PHP Support
Grab a copy of Eclipse from eclipse.org/pdt. The installation is easy. Extract the zip file and start Eclipse.
Checkout Drupal in your Eclipse workspace
The easiest way to get Drupal into your Eclipse Workbench is the "Import from CVS" feature.
- Start Eclipse and open the File/Import... Dialog.
- Choose "Checkout Projects from CVS", click Next then choose "Create a new repository location" and click "Next"again.
- For Anonymous Access to the Drupal CVS insert the following information:
- Host:
cvs.drupal.org - Repository Path:
/cvs/drupal - User:
anonymous - Password:
anonymous - Connection type:
pserver - Also make sure "Save Password" is checked.
- Host:
- As a developer for contrib you must type:
- Repository Path:
/cvs/drupal-contrib - User:
your username as filled out in the CVS access form - Password:
your password
- Repository Path:
- In the "checkout Module" dialog select "Use an existing module" and choose the module you want, "drupal" for the Drupal core, or "contribution" for the 3rd party modules and themes. Click "Next".
- Check out the module with the "New Project Wizard" and select the branch you want, this is usually "HEAD", now press "Finish".
- In the "New Project Wizard" select PHP/PHP Project as project type. This project type only appears if you have PHP Eclipse installed, if you don't have PHP Eclipse installed use "Simple/Project" instead.
- Give the module an useful name like
"drupal-contrib"and press finish. - Once the CVS checkout starts, the contrib module take a long time (around 15 Minutes), so don't be impatient.

If you want multiple Drupal versions...
...then an easier way is to use the team project set over at http://drupal.org/node/80667
This can checkout all core version branches and also contrib branches and create projects for each in a single swoop!
Try not to use the checkout wizard
I found it better to NOT use the New Project Wizard but instead the "checkout as project in the workspace" option. It gives more control and I also found the wizard liked to do some fancy tricks without asking me first, merging with another project I had "next door". It will also put the checked out folder as a sub folder of the project folder. the "checkout as project in the workspace" option gives the possibility to checkout and project folder as one and the same root folder, if you want to.
Drawbacks of not using the checkout wizard
The drawback to using "checkout as project in the workspace" is that eclipse will not recognize the project as a php project, so all of the php-related functionalities (autocompletion, function browser, etc) will not be available.
you can do r.m.b. 'Configure > Add PHP Support' for a project
disclaimer: I'm new to Eclipse (well, last time I tried it was when it was originally released. Been just a wee while.) and just figuring out how to get things set up for Drupal development with it. But that said...
I'm using Eclipse 3.5.1 with PDT 2.1.3, and once I've checked out a project using CVS, I can then select the project and bring up a context menu using the right mouse button (r.m.b.), then select
Configure > Add PHP Supportand that enables those "php-related functionalities."I bet there's a configuration you can change in Eclipse so that the default project type created is what you want (PHP).
At the moment checking out
At the moment checking out Drupal HEAD gives me the current version of D7. What is the command for getting the current version of D6? The suggested team project is supposedly set to checkout Drupal 4 and 5 as well but i do not need them.
...of je stopt de stekker erin.