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 44460 - Find Usages gives a bad result after Undo
Summary: Find Usages gives a bad result after Undo
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-07 16:59 UTC by Marek Grummich
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
classes.zip (4.93 KB, application/octet-stream)
2004-06-07 17:00 UTC, Marek Grummich
Details
Exception (5.46 KB, text/plain)
2004-06-07 17:17 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Grummich 2004-06-07 16:59:40 UTC
Build 200406061800

Steps:
- start IDE with a clear userdir
- create a new J2SE application based on attached
sources 
- invoke Find Usages for abc.B class
=> result should be 1 occurence
- invoke Refactoring->Move Class and move abc.B
class to the 'abc.def' package
- invoke Find Usages for abc.def.B class
=> I would say that the result should be 1
occurence, but 0 occurences is displayed ***
- invoke Refactoring->Undo [Move Class] and the
class is moved to the initial place
- invoke Find Usages for abc.B class again
=> The result should be 1 as in the initial state,
but 0 occurences is displayed ***
Comment 1 Marek Grummich 2004-06-07 17:00:20 UTC
Created attachment 15530 [details]
classes.zip
Comment 2 Marek Grummich 2004-06-07 17:11:53 UTC
Other observations:
- It is not possible to perform previous steps again, because 'Fatal
Error' is appeared when Move Class dialog is confirmed.
- abc.B node has 'Invalid package declaration' hint (source code looks
well - package abc;)

Comment 3 Marek Grummich 2004-06-07 17:17:29 UTC
Created attachment 15532 [details]
Exception
Comment 4 Marek Grummich 2004-06-07 17:18:52 UTC
When I restart IDE, I get an attached exception and whole IDE is a
grey area (except menu and toolbars).
Comment 5 psuk 2004-06-15 20:19:05 UTC
I see different behavior:
- start IDE with a clear userdir
- create a new J2SE application based on attached
sources 
- invoke Find Usages for abc.B class
=> result should be 1 occurence
- invoke Refactoring->Move Class and move abc.B
class to the 'abc.def' package
- invoke Find Usages for abc.def.B class
 => result is: 2 occurences (added import statement + original
"extends B") which is OK

- invoke Refactoring->Undo [Move Class] and the
class is moved to the initial place
- invoke Find Usages for abc.B class again
=> The result should be 1 as in the initial state,
but 0 occurences is displayed *** - STILL A BUG

If I do it by using Refactoring->Move, rather than Undo, it works
(although it leaves "import abc.B", that's not necessary).
Comment 6 Tomas Hurka 2004-06-22 08:41:31 UTC
Moved to new subcomponent java/javacore.
Comment 7 Jan Becicka 2004-06-23 09:53:54 UTC
Checking in RepositoryUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v
 <--  RepositoryUpdater.java
new revision: 1.9; previous revision: 1.8
done
Processing log script arguments...
More commits to come...
Checking in internalapi/UndoManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/UndoManager.java,v
 <--  UndoManager.java
new revision: 1.2; previous revision: 1.1
done
Comment 8 Jiri Skrivanek 2004-06-23 14:34:48 UTC
Please, fix this also in Qbuild branch QBE200406230100. Thanks.
Comment 9 Jan Becicka 2004-06-23 15:13:35 UTC
Fixed in QBE200406230100

/cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v
 <--  RepositoryUpdater.java
new revision: 1.8.2.1; previous revision: 1.8
done
Processing log script arguments...
More commits to come...
Checking in internalapi/UndoManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/UndoManager.java,v
 <--  UndoManager.java
new revision: 1.1.6.1; previous revision: 1.1
done
Comment 10 Marek Grummich 2004-06-25 10:24:39 UTC
Seems to be fixes in build QBE200406242325, at least for described
testcases - verified
Comment 11 Quality Engineering 2007-09-20 12:04:49 UTC
Reorganization of java component