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 209241 - Find Usages returns empty results during scan
Summary: Find Usages returns empty results during scan
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-06 15:25 UTC by Jan Becicka
Modified: 2012-04-17 11:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2012-03-06 15:25:41 UTC
Create a new project and try to find usages of class String while scan is in progress -> No Patterns found.
Comment 1 Svata Dedic 2012-03-13 08:43:03 UTC
Need to find a condition when the search should block waiting on scan. If I had reverse dependencies for the root with the searched symbol, and NONE of those (source) depenents were scanned, find usages could block.

I am surprised by the message you've pasted - I tried to search for String usages on a freshly created project, but all the time the result window appeared with the 'scanning' hint. Maybe a race condition ? Did you also hit 'scan on background' button ?
Comment 2 Svata Dedic 2012-03-20 15:56:58 UTC
Actually, I was able to get the IDE to a state when "No patterns found" was displayed even after the scanning finished.

The culprit is somehwere between ClassPathInfo and ClassIndex - at the time the "No patterns found" is printed, the ClassIndex.sourceIndeces is empty, even when the Find Usages is invoked on e.g. MultiDataObject class.

I reached the state by searching usages of j.l.s. immediately after the editor appeared. The 1st search succeeded, subsequent searches printed 'No patterns found'
Comment 3 Svata Dedic 2012-04-17 11:24:50 UTC
Cannot reproduce in recent builds (04/16 +). Could you provide some +- working reproduction scenario, if you are still able to hit the bug ?