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.
The latest version of Looks API requires cookies to be returned in form of Collection of Lookup.Items. This is good for performance reasons, but prevents from writing legacy code which gets cookies by calling getCookie(Class) on some object. This is e.g. the case of o.n.api.nodes2looks.NodeProxyLook class which has to read cookies from the Node. The same problem occures when writing looks for DataObject, o.o.src.Element and its subclasses, etc. The API should be extended to provide support for this kind of legacy code.
Created attachment 10910 [details] Proposed patch
The above patch should be considered as one way how this problem could be fixed, but it's very likely not in 'production' quality.
I see that this is a problem for current usage of looks with nodes. E.g. in NodeProxyLook, visualisation of current data objects etc. However the real problem is that the Lookup is an API and using it as SPI is awkward. Often hard to implement, often ineffective (RAM), too rich, unimpelementable where only getCooke() method available. We should rather fix the more global problem than hacking around in the Looks package.
OK, I agree. We already hacked around this problem to make the Looks API working (somehow at least). I would be really happy if I could remove this patch soon.
Changing target milestone on all Looks issues to future
x