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 34771 - Canot convert cookies to Collection of Lookup.Items
Summary: Canot convert cookies to Collection of Lookup.Items
Status: RESOLVED WONTFIX
Alias: None
Product: contrib
Classification: Unclassified
Component: Looks (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-07-07 13:38 UTC by Vitezslav Stejskal
Modified: 2008-12-22 13:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (4.14 KB, text/plain)
2003-07-09 13:55 UTC, Vitezslav Stejskal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vitezslav Stejskal 2003-07-07 13:38:43 UTC
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.
Comment 1 Vitezslav Stejskal 2003-07-09 13:55:53 UTC
Created attachment 10910 [details]
Proposed patch
Comment 2 Vitezslav Stejskal 2003-07-09 13:58:19 UTC
The above patch should be considered as one way how this problem could
be fixed, but it's very likely not in 'production' quality.
Comment 3 Petr Hrebejk 2003-08-06 14:38:58 UTC
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.
Comment 4 Vitezslav Stejskal 2003-08-11 08:52:26 UTC
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.
Comment 5 Petr Hrebejk 2004-07-20 14:58:27 UTC
Changing target milestone on all Looks issues to future
Comment 6 Petr Hrebejk 2007-01-09 14:54:22 UTC
x