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 60030 - Refactoring Undo should not be enabled after Fix Imports.
Summary: Refactoring Undo should not be enabled after Fix Imports.
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 13:01 UTC by Milan Kubec
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
broken source code (1.72 KB, text/plain)
2005-06-15 13:02 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2005-06-15 13:01:32 UTC
[dev-200506142000, JDK 1.5.0_04, Experimental Refac. 0.16.0.2.3 from AUC]

I created form file with one button and let IDE create EventHandler for
actionPerformed event. I invoked Convert Anonymous Class to Inner for the
anonymous class and invoked Fix Import action after that. Undoing the
refactoring operation resulted in completly broken source code, see attachment.
Comment 1 Milan Kubec 2005-06-15 13:02:04 UTC
Created attachment 22702 [details]
broken source code
Comment 2 Jan Becicka 2005-06-15 14:28:42 UTC
It has nothing to do with Convert Anonymous Class to Inner - it can happen with
any refactoring.
Refactoring Undo should not be enabled after Fix Imports.
Comment 3 Jan Becicka 2005-06-16 15:55:53 UTC
Cannot reproduce in latest build.
Comment 4 Milan Kubec 2005-06-27 14:39:12 UTC
Easily reproducible in dev-200506261800.

Steps:
1) Creat form
2) Add button
3) Let IDE generate actionPerformed handler
4) Create Inner Class from the annon. handler class
5) Fix Imports
6) Refactor | Undo
Comment 5 Milan Kubec 2005-06-27 14:48:35 UTC
Sorry, maybe not reproducible - AUC still contains 0.16.0.2.3 version of
Experimantal Refactorings.
Comment 6 Milan Kubec 2005-06-30 09:03:00 UTC
Really reproducible in Ex. Refac. 0.17.0.2.3.
Comment 7 Jan Becicka 2005-07-22 14:14:14 UTC
Another bug fixed: user should not be allowed to refactor code in guarded block.
Checking in AnonymousToInnerRefactoringPlugin.java;
/cvs/refactoring/experimental/src/org/netbeans/modules/refactoring/experimental/plugins/AnonymousToInnerRefactoringPlugin.java,v
 <--  AnonymousToInnerRefactoringPlugin.java
new revision: 1.5; previous revision: 1.4
done
Comment 8 Milan Kubec 2005-09-22 13:34:04 UTC
Verified in dev-200509211800.