Object types and file association problems in NB 6.1 M1

View: New views
6 Messages — Rating Filter:   Alert me  

Object types and file association problems in NB 6.1 M1

by Giulio Toffoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I've tried to install the ireport plugin on NetBeans 6.1 M1 (200801280931). The result is that jrxml file are no longer recognized as reports, but they are recognized as normal xml files.
Playing a bit the NetBeans I discoverd that in the advanced options the object type "XML Object" comes before "JRXML Files". Changing the order of the object types fixed the problem.

Now, I tried to open and close NetBeans several times and I just noticed that actually the order of the object types change all the time (it is not deterministic). See the attached picture.



This is currently a major issue when running the iReport plugin with NB 6.1. The problem has been never experience with NB 6.0 and NB 6.0.1.

Please note that in the layer.xml I set the position attribute for my MIME resolver and in effects the File Types branch in the advanced options correctly shows the "Jrxml Files" mime type on top of the list.

Any idea? Should I submit a bug?


Thanks

Giulio


Re: Object types and file association problems in NB 6.1 M1

by Jesse Glick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Giulio Toffoli wrote:
> [...] in the advanced options the object type "XML Object" comes
> before "JRXML Files". Changing the order of the object types fixed
> the problem.
>
> Now, I tried to open and close NetBeans several times and I just
> noticed that actually the order of the object types change all the
> time (it is not deterministic).

Right, which is why you need to fix the order:

http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#sec-loader


Re: Object types and file association problems in NB 6.1 M1

by Giulio Toffoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Well.... I don't want have to fix the order, does it make really sense? A random order all the times?

By the way I set all the rules I need in terms of loader order requirements in my module manifest:

Name: com/jaspersoft/ireport/JrxmlDataLoader.class
Install-Before: org.openide.loaders.XMLDataObject, org.netbeans.modules.xml.core.XMLDataObject
OpenIDE-Module-Class: Loader


What I'm doing wrong? Why 6.0 works well?

Giulio

Re: Object types and file association problems in NB 6.1 M1

by Jesse Glick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Giulio Toffoli wrote:
> Name: com/jaspersoft/ireport/JrxmlDataLoader.class
> Install-Before: org.openide.loaders.XMLDataObject, org.netbeans.modules.xml.core.XMLDataObject
> OpenIDE-Module-Class: Loader

This ought to suffice to ensure that your loader is always before the
XML loader. If you can reproduce otherwise, please file a bug report
with a minimal self-contained test case and it will be investigated.


Re: Object types and file association problems in NB 6.1 M1

by Giulio Toffoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I created the issue 128651:

http://www.netbeans.org/issues/show_bug.cgi?id=128651

I attached to the issue a simple module to demonstrate the problem.

Thanks

Giulio

Re: Object types and file association problems in NB 6.1 M1

by Giulio Toffoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks Jesse for the solution.

For other people having the same problem with NB 6.1, the solution is to add the new class name that implrmements the XML Object loader in this way:

Install-Before: org.openide.loaders.XMLDataObject, org.netbeans.modules.xml.core.XMLDataObject, org.netbeans.modules.xml.XMLDataObject

Bye

Giulio