views:

205

answers:

1

I have several file extensions, like .module, that I would like to be understood by Eclipse to be PHP - so I get the same syntax highlighting, code completion, etc features as I would if I were editing a .php file. How can I do this?

I went to Window >> Preferences >> General >> File Associations and added *.module to the file types list. When I click on *.module, it now says the associated editors are the PHP Editor and the Text editor.

However, when I open the *.module file to edit it, it gives me an error message:

Unsupported content type in editor. To associate a file extension with a supported content type, please see the Content Types Preferences Page.

What am I doing wrong?

fixed: restarted Eclipse, and now it works.

+3  A: 

Head to Window -> Preferences. Drill down to General -> Editors -> File Associations. From here you can add your extensions (e.g., *.module) and associate them with your preferred PHP editor.

cowgod
I've tried this, yet I think I'm still doing something wrong (see above.)
Rosarch
you have to restart eclipse after doing this for the fix to take
Scott Evernden