timboudreau opened a new pull request #2232:
URL: https://github.com/apache/netbeans/pull/2232


   One of the most common uses of `ProxyLookup` is to dynamically change the 
set of `Lookup`s being proxied (a quick grep finds 53 such cases in the 
NetBeans source base, and I can think of > 10 I have written in external 
modules).  For each consumer of the API that needs to do this, it is necessary 
to write identical subclasses with a public or package visibility method that 
exposes one of `ProxyLookup`'s `setLookups()` methods.
   
   This patch adds `ProxyLookup.create(Consumer<Consumer<Lookup[]>>)` and 
`ProxyLookup.createThreaded(Consumer<BiConsumer<Executor, Lookup[]>>) `to 
satisfy the non-threaded and threaded-event-delivery variants supported as 
protected methods on ProxyLookup.  These allow a mechanism for updating the set 
of proxied lookups to be passed to the caller without exposing that machanism 
to consumers of the returned Lookup or any code other that which immediately 
instantiates it, which was the objection @jtulach had many years ago to 
exposing it as public.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to