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.
On large trees of directories the call to FileObject.addRecursiveListener can be quite expensive. See bug 178999 for an example. Although the problem can be workarounded by rescheduling to the call to addRL to some background thread, it may need nicer API. One option is public boolean addRecusiveListener(FCL, Callable<Boolean> callback); which will allow the client to provide a callback and return false from it, to immediately stop further execution, effectively removing the listener.
Created attachment 94953 [details] FileUtil.addRecursiveListener(..., Callable<Boolean>)
Created attachment 94959 [details] Test for the new behavior
Let's integrate tomorrow.
[JG01] Do not copy every detail of Javadoc; we cannot maintain duplicated specs. Refer to the simple overload for details, and only document the stop param.
core-main#f2104e0cf596