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 196684 - Refactor Extract Super Class does not work properly
Summary: Refactor Extract Super Class does not work properly
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jan Becicka
URL: http://wiki.netbeans.org/TS_60_Refact...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 15:25 UTC by ttokoly
Modified: 2011-03-14 16:01 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ttokoly 2011-03-14 15:25:56 UTC
Product Version: NetBeans IDE Dev (Build 201103130400)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Linux version 2.6.32-29-generic running on i386; UTF-8; en_US (nb)

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

6. Open packageC.ClassF
7. Call Refactor -> Extract Super Class
8. Select method method() to be extracted
9. Confirm refactoring

According to the Refactoring TS ( http://wiki.netbeans.org/TS_60_Refactoring2
-> Refactorning class with import ) expected result is that new super class is created and it is containing method method() . All imports statements are updated correctly in both files.

But in original class (ClassF) the import stay as it is and and has not been erased. New super class is created properly.
Comment 1 Jan Becicka 2011-03-14 16:01:06 UTC
Redundant import, can be fixed by "Remove Unused Imports" hint.