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 209568 - Custom MIMEResolver not called for files with ".mod" extension
Summary: Custom MIMEResolver not called for files with ".mod" extension
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.1.1
Hardware: PC Linux
: P1 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 13:16 UTC by mgoe
Modified: 2012-03-27 08:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Simple MIMEResolver showing the problem (753 bytes, text/x-java)
2012-03-14 13:35 UTC, mgoe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mgoe 2012-03-14 13:16:06 UTC

    
Comment 1 mgoe 2012-03-14 13:32:36 UTC
In an application based on the Netbeans platform 7.1.1 I tried to add a custom MIMEResolver for an own MIME-type. The files the resolver should classify end with ".mod" extension. Unfortunately my custom resolver is never called for files ending with ".mod". I have found out so far that some Netbeans resolver comes first and classifies the file as a Fortran-mod-file. It seems that setting a position attribute for my resolver is not honored. I tried Integer.MIN_VALUE, 0 and Integer.MAX value with no success. My resolver seems to be called as the last one in any case. I checked this with a filename for which no other resolver kicked in. Please find attached a simple resolver showing the problem.

Best regards,
Martin
Comment 2 mgoe 2012-03-14 13:35:03 UTC
Created attachment 116717 [details]
Simple MIMEResolver showing the problem
Comment 3 Jaroslav Tulach 2012-03-16 13:41:25 UTC
Please register the resolver in declarative way. In 7.2 it would be: http://bits.netbeans.org/dev/javadoc/org-openide-filesystems/apichanges.html#MIMEResolver.Registrations

As an alternative, consider disabling the Fortran registration via branding.
Comment 4 mgoe 2012-03-27 08:06:40 UTC
Hello Jaroslav,

I did not quite get your point. Is MIMEResolver registration via annotation
@ServiceProvider(service = MIMEResolver.class, position = Integer.MIN_VALUE)
no longer supported in Netbeans 7.1.1?

Until this bug (ignoring the position attribute) has been fixed,
I would like to disable the Fortran registration via branding,
but unfortunately I have not found out how this could be done.
Could you please tell me how to do this?

Best regards,
Martin