How can I create declarative MIMEResolver and add new file type?
Note: These pages are being reviewed.
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+