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
URL:
Keywords:
Depends on:
Blocks:
 
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:


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

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 javaapplication21.java in editor.
3. change package name from javaapplication21 to javaapplication22 (refactor)
4. change file name from javaapplication21.java to javaapplication22.java (refactor)
5. click undo twice
6. click redo twice, get error message popup "JavaApplication21.java 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 JavaApplication22.java
9. open tree under package to view source files in Projecs window.
10. click undo

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

Expected: JavaApplicatino22.java should have been renamed to JavaApplication21.java

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