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 226868 - javax.swing.undo.CannotUndoException at javax.swing.undo.AbstractUndoableEdit.undo
Summary: javax.swing.undo.CannotUndoException at javax.swing.undo.AbstractUndoableEdit...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 209011 212640 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-01 02:15 UTC by MackSix
Modified: 2015-08-25 08:56 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199163


Attachments
stacktrace (4.02 KB, text/plain)
2013-03-01 02:15 UTC, MackSix
Details
Project to use for reproduction of Comment 2. (14.17 KB, application/zip)
2013-03-01 02:47 UTC, MackSix
Details
Log File for Comment 2. (53.89 KB, text/plain)
2013-03-01 02:48 UTC, MackSix
Details
stacktrace (5.57 KB, text/plain)
2013-03-01 03:17 UTC, MackSix
Details
stacktrace (5.57 KB, text/plain)
2013-03-01 03:29 UTC, MackSix
Details
stacktrace (4.45 KB, text/plain)
2013-07-25 07:36 UTC, Jiri Prox
Details
stacktrace (4.02 KB, text/plain)
2013-08-21 09:07 UTC, ssazonov
Details
stacktrace (6.50 KB, text/plain)
2013-11-12 11:36 UTC, ssazonov
Details
stacktrace (4.45 KB, text/plain)
2014-01-14 15:00 UTC, Jiri Prox
Details
stacktrace (4.01 KB, text/plain)
2014-02-10 01:07 UTC, kidnapper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-03-01 02:15:08 UTC
Build: NetBeans IDE Dev (Build 201302222300)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_15-b03
OS: Windows 7

User Comments:
MackSix: Was testing Refactoring: Replace Constuctor With Factory and the Undo stopped working. I clicked Redo and this exception was thown. I aaw the Undo stop working in v7.3 too. Will try to reproduce with steps to create exception.




Stacktrace: 
javax.swing.undo.CannotUndoException
   at javax.swing.undo.AbstractUndoableEdit.undo(AbstractUndoableEdit.java:110)
   at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:59)
   at org.openide.text.UndoRedoManager.undoSaveActions(UndoRedoManager.java:282)
   at org.openide.text.UndoRedoManager.beforeRedoAtSavepoint(UndoRedoManager.java:318)
   at org.openide.text.WrapUndoEdit.redo(WrapUndoEdit.java:114)
   at org.openide.awt.UndoRedo$Manager.redoTo(UndoRedo.java:293)
Comment 1 MackSix 2013-03-01 02:15:10 UTC
Created attachment 132036 [details]
stacktrace
Comment 2 MackSix 2013-03-01 02:45:14 UTC
I was trying to reproduce this and got another error.

1. Open attached project.
2. Right click on GenClass() in NewMain.java.
3. Choose to Refactor: Replace Constuctor with Factory. Refactor.
4. Click on package in Projects Window to put focus there. Click Undo button on toolbar.
5. Right click on GenClass() in NewMain.java again and Choose to Refactor: Replace Constructor with Bulder. Refactor.
6. Click on package in Projects Windows to put focus there. Click undo button on toolbar.


This Error occured:

Error: Cannot delete file GenClassBuilder.java in 
C:/Users/MackSix/Documents/NetBeansProjects/JavaApplication7/src/javaapplication7.

See attached log file.
Comment 3 MackSix 2013-03-01 02:47:26 UTC
Created attachment 132038 [details]
Project to use for reproduction of Comment 2.

Project to use for reproduction of Comment 2.
Comment 4 MackSix 2013-03-01 02:48:08 UTC
Created attachment 132039 [details]
Log File for Comment 2.

Log File for Comment 2.
Comment 5 MackSix 2013-03-01 03:06:19 UTC
I think this is the same bug causing the Exception and the Error.

http://netbeans.org/bugzilla/show_bug.cgi?id=212640
Comment 6 MackSix 2013-03-01 03:17:31 UTC
Created attachment 132041 [details]
stacktrace

1. Open project attached to bug: http://netbeans.org/bugzilla/show_bug.cgi?id=226868
2. In GenClass.java, go to line 15 and indent and type foo. Click save button on Toolbar.
3. Click Undo on Toolbar. Click save button on Toolbar.
4. In NewMain.java, right click on GenClass() and choose to Refactor>>Replace Constructor with Builder.
5. Click on GenClass.java to view it and then click on package in project Window to put focus ther.
6. Click the Undo on Toolbar. Clic Yes to Undo.
7. Click Redo on Toolbar and this exceptioin is thown.
Comment 7 MackSix 2013-03-01 03:29:30 UTC
Created attachment 132042 [details]
stacktrace

This bug is in 7.3 too.
Comment 8 Exceptions Reporter 2013-06-18 14:07:51 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=199163
Comment 9 Marian Mirilovic 2013-06-21 17:23:44 UTC
*** Bug 209011 has been marked as a duplicate of this bug. ***
Comment 10 MackSix 2013-07-10 14:06:43 UTC
*** Bug 212640 has been marked as a duplicate of this bug. ***
Comment 11 Jiri Prox 2013-07-25 07:36:48 UTC
Created attachment 137757 [details]
stacktrace

Exception occuered when pressing undo in editor

What I did before the exception occueed:
1) modify the file and save
2) introduce local extenstion from it
3) undo the refactroing
4) press undo
Comment 12 ssazonov 2013-08-21 09:07:05 UTC
Created attachment 138975 [details]
stacktrace

Itried to execute
http://wiki.netbeans.org/TS_74_Refactoring4#Test_suite:_Replace_constructor_with_factory <Test suite: Replace constructor with factory -> 1. Replace selected constructor> and get this exception
Comment 13 ssazonov 2013-11-12 11:36:18 UTC
Created attachment 142089 [details]
stacktrace

Call Refactor > Replace Constructor With Builder..., > Refactor, press Undo, then Redo and you may get this exception
Comment 14 Jiri Prox 2014-01-14 15:00:46 UTC
Created attachment 143945 [details]
stacktrace

Undo redo of Replace constructor with builder
Comment 15 Exceptions Reporter 2014-01-14 15:00:50 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=199163
Comment 16 kidnapper 2014-02-10 01:07:25 UTC
Created attachment 144970 [details]
stacktrace

Performing Java Refactoring Sanity Test - Class I. Test Case
After Step 7, I looked at ClassA and pressed redo.