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 267341 - Undo after renaming file with Hint causes new file created
Summary: Undo after renaming file with Hint causes new file created
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2016-07-28 05:52 UTC by MackSix
Modified: 2016-07-28 05:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

sample project (14.51 KB, application/x-zip-compressed)
2016-07-28 05:52 UTC, MackSix
screenshot showing another file (101.77 KB, image/png)
2016-07-28 05:54 UTC, MackSix

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2016-07-28 05:52:49 UTC
Created attachment 161476 [details]
sample project

1. open attached project.
2. open in editor.
3. change package name from javaapplication21 to javaapplication22 (refactor)
4. change file name from to (refactor)
5. click undo twice
6. click redo twice, get error message popup " seems no longer valid!"
7. click ok on error dialog
8. click hint next to line 7 and choose to rename the file to match class name
9. open tree under package to view source files in Projecs window.
10. click undo

Results: Notice a new is created along side the file instead of the file being renamed. (See screenshot)

Expected: should have been renamed to

Workaround: delete file.
Comment 1 MackSix 2016-07-28 05:54:40 UTC
Created attachment 161477 [details]
screenshot showing another file