Eclipse + Drupal

Notes on configuring Eclipse specifically for Drupal

http://www.eclipse.org/
Eclipse

http://www-128.ibm.com/developerworks/ibm/library/i-osource13/
Using open source software to design, develop, and deploy a collaborative Web site, Part 13: PHP development within Eclipse

http://groups.drupal.org/node/2663
discussion of Eclipse + Drupal

http://drupal.org/node/75242#comment-230643
Revised preferences for PDT
Sean B Fuller - May 10, 2007 - 15:00

I just upgraded to the PDT All-In-One, .07 RC3. Here is a clean list of the preferences. If someone wants to confirm that I didn't miss anything, perhaps a moderator-type could promote this list into the page?

After you have it installed, go to Windows -> Preferences and make the following changes:

1. Content Types

1. Expand the left-hand menu to General -> Content Types
2. Under "Content types" on the right, click Text -> PHP Source File
3. Add the *.engine, *.theme, *.install, *.inc, and *.module file types

2. Tab formatting for PHP

1. Expand the left-hand menu to PHP -> Formatter
2. Check the "Indent using spaces" radio button.
3. Change the indent size to 2.

3. Tab formatting for CSS

1. Expand the left-hand menu to Web and XML -> CSS Files -> CSS Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

4. Tab formatting for JavaScript

1. Expand the left-hand menu to Web and XML -> Javascript Files -> Javascript Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

5. Tab formatting for HTML

1. Expand the left-hand menu to Web and XML -> HTML Files -> HTML Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

6. Tab formatting for XML

1. Expand the left-hand menu to Web and XML -> XML Files -> XML Source
2. Select 'Indent using spaces'
3. Set 'Intentation size' to 2

7. Make it Unix-friendly

1. Expand the left-hand menu to General ->Workspace
2. Text File encoding should be UTF-8
3. New text file line delimeter should be Unix

8. Set default text mode to -kkv

This keeps the patches you create from breaking the tags on drupal and other cvs repositories. To make this change:

1. Expand the left-hand menu to Team -> CVS
2. Click on the Files and Folders tab
3. set the "Default text mode" dropdown to "ASCII with keyword expansion (-kkv)"

I've heard reports that they are some issues with tabs, but that was a while ago and I haven't heard anything since. All of the above settings seem to work fine. I tested this configuration and pulled the output into word and turned on formatting marks and everything looked correct.

9. Tabulators

I'm not sure about this one. It seems to work the same either way:

1. Expand the left-hand menu to PHP -> Editor -> Typing
2. Check the "Tab key indents the current line" under Tabulators

--------------------
Sean B. Fuller
www.seanbfuller.com
www.tractiv.com