[Bug 225478] Schedulers are not initialized on GlobalPathRegistry update

  • From:
  • To:
  • Subject: [Bug 225478] Schedulers are not initialized on GlobalPathRegistry update
  • Date: Tue, 29 Jan 2013 14:31:42 +0000
  • Auto-submitted: auto-generated

http://netbeans.org/bugzilla/show_bug.cgi?id=225478

--- Comment #1 from Jan Lahoda 
< >
 2013-01-29 14:31:42 UTC ---
(In reply to comment #0)
> For now in CND we would like to use parsing API but not indexing API and it
> looks like registering a path in GlobalPathRegistry is not enough.

Actually, I think that the parsing part of parsing.api should work even if
nothing is registered in GPR. Only indexing part should depend on GPR.

> TaskProcessor is not created until the first access and so on. So the hack
> we're using now is to intialize all schedulers by hand in project opening 
> hook
> like:
> for(Scheduler s : Lookup.getDefault().lookupAll(Scheduler.class)) {}
> (I took this hack from ClassMemberPanel)
> That would be better to have this triggered on GlobalPathRegistry.register.

The bug appears to be in:
parsing.api/src/org/netbeans/modules/parsing/impl/Schedulers.java.init:
taskSchedulers = Lookup.getDefault ().lookupAll (Scheduler.class);

Which apparently tries to instantiate and initialize all the Schedulers. This
might have work when the code was introduced, but I am pretty sure it does
virtually nothing now, as (I think) lookupAll is now lazy. One actually needs
to iterate the collection to force the instantiation of the Schedulers.

(I think that this code, to be fully correct, should do lookupResult, listen 
on
the result and list all instances whenever the result changes. Otherwise
Schedulers in newly enabled modules may remain uninitialized. That's the fun
with NB Lookup.)

-- 
Configure bugmail: http://netbeans.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


[Bug 225478] New: Schedulers are not initialized on GlobalPathRegistry update

gorrus 01/29/2013

[Bug 225478] Schedulers are not initialized on GlobalPathRegistry update

gorrus 01/29/2013

[Bug 225478] Schedulers are not initialized on GlobalPathRegistry update

jlahoda 01/29/2013

[Bug 225478] Schedulers are not initialized on GlobalPathRegistry update

gorrus 01/29/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close