Adding filetypes to Netbeans

I’ve been using Netbeans for web development with PHP for some time now and just keep on finding neat tricks. Most of the times I use TemplatePower for templating in my PHP applications. Your template files have to have the extension .tpl to work with TemplatePower. I had a problem with this because Netbeans didn’t recognize the files as html files (which they effectively are). There’s an easy way to fix this however, which works like this:

Go to Tools -> Options and click on ‘Miscellanous’. Now open the type called ‘File associations’. Click new, enter the extension for which you want to assign a file type and hit ‘Ok’. Now choose the associated File Type (MIME) that you want to go with this file extension. Done! You can do this for any file extension you want.

7 reacties op Adding filetypes to Netbeans

  1. doesn’t work on netbeats 6.5.

  2. Hey Kara, it worked for me, what’s the problem?

  3. yeah, doesn’t work on nb 6.5. The problem is that there’s no type called “file associations”. or where exactly is it supposed to be?

    thanks in advance!

  4. Yes :) Thank you for this!

  5. The tab is “Files” and “File associations” is the first listed section

  6. Thanks Chris, that’s real helpful! :)

  7. Thanks!!!

Wat vind jij ervan? Laat nu je reactie achter: