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.
I have 2 projects A and B. A> foo.java{ public static void m(){} } B> bar.java{ public static void m2(){ A.m(); } } a "find usages" of A>foo.java>m (after selecting the method and selecting "Open Projects" as Scope) doesn't list the B>bar.java>m2 method. Note: projects A and B are not linked as Libraries. I just open both projects in NetBeans. Product Version = NetBeans IDE 7.0.1 (Build 201107282000) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_20 Runtime = Java HotSpot(TM) Client VM 16.3-b01
read "foo.m()" instead of "A.m()"
(In reply to comment #0) > I have 2 projects A and B. > A> foo.java{ > public static void m(){} > } > B> bar.java{ > public static void m2(){ > A.m(); > } > } > a "find usages" of A>foo.java>m (after selecting the method and selecting "Open > Projects" as Scope) doesn't list the B>bar.java>m2 method. > Note: projects A and B are not linked as Libraries. I just open both projects > in NetBeans. > Product Version = NetBeans IDE 7.0.1 (Build 201107282000) > Operating System = Windows XP version 5.1 running on x86 > Java; VM; Vendor = 1.6.0_20 > Runtime = Java HotSpot(TM) Client VM 16.3-b01 It's working if the projects are (1) linked as Libraries and (2) open. The UI label doesn't reflect that behavior: we have to read "Scope: Open Linked Projects" but it's should be better to have "Scope: Linked Projects". The search should be done into the open linked projects but into the closed linked projects too.
If project A is not a dependency of project B, the method m() and the method invocation on m() are not the same. There is a separate issue about Find Usages in libraries. #55291 Marking as wontfix. If you think option "Open Projects" should be named differently, please file a new issue. Thanks.
Refactoring and Usages maybe use the same internal tools but, for users, have different goals. And #55291 is open since v4 in 2005... I'll open a new ticket to rename the label, if it's possible. Thanks.
If I may ask, do you see an error in bar.java (that it cannot find "foo")? If not, what is on the bar.java's compile classpath? Thanks.