Today one of my colleague asked me to write about (a lot) a tip on Eclipse on linking appropriate editor to a particular file extension. My colleague told me he had tried to find this solution in my blog but he couldn’t – I feel sorry for that.
From now on, I will be posting quite a few of tips which I come across in my day to day life.
Today I am going to write a tip on Eclipse‘ – associating a file with any extension to any editor.
My boss always advice when you teach people keep it short and more clear – I will try
. I will write them as steps:
- Open your (my favorite) editor ECLIPSE PDT.
- Click on “Window” in the top-menu.
- Expand the section “General”.
- Then, expand the section “Editors”.
- Now, click on “File Associations”.
- You should see “File Type” and “Associated Editors” in right panel.
- In “File Type” – you can add (click on a button with name Add should be seen next to this panel) any file-type or file extension you want make sure you add it with wild-card entry (ex: *.tpl). I will add a new extension “*.tpl”.
- Select the above newly added file-type and you should see no editors for this under “Associated Editors” panel – because this is newly added.
- Now click on Add button next to “Associated Editors” panel to add the editors, it should show the list of available editors, choose the one you like. I choose HTML Editor for my above extension.
- Click OK and choose this as your default editor by clicking a button “Default” appears next to this panel.
From here after, any file with extension “.tpl” will always open in above default editor (which is HTML Editor). I hope it helps many
.
Happy Coding!
Related articles
- Command to Convert Tabs to Spaces inside any file in LINUX (rakesh.sankar-b.com)

Arafin Rubab
/ January 23, 2012In one word I’m just saying “Excellent”.