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.
NetBeans IDE Dev (Build 200610261800) 1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b100 Windows XP version 5.1 running on x86 en_US (nb); Cp1252 Sometimes the find usages for method retun empty result, although there are some usages. I cannot find out when this happens so I'am attaching the project, where it is reproducible (from fresh userdir). Steps to reproduce: 1) open attached project 2) open class handlerdemo.Spool 3) find usages of metohod "find" -> no usages found but in class Handler there are two (in the method "get")
Created attachment 35593 [details] project
I cannot reproduce, but I suppose, that there must be some exceptions in the log, if find usages did not work. Please attach them.
I've found another test case (reproducible on 2 computers). 1) Open attached project (note, use the new one) 2) open class testpack.Test 3) put caret on declaration of method run (or setup) 4) find usages -> 0 occurrences found, but apperently used in method go() in the same class -> if this class is copy pased to another project is works fine
Created attachment 35674 [details] new test project
There is no such class testpack.Test in the project.
Did you use the new version of the project (attached on Tue Oct31)?
OK. My fault. Now I see testpack.Test. But again - it works for me. I need to do clean/update/build and test it again.
Now it does not work. Strange. Anyway from the debugger I can see, that I have an identifier -JCIdent- "run" and I have corresponding TreePath, but if I do workingCopy.getTrees().getElement(path), I get null. It worked few weeks ago, I hope. And it works even now - sometimes. Or is it correct to get null? How can I resolve this identifier? Thanks.
This bug is blocker for Find Usages and Refactoring.
Sorry, but I have less common with this method than you. :-)
I'will take a care of this.
Checking in java/src/org/netbeans/modules/refactoring/java/plugins/JavaWhereUsedQueryPlugin.java; /cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/JavaWhereUsedQueryPlugin.java,v <-- JavaWhereUsedQueryPlugin.java new revision: 1.3; previous revision: 1.2 done Partial fix, the same problem is probably on more places in the refactoring/java module.
Hm. In case of refactoring this kind of fix produce several ModificationResults. How can I merge those results? I'd like to do refactoring in one commit... Thanks.
Checking in source/src/org/netbeans/api/java/source/TreePathHandle.java; /cvs/java/source/src/org/netbeans/api/java/source/TreePathHandle.java,v <-- TreePathHandle.java new revision: 1.3; previous revision: 1.2 done
The problem of this issue was that the javac got a wrong classpath which does not contained needed dependencies and had mixed (source+compile+bootpath) in both -source and -classpath.
As far as I know, I am not a Jackpot expert :-), for Jackpot its' quite easy how many of ModificationResults it has if they are mutual distinct which is exactly this case.
*** Issue 88727 has been marked as a duplicate of this issue. ***
Checking in RenameRefactoringPlugin.java; /cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/RenameRefactoringPlugin.java,v <-- RenameRefactoringPlugin.java new revision: 1.5; previous revision: 1.4 done Checking in JavaWhereUsedQueryPlugin.java; /cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/JavaWhereUsedQueryPlugin.java,v <-- JavaWhereUsedQueryPlugin.java new revision: 1.4; previous revision: 1.3 done Checking in JavaRefactoringPlugin.java; /cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/JavaRefactoringPlugin.java,v <-- JavaRefactoringPlugin.java new revision: 1.3; previous revision: 1.2 done
verified