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.
ScanUtils represent utilities that help parser Task writers to avoid reporting false errors resulting from incomplete scan. They allow to combine JavaSource.runWhenScanFinished with runUserActionTask so that the action is typically not blocked by a background rescan, but can indicate that current data is incomplete and will be rescheduled after scanning finishes and then restarted. Howto and explanation: http://wiki.netbeans.org/BackgroundScan_HowTo#Support_Utilities
Source: http://hg.netbeans.org/prototypes/file/3a562c99d3df/java.source/src/org/netbeans/api/java/source/ScanUtils.java
Thanks Svata. I only looked at the helper methods provided and that looks good. I would suggest to rename "mayBecomeCompleted" into something like "isElementBeingScanned".
Incorporated review items from Dusan & Lahvac. * wrapper resolve/find methods should be removed * isElementUsable should move as isErroneous() to ElementUtilities * methods should work with CompilationInfo rather than with JavaSource * variant methods added, which work with Source and Parsing API rather than JavaSource * exception handling cleaned up and unified with Parsing API / Java parser
Seems good to me.
Integrated in jet-main #94fc0582b286