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 - "New File"Tempate creates wrong MIME-resolver file
Summary: "New File"Tempate creates wrong MIME-resolver file
Status: RESOLVED INVALID
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-08 18:40 UTC by sanchofx1
Modified: 2006-03-08 19:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.