Associating Template files with HTML editing engines in Eclipse
October 10, 2008 3 Comments
We have been using template files (*.tpl) for one of our projects, and editing in plain text is always painful. So, here’s a mechanism to use the default Web Editor in Eclipse to edit the files:
- Add filetype association: open Window > Preferences > General > Content Types > Look for ‘HTML’ and add ‘*.tpl’ (without quotes) to associate tpl files with html content type
- Add editor preference: open Window > Preferences > General > Editors > File Associations, and associate the ‘*.tpl’ type with the ‘Web Page Editor’.
This should also work with any other templating type that uses html as the base markup.
And then, code away to glory!