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 open 2 projects which has each a copy of the same source files. Do you understand? project1 src f1.java f2.java project2 src f1.java f2.java First I set project1 as main project. I use 'Find usages' to find the usage of a variable, it search in the files of project1. Then I set project2 as main project. I find usages of variable of project2, but, unfortunately, it still search in the files o project1! Even I close the project1, it still search project1! I am crazy almost, I close the netbeans and run it again, but it still search project1! This time I crazy.... I often mis-search the wrong project and click to go to the wrong file, and edit wrong file of wrong project! I like netbeans after use jbuilder and eclipse, but if you do not fix this stupid bug in 4.2 release, I should say bye-bye to the poor netbeans.
Reassigning to refactoring module
I'm not able to reproduce the issue, please could you try more recent build of IDE? Thanks.
*** Issue 61389 has been marked as a duplicate of this issue. ***
Message from reporter: It is easy to reproduce if you do such way: 1) new a mobile project A. 2) add some classes in each files. for example, there are 5 .java files in the project. 3) new a empty mobile project B, that is to say, do not create hello midlet by the project wizard. 4) copy the source files of project A to the source directory of project B. so the 2 projects has the same name files. 5) now set A as main project. 6) find usages of a variable in A 7) close A, set B main project 8) find usages of a variable in B, you should notice that the search result is of files of A! though A has been closed. 9) how to avoid this bug? I know a 100% ok method -- exit the netbeans, and re-start netbeans, so all right!
I'm still not able to reproduce in java project I will try mobile ones. Where and how do you invoke Find Usages action?
Milane, are you able to reproduce this bug with mobile projects?
I'm still not able to reproduce even in Mobile projects. I'm probably missing some important step. How and where do you invoke Find Usages action? Are you still able to reproduce it?
We are sorry, we cannot reproduce it. Please reopen if you are able to reproduce this bug in latest builds.