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.

Bug 60834 - it find usages in wrong project!
Summary: it find usages in wrong project!
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords: RANDOM
: 61389 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-11 12:13 UTC by evzhy
Modified: 2007-04-03 18:02 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description evzhy 2005-07-11 12:13:07 UTC
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.
Comment 1 Martin Roskanin 2005-07-12 14:37:35 UTC
Reassigning to refactoring module
Comment 2 Milan Kubec 2005-08-09 12:25:23 UTC
I'm not able to reproduce the issue, please could you try more recent build of
IDE? Thanks.
Comment 3 Milan Kubec 2005-08-09 12:30:41 UTC
*** Issue 61389 has been marked as a duplicate of this issue. ***
Comment 4 Milan Kubec 2005-08-10 15:09:18 UTC
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!
Comment 5 Milan Kubec 2005-08-10 15:49:19 UTC
I'm still not able to reproduce in java project I will try mobile ones.

Where and how do you invoke Find Usages action?
Comment 6 Jan Becicka 2005-10-20 15:44:24 UTC
Milane, are you able to reproduce this bug with mobile projects?
Comment 7 Milan Kubec 2005-10-27 09:37:36 UTC
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?
Comment 8 Jan Becicka 2005-12-22 13:54:36 UTC
We are sorry, we cannot reproduce it. Please reopen if you are able to reproduce
this bug in latest builds.