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 208670 - @DataObject.Registrations
Summary: @DataObject.Registrations
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
Depends on:
Blocks: 207219 208394
  Show dependency tree
Reported: 2012-02-20 21:45 UTC by skygo
Modified: 2012-02-28 11:14 UTC (History)
2 users (show)

See Also:
Exception Reporter:

@DataObject.Registrations api, processor, test (24.37 KB, patch)
2012-02-20 21:45 UTC, skygo
Details | Diff
@DataObject.Registrations api, processor, test with mimeType as String (25.86 KB, patch)
2012-02-24 13:51 UTC, skygo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description skygo 2012-02-20 21:45:09 UTC
Created attachment 115967 [details]
@DataObject.Registrations api, processor, test

Hi this is a continuation of issue #207219,

this patch is for the possibility of having multiple dataobject registration on the same class allowing customisation per mimetype.
As this addition is in strenght relation with 207219 I keep 7.36 version for this.

This is blocking potential refactoring of image module and maybe other one.

Wihtout this patch you must merge displayName
@DO.Registration{mimetype={"image/gif","image/png},displayName="... file")

This patch should allow something like this (rough code)
@DO.Registration{mimetype={"image/png","image/pneg"},displayName="PNG file"),
@DO.Registration{mimetype="image/gif",displayName="GIF file")
Comment 1 Jesse Glick 2012-02-20 22:35:29 UTC
[JG01] Should make mimeType be of type String, not String[] - there should not be two ways of doing one thing.
Comment 2 skygo 2012-02-23 00:17:20 UTC
(In reply to comment #1)

[JG01] It will lead to more line for registration in some case, but I'am fine with restricting to String.

To handle this I need to know what to do with apichange. 
As netbeans 7.2 is not out is it fine to keep 7.36 version which is the version introducting the issue #207219 ?
Comment 3 Jaroslav Tulach 2012-02-23 20:57:31 UTC
Let's keep 7.36 and update it to mention there is Registrations as well since then.
Comment 4 skygo 2012-02-24 13:51:40 UTC
Created attachment 116085 [details]
@DataObject.Registrations api, processor, test with mimeType as String

According to


Change mimeType String[] to simple String

Unit Test changed accordingly 

ApiChange patched still in 7.36
Comment 5 Jaroslav Tulach 2012-02-27 09:22:02 UTC
I've put the code on branch
and I'd like to integrate tomorrow, if there are no objections.
Comment 6 Jesse Glick 2012-02-27 19:26:04 UTC
I do not think you want DoFPDataObjectMultiple and DoFPDataObject to both use position = 3565, or there will be warnings in unit tests.
Comment 7 skygo 2012-02-27 20:20:27 UTC
(In reply to comment #6)
> I do not think you want DoFPDataObjectMultiple and DoFPDataObject to both use
> position = 3565, or there will be warnings in unit tests.

mimetype is different "text/test1" vs "text/testm1". Maybe I should use more different name to avoid confusion.
Comment 8 Jesse Glick 2012-02-27 20:43:00 UTC
(In reply to comment #7)
> mimetype is different "text/test1" vs "text/testm1".

OK, in that case o.o.filesystems.Ordering should issue no warnings I think.
Comment 9 Jaroslav Tulach 2012-02-28 11:14:27 UTC
Merged as core-main#e1113a819b22