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.
-open the attached project -open Test.java -Find Usages on "Test" from public Test(String t) { - Test() will not be found
Created attachment 17999 [details] test project
Test project is really simple: public final class Test { public Test() { this(""); } public Test(String t) { } } Well there are 2 problems, why this("") is not reported as a usage: 1. ElementNavigator does not let UsageFinder to enter body of the first constructor, because there is not "Test" string there. Suggested fix: ElementNavigator should have special handling for Constructors and it's method containsIdentifierIn() should return true, if an argument contains not only the specified identifier but also "super" and "this" 2. I tried to bypass ElementNavigator, to fix this issue, but I was not successful. ConstructorInvocation.getElement() / for this("")/ returned null. Probably parser does not correctly resolve this(""). Tomasi, please take a look at it. Thanks.
Problem #2 fixed in trunk. Checking in org/netbeans/modules/javacore/parser/MDRParser.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/parser/MDRParser.java,v <-- MDRParser.java new revision: 1.62; previous revision: 1.61 done
*** Issue 52988 has been marked as a duplicate of this issue. ***
This problem may cause that refactoring makes the source uncompilable (see issue #52988) -> raising to P2.
Problem #1 - ElementNavigator fixed in trunk. Checking in src/org/netbeans/modules/javacore/jmiimpl/javamodel/ ElementNavigator.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ ElementNavigator.java,v <-- ElementNavigator.java new revision: 1.4; previous revision: 1.3 done One more fix (ConstructorInvocation must extends Invocation) in javamodel is still needed to fix this issue. Reassigning to Martin.
This issue will be fixed by integrating changes covered by issue 53550.
Fixed by resolving 53550.
OK