Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 301746 - Undo of rename refactoring doesn't actually undo, leaves editor in bad state
Summary: Undo of rename refactoring doesn't actually undo, leaves editor in bad state
Status: CLOSED DUPLICATE of bug 345342
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-03 15:35 EST by Scott Evans CLA
Modified: 2012-01-27 10:36 EST (History)
6 users (show)

See Also:


Attachments
Log file after trying to save post-undo editor (664.06 KB, application/octet-stream)
2010-02-03 15:36 EST, Scott Evans CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Evans CLA 2010-02-03 15:35:32 EST
Build Identifier: 20090920-1017

This appears to work right as long as the "rename in place" pref is set, but I don't use that feature.

Reproducible: Always

Steps to Reproduce:
1. Preferences/Java/uncheck "Rename in editor without dialog"
2. Create a class
3. In the editor, place IP on the class name, then Refactor/Rename. Choose a new name and press enter.
4. Leaving focus in the editor, Cmd-Z to undo.

Expected results: 
Declared class name changes back, filename changes back.

Actual results:
Nothing in editor changes, but editor is marked as dirty ("*" appears next to the filename. File name is not changed. 

Also, attempting to save the editor then gives a "Problem Occurred" dialog, which says 
  Save Failed 
  Illegal value: -1

I'll attach a logfile with a stack trace.
Comment 1 Scott Evans CLA 2010-02-03 15:36:21 EST
Created attachment 158096 [details]
Log file after trying to save post-undo editor
Comment 2 Olivier Thomann CLA 2010-02-03 15:44:46 EST
Moving to Platform/Resources
Comment 3 Scott Evans CLA 2010-02-03 15:45:30 EST
One more comment -- undo does work if you change focus to the Package Explorer and then undo.
Comment 4 Olivier Thomann CLA 2010-02-03 15:46:02 EST
Looks like a duplicate of bug 192969
Comment 5 Scott Evans CLA 2010-02-03 15:50:59 EST
Hm, interesting. Bug 192969 does look like the same symptom, but there's no cause in that bug. So who knows if there are other paths to get to the same problem.
Comment 6 Szymon Brandys CLA 2011-08-16 06:39:26 EDT
Moving to Platform/Text.
Comment 7 Dani Megert CLA 2011-11-15 05:28:28 EST
Deepak, please investigate.
Comment 8 Deepak Azad CLA 2012-01-27 10:36:00 EST

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