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.
Created attachment 155331 [details] Sample project It is not easy to describe, so I am attaching a sample project to simulate the issue. For further search, the problem happens when I use BigDecimal constants from a utility class located in the test folder. If I use constants from BigDecimal itself of local constants, it works as expected. To reproduce the problem follow these steps: 1. Open the project and the class SampleClassTest.java 2. Ask the IDE to find usages for sampleMethod2() 3. The expected result is no occurrences 4. Now, comment out the line 14 and repeat step 2 5. Now you will be able to the the correct result, with 1 occurrence I haven't tried it yet in 8.0.2 or 8.1, just in daily builds. Product Version: NetBeans IDE Dev (Build 20150811-1eb09322782a) Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16 System: Linux version 3.4.63-2.44-desktop running on amd64; UTF-8; en_US (nb)
I think it is a P1 because it is really hard to reproduce and it breaks a lot of features, like method rename and so on. There is no easy way to fix it, just refactoring all the code that uses this pattern. Other way to make the find usages work is switch the code at line 15 with 14.
Created attachment 155336 [details] Screenshot The tree type is not resolved. Class is <any> and type is ERROR.
Reassigning to java.source, please evaluate. Thanks!
I cannot reproduce the errors in the tree. Yellow underline for package statement is probably caused by missing artifact in maven local repo - run a priming build. When I primed Maven and then incidentally restarted the IDE with cleaned caches (and waited for the background scan to finish) I still could not find any usages of sampleMethod2().
changeset: f586d574f534 user: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date: Fri Aug 14 15:30:17 2015 +0200 summary: #254344 / #254353 - Using the classpath from one src root is not enough
Integrated into 'main-silver', will be available in build *201508150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f586d574f534 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #254344 / #254353 - Using the classpath from one src root is not enough
v. Build 20150817-c02dc2608c53