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.
Build: NetBeans IDE Dev (Build 201201150601) VM: Java HotSpot(TM) Client VM, 22.0-b10, Java(TM) SE Runtime Environment, 1.7.0_02-b13 OS: Linux User Comments: muellermi: just to provide information cyhelsky: scan was initiated by closing all projects - imho there should be no scan in this case Stacktrace: java.lang.Exception: Scan canceled. at java.lang.Thread.getStackTrace(Thread.java:1567) at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:74) at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:67) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.scheduleFirer(PathRegistry.java:813) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.resetCacheAndFire(PathRegistry.java:808) at org.netbeans.modules.parsing.impl.indexing.PathRegistry.access$500(PathRegistry.java:84)
Created attachment 114954 [details] stacktrace
When closing project the method org.netbeans.modules.project.ui.ProjectUtilities.storeProjectOpenFiles(ProjectUtilities.java:496) triggers saving of project files and org.netbeans.modules.java.api.common.SourceRoots$ProjectMetadataListener.configurationXmlChanged(SourceRoots.java:561) listens and through resetCaches triggers change in project roots.
Perhaps resetCaches could check whether there is an actual change in sourceRootURLs and/or sourceRootProperties before refiring an event. What is the actual query triggering indexer rescan - Sources, SourceForBinaryQuery.Result, ClassPathImplementation (for SOURCE), or some combination?
The SR fired as the event come from projectXMLChanged. To verify that the sourceRootProperties has changed the resetCaches will need to parse the projectXML, this may be problematic if lots of event comes. When only property changes the SR fire only if changed property is a source root property. But the change come form private.xml, ignoring the event when ev.getPath() == APH.PRIVATE_XML_PATH may be enough. I will try.
fixed jet-main b9fc9222ea3c
Integrated into 'main-golden', will be available in build *201201250600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b9fc9222ea3c User: Tomas Zezula <tzezula@netbeans.org> Log: #207377:[71cat] Closing project causes its re-scanning.