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 212131

Summary: Undo copy class undoes wrong copy
Product: java Reporter: theosib
Component: RefactoringAssignee: Ralph Ruijs <ralphbenjamin>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 211201    
Bug Blocks:    

Description theosib 2012-05-05 19:52:37 UTC
1. Open two projects, A and B
2. Use drag & drop to copy a source file from A to B (hold Option on Mac)
3. Right-click on another source in A, and select Copy
4. Right-click on the package name for project A
5. Select paste (without refactor)
6. Select Undo (copy class)

Expected:

The second copy/paste will be undone.

Actual results:

The first (drag & drop) copy/paste is undone instead.
Comment 1 Ralph Ruijs 2012-05-10 08:20:11 UTC
reproducible
Comment 2 Jan Becicka 2012-05-10 12:05:02 UTC
The problem is, that refactoring Undo can only undo refactoring operations. The second paste was not refactoring action.

In fact we should support undoing of all operations, not only refactoring.
Comment 3 Martin Balin 2015-09-17 11:16:21 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.