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

Summary: ProxyLookup doesn't delegate to underneath lookups
Product: platform Reporter: Martin Roskanin <mroskanin>
Component: LookupAssignee: Jaroslav Tulach <jtulach>
Status: VERIFIED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Test diff
updated test diff

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.