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 208333 - Refactoring Convert Anonymous to Member doesn't fix imports
Summary: Refactoring Convert Anonymous to Member doesn't fix imports
Status: RESOLVED DUPLICATE of bug 206957
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-13 12:29 UTC by ttokoly
Modified: 2012-02-17 15:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ttokoly 2012-02-13 12:29:39 UTC
Product Version: NetBeans IDE 7.1 (Build 201112071828)
Java: 1.7.0_03; Java HotSpot(TM) Client VM 22.1-b02
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

1. Unzip a project ConvertClasses to some work directory - there is link:
http://wiki.netbeans.org/wiki/images/b/be/ConvertClasses_STS_68_Refactoring.zip
2. Start IDE with a clean userdir.
3. Invoke File | Open Project... action.
4. Select unzipped projects default.
5. Scanning structure of project should be performed (it takes a while).

6. Open ClassA in editor and call refactoring for its anonymous class (Refactor -> "Convert Anonymous to Member...") on line 34.
7. Type new name and press enter.

Two errors is shown (on line 34 and on line 41), because import of ActionListener interface is missing.

I've tried this in NB 6.5 and after step 7. is on line 13 created "import java.awt.event.ActionListener;".

You can call fix imports manually and after that it's ok. So I'm not sure if this is designed behavior or not.
Comment 1 Jan Lahoda 2012-02-17 15:35:15 UTC
Same as bug #206957, as far as I can tell. Cannot reproduce on a trunk build (can reproduce on 7.1.1 RC1).

*** This bug has been marked as a duplicate of bug 206957 ***