Home > Technical > PHP Editor Support for .module and .inc Files in Eclipse

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

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.

Advertisements
Categories: Technical Tags: , ,
  1. June 8, 2013 at 7:58 am

    I always was concerned through this subject and still
    am, thanks for posting.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: