Posts Tagged ‘Drupal’

PHP Editor Support for .module and .inc Files in Eclipse

July 1, 2011 1 comment

I have been using eclise from and found very helpful editor to write the PHP programs. It provides in-buit support for developing PHP programs. While working on a Drupal project, I encounterd that Drupal uses PHP code (specially in modules) written in files having .module and .inc extensions. Ecplise doesn’t provide the built-in support for these extensions. So, when you open these files, the will appear as simple text files with no PHP editor support.

I did some R&D and found one solution for this problem. We can add the content types in eclise to solve this problem. Here are the steps:

Step -1: Go to Window -> Preferences

Step -2: Click on General -> Content Types. Select “PHP Content Type”, then click “Add” button. Write “*.module” or “*.inc” in Content Type text box in new window and then click “OK” button.

Step -3: Click on Editors -> File Associatons. Click on first “Add” button and type “*.module” or “*.inc” in File Type text box in new window and then click OK

Step -> 4: Then click “OK” button to close the Preferences window and restart eclipse.

Now when you will open any .module or .inc files, the editor will have PHP support.

Categories: Technical Tags: , ,