0

Is there a way to map multi-dot extensions to mime-types in netbeans?

Examples:

sample-file.json.st => text/json
sample-file.html.st => text/html
sample-file.xml.st => text/xml 

I want to be able to gain the syntax highlighting through the application with the addition of the ".st" suffix.

Chuck Lowery
  • 902
  • 6
  • 17
  • Why do the files have the additional "`.st`"? Are they in a Smalltalk project that adds the additional level? If so, can you configure your environment to use the proper file extension (e.g., tell it not to add the `.st`)? – RobertB Jan 14 '14 at 16:53
  • The files are StringTemplate files and I do not believe I can configure it to use a different extension, sadly. – Chuck Lowery Jan 14 '14 at 22:30
  • A hacky, temporary solution is to change the interpretation of `.st` files as you need to (change it to json when editing a `.json.st` file). See [my answer about changing `.htm` files to Smarty syntax](http://stackoverflow.com/questions/4353069/how-to-change-php-smarty-plugin-template-file-extension-in-netbeans/4356966) for the basic idea. Just change the MIME type of `.st` as you need it. – RobertB Jan 15 '14 at 00:10

1 Answers1

0

Unfortunately, no. The NetBeans MIME resolver only recognizes the extension following the last dot.

RobertB
  • 4,592
  • 1
  • 30
  • 29