Apache NetBeans Wiki Index

Note: These pages are being reviewed.

How can I create declarative MIMEResolver and add new file type?

There is a wizard available for NetBeans modules which does this for you. Just run New File | Module Development | File Type. Fill in the MIME Type text field and choose whether to recognize file by extension or XML root element. If you want more sophisticated recognition, choose "by Filename Extension" and edit created resolver xml after you finish the wizard. In the next step type in "Class Name Prefix" your preferred prefix and finish the wizard.

Description of declarative MIME resolve can be found in this document. In most cases it should be enough to resolve files only by their extensions as the wizard does (see ext element). Other types of resolution can be more time expensive, so use them only exceptionally. Useful can be file name matching, file content matching or magic matching for binary files. Also consider existence of exit element intended for negative matching which can skips next conditions.


  Applies to: NetBeans 6.1+, pattern and name elements to 6.7+
  Related: link:DevFaqFileRecognition.asciidoc[DevFaqFileRecognition]

Apache Migration Information

The content in this page was kindly donated by Oracle Corp. to the Apache Software Foundation.

This page was exported from http://wiki.netbeans.org/DevFaqMIMEResolver , that was last modified by NetBeans user Admin on 2009-11-06T15:53:24Z.

NOTE: This document was automatically converted to the AsciiDoc format on 2018-02-07, and needs to be reviewed.