Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 264504 - [misc] Editor should not create working copy for deleted resource
Summary: [misc] Editor should not create working copy for deleted resource
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-11 06:09 EST by Michael Schneider CLA
Modified: 2009-02-11 06:49 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Schneider CLA 2009-02-11 06:09:04 EST
Build ID: I20090129-1800

To Reproduce:
1) Create a class A
2) Close the editor, reveal class A in the package explorer
3) Start the rename refactoring for class A via the package explorer's context menu, name it B
4) go back to the last edit location using alt-left
observe: there is an editor opened for file A which does not exist anymore.
observe: the package explorer now shows a resource A alongside with B, even though it does not exist. Trying to open the file results in an error.

5) keep the editor for the non-existant file A open
6) in the package explorer, start the rename refactoring again, rename the class A again

observe: no error is shown
observe: the editor for the non-existant file A becomes dirty.
observe: the class B still exists and is not touched at all
observe: all references to B in other files are change to A, leading to compile errors
Comment 1 Dani Megert CLA 2009-02-11 06:15:10 EST

*** This bug has been marked as a duplicate of bug 148925 ***
Comment 2 Michael Schneider CLA 2009-02-11 06:23:13 EST
reopening, as the real problem started with step 5. I agree that steps 1-4 are covered with bug 148925

Note that in my case, i had an editor for a non-existent file open, I was not aware of it. I did the refactoring back to the old class name and got tons of compile errors.
Comment 3 Dani Megert CLA 2009-02-11 06:49:04 EST
>reopening, as the real problem started with step 5.
Right, but you can't reach step 5 if the other bug is fixed ;-)

Anyway, that a CU appears in the Package Explorer when a deleted resource is opened in the editor is not good.

Fixed in HEAD.
Available in builds > N20090210-2000.