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.
When searching for a usage of a static method that belongs to a generated class in a maven-based project, NB returns "0 occurrences" although the method is obviously used from a class in the same project (currently opened in NB). (Interestingly, reverse navigation <shift+cmd+B> from the place of the method usage to the actual method definition in the generated class works just fine.)
I have no idea, what is "generated class". How this class was generated and where? Is it on project class path?
Created attachment 102754 [details] Generated sources in Project pane
Generated class is a class that is (obviously) generated from some other data file. This particular class is being generated from a .properties file, but that's irrelevant IMHO. The class appears in the maven project (in the Project tab) under "Generated classes" - see attached snapshot. How to reproduce: ================= 1. Checkout the project: cvs -d :pserver:guest@cvs.dev.java.net:/cvs co -AP -d project wsit/wsit/ws-rx/wsmc-impl 2. cd project 3. mvn clean install (requires maven 2.2.1; must not use maven 3.0) 4. Open project in NB 5. Open LocalizationMessages class (<Ctrl+O> or can be found under "Generated sources") 6. Navigate to public static String WSMC_0102_NO_SOAP_HEADERS() method 7. Try to find usages (expected result: 0 ccurrences) 8. Open com.sun.xml.ws.rx.mc.runtime.McClientTube class 9. Check that the method is actually used in the processRequest(...) method, line 142 10. Try to navigate from that method to the method definition in LM class (expected result: go to definition navigation works)
It looks like generated classes are not on source path. Find usages works only with classes on source path...
Probably a duplicate of bug #190852.
Related to bug #192647.
(In reply to comment #3) > How to reproduce: > ================= > 1. Checkout the project: > cvs -d :pserver:guest@cvs.dev.java.net:/cvs co -AP -d project > wsit/wsit/ws-rx/wsmc-impl > current sources are in svn at https://svn.java.net/svn/wsit~svn > 2. cd project > > 3. mvn clean install (requires maven 2.2.1; must not use maven 3.0) Seems to be no longer the case, built fine with 3.0.x > > 4. Open project in NB > > 5. Open LocalizationMessages class (<Ctrl+O> or can be found under "Generated > sources") > > 6. Navigate to public static String WSMC_0102_NO_SOAP_HEADERS() method > > 7. Try to find usages (expected result: 0 ccurrences) in both 7.1.1 and current dev, I do get 1 occurence shown.. > > 8. Open com.sun.xml.ws.rx.mc.runtime.McClientTube class > > 9. Check that the method is actually used in the processRequest(...) method, > line 142 > > 10. Try to navigate from that method to the method definition in LM class > (expected result: go to definition navigation works) again in both 7.1.1 and current dev, this appears to be working. the issue's platform is macosx, I've tried on the same platform.
tried again today with latest dev build and clean userdir, again cannot reproduce, all behaves as it should. closing as duplicate of 190852 as hinted by jglick. (other option is worksforme, but the issues look close enough) please try in the upcoming 7.2 beta or latest dev build and reopen if the issue persists for you, thank you. *** This bug has been marked as a duplicate of bug 190852 ***