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.

Bug 207704

Summary: ScanUtils background scan - aware support
Product: java Reporter: Svata Dedic <sdedic>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, dkonecny, marfous, sdedic
Priority: P3 Keywords: API_REVIEW
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Svata Dedic 2012-01-25 08:12:11 UTC
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
Comment 2 David Konecny 2012-01-25 22:22:21 UTC
Thanks Svata. I only looked at the helper methods provided and that looks good. I would suggest to rename "mayBecomeCompleted" into something like "isElementBeingScanned".
Comment 3 Svata Dedic 2012-01-26 10:04:07 UTC
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
Comment 4 Tomas Zezula 2012-01-26 10:46:38 UTC
Seems good to me.
Comment 5 Svata Dedic 2012-02-14 20:07:25 UTC
Integrated in jet-main #94fc0582b286