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 60010 - ProxyLookup doesn't delegate to underneath lookups
Summary: ProxyLookup doesn't delegate to underneath lookups
Status: VERIFIED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 11:07 UTC by Martin Roskanin
Modified: 2008-12-22 19:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test diff (1.83 KB, text/plain)
2005-06-15 11:09 UTC, Martin Roskanin
Details
updated test diff (2.44 KB, text/plain)
2005-06-17 14:19 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2005-06-15 11:07:31 UTC
ProxyLookuping via Template doesn't delegate to underneath lookups. 
See attached test, where
 assertTrue("Template lookup performing", templateLookupPerformed[0]);//NOI18N
will fail.
Comment 1 Martin Roskanin 2005-06-15 11:09:01 UTC
Created attachment 22689 [details]
Test diff
Comment 2 Jaroslav Tulach 2005-06-16 17:11:59 UTC
If you add call to result.allXXX() or addLookupListener the template method 
will be called. Otherwise there is no reason to do it. 
Comment 3 Martin Roskanin 2005-06-17 14:18:59 UTC
Yes, result.allInstances() works correctly, but addLookupListener not - and
particularly this is causing problem in MimeLookup.
Reopening, attaching updated diff.
Comment 4 Martin Roskanin 2005-06-17 14:19:44 UTC
Created attachment 22769 [details]
updated test diff
Comment 5 Jaroslav Tulach 2005-06-19 18:54:18 UTC
In my previous post I expressed myself poorly. addLookupListener need not 
trigger the query. 
 
The whole concept is based on assumption that there is no need to notify 
changes, if one does not know the original state and in order to know the 
state, you must do allXXX() query.  
 
The simplest fix is to do result.allItems(); 
 
If possible, use it, as I am affraid that changing the behaviour to fire more 
often would be complex and could affect already existing code. 
 
Reopen if I do not sound sane. 
Comment 6 Martin Roskanin 2005-06-20 08:37:50 UTC
>The whole concept is based on assumption that there is no need to notify 
>changes, if one does not know the original state and in order to know 
>the state, you must do allXXX() query.  

OK, it sounds reasonable. I already use this approach in my tests and it works
=> Verified. Thanks for explanation.