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.
ProxyLookuping via Template doesn't delegate to underneath lookups. See attached test, where assertTrue("Template lookup performing", templateLookupPerformed[0]);//NOI18N will fail.
Created attachment 22689 [details] Test diff
If you add call to result.allXXX() or addLookupListener the template method will be called. Otherwise there is no reason to do it.
Yes, result.allInstances() works correctly, but addLookupListener not - and particularly this is causing problem in MimeLookup. Reopening, attaching updated diff.
Created attachment 22769 [details] updated test diff
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.
>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.