[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension


Eclipse (software)
Image via Wikipedia

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:

  1. Open your (my favorite) editor ECLIPSE PDT.
  2. Click on “Window” in the top-menu.
  3. Expand the section “General”.
  4. Then, expand the section “Editors”.
  5. Now, click on “File Associations”.
  6. You should see “File Type” and “Associated Editors” in right panel.
  7. 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”.
  8. Select the above newly added file-type and you should see no editors for this under “Associated Editors” panel – because this is newly added.
  9. 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.
  10. 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!

[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension

2 thoughts on “[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension

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