This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 73394

Summary: "New File"Tempate creates wrong MIME-resolver file
Product: apisupport Reporter: sanchofx1 <sanchofx1>
Component: TemplatesAssignee: Jesse Glick <jglick>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P4    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description sanchofx1 2006-03-08 18:40:22 UTC
The generated XML file for the MIME-resolver is not always consistent with the
options one enters in the GUI dialog. If one would like to create a file type
for an XML file with the root element <root> and the file extension "abc" the
XXResolver.xml file generated has:
1. The file name extension set to "xml" (instead of "abc")
2. The xml-rule tag has: <element ns="root"/> instead of <element root="root"/>
The user must hand-edit the resolver file to get it's file type recognized. This
is an example what is generated for a new "file type" with the extension "bar"
and the root element "java":
<MIME-resolver>
    <file>
        <ext name="xml"/>
        <resolver mime="text/x-bean-archive+xml">
            <xml-rule>
                <element ns="java"/>
            </xml-rule>
        </resolver>

    </file>
</MIME-resolver>
Comment 1 Jesse Glick 2006-03-08 19:25:19 UTC
1. You cannot select both XML document type recognition and file extension
recognition. That is why they are mutually exclusive radio buttons in the
wizard. Of course you can always later edit the resolver XML file to do this if
you wish.

2. Already an open RFE for recognition by XML root element, rather than
namespace, but this is not implemented in the current GUI.