Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 63326 - Java Type Name not updated after Refactor->Rename
Summary: Java Type Name not updated after Refactor->Rename
Status: RESOLVED DUPLICATE of bug 62854
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-20 17:52 EDT by Randy Hudson CLA
Modified: 2004-05-26 13:48 EDT (History)
0 users

See Also:


Attachments
The option file (1.42 KB, text/plain)
2004-05-21 05:05 EDT, Dirk Baeumer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2004-05-20 17:52:46 EDT
I refactored ShortestPathRouter->ShortestPathConnectionRouter.
After the refactor, the new class name does not appear in the open type 
dialog.  The old name still appears, and displays an error if I try to open it.

Next, I refactored ShortestPathRouting->ShortestPathRouter.  In the class 
above, references to this class being renamed were not repaired.
Comment 1 Dirk Baeumer CLA 2004-05-21 05:04:36 EDT
Randy, I am again not able to reproduce this. There is another PR saying that 
the Outliner/Members view doesn't update correctly after refactoring, but 
since we can't reproduce it it is hard to track down the problem.

To better understand what is going on can you please do the following:

- run Eclipse with a Command console (e.g. specifing 
  -vm C:\jdk1.4.2\bin\java.exe as an argument to Eclipse)

- put the attached .options file into your Eclipse installation. This will
  enable Java Model delta tracing allowing us to see if this is a model or
  UI problem.

If you see the bug again (or even better if you can reproduce it) can you 
please attach the output of the console to this PR. 
Comment 2 Dirk Baeumer CLA 2004-05-21 05:05:19 EDT
Created attachment 10930 [details]
The option file
Comment 3 Dirk Baeumer CLA 2004-05-21 10:21:59 EDT
I think this is either a dup of bug 62854 or is caused by the same underlying 
problem.
Comment 4 Dirk Baeumer CLA 2004-05-26 11:50:37 EDT
This is a dup of 62854 for the following reasons:

- the all types cache listens to Java model deltas. When types are renamed,
  moved or added the cache gets flushed. 

- it seems that Java files opened in an editor don't always trigger a reconcile
  if changed by refactoring. Since this results in a missing delta the all 
  types cache will not be flushed. Hence you see the old class name.

Randy, do you remember if you had the file open in the editor when performing 
the refactoring. This would explain the behaviour you were seeing.
Comment 5 Randy Hudson CLA 2004-05-26 13:28:58 EDT
Yes, the file was open, and I immediately accidentally typed some characters 
into it after performing the refactor.  Then I reverted the file to undo the 
accidental chars.
Comment 6 Dirk Baeumer CLA 2004-05-26 13:48:58 EDT
Marking as dup then.

*** This bug has been marked as a duplicate of 62854 ***