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 56288

Summary: Register java extension resolver to MIME resolver list
Product: java Reporter: Antonin Nebuzelsky <anebuzelsky>
Component: UnsupportedAssignee: Martin Matula <mmatula>
Status: CLOSED FIXED    
Severity: blocker CC: issues, jtulach
Priority: P2 Keywords: PERFORMANCE
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 55701    

Description Antonin Nebuzelsky 2005-03-11 16:05:59 UTC
Currently java extension is not registered to directly map to text/x-java MIME
type and therefore MIMEResolverImpl$Type.accept() does not immediately map
MyClass.java against java in the list of extensions and instead goes through
checking various magic strings against the file (opening the java file and
reading its head).

Simple registering of MIME resolver xml with the following contents prevents this:

<MIME-resolver>
    <file>
        <ext name="java"/>
        <resolver mime="text/x-java"/>
    </file>
</MIME-resolver>
Comment 1 Martin Matula 2005-03-14 12:31:33 UTC
Fixed.
Checking in src/org/netbeans/modules/java/Bundle.properties;
/cvs/java/src/org/netbeans/modules/java/Bundle.properties,v  <--  Bundle.properties
new revision: 1.81; previous revision: 1.80
done
Checking in src/org/netbeans/modules/java/resources/mf-layer.xml;
/cvs/java/src/org/netbeans/modules/java/resources/mf-layer.xml,v  <--  mf-layer.xml
new revision: 1.54; previous revision: 1.53
done
RCS file: /cvs/java/src/org/netbeans/modules/java/resources/mime-resolver.xml,v
done
Checking in src/org/netbeans/modules/java/resources/mime-resolver.xml;
/cvs/java/src/org/netbeans/modules/java/resources/mime-resolver.xml,v  <-- 
mime-resolver.xml
initial revision: 1.1
done
Comment 2 Antonin Nebuzelsky 2005-03-23 13:56:42 UTC
OK