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 110039 - [Extract Super Class] Necessary imports are not added
Summary: [Extract Super Class] Necessary imports are not added
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on: 117607
Blocks:
  Show dependency tree
 
Reported: 2007-07-17 16:43 UTC by Jiri Prox
Modified: 2007-10-12 14:57 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 Jiri Prox 2007-07-17 16:43:57 UTC
Product Version: NetBeans IDE Dev (Build 070717) Java: 1.6.0_03-ea; Java HotSpot(TM) Client VM 1.6.0_03-ea-b01 System:
Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb) Userdir: /home/jp159440/.netbeans/dev

Necessary imports are not added when extracting super class

Steps to reproduce:
1) have a code:
import java.io.File;
public class ClassF {
    
    /** Creates a new instance of ClassF */
    public ClassF() {
    }
    
    public void method() {
        File f = new File("aaa");
    }    
}
2) extract super class from it and select to extract "method()"

-> import java.io.File; is not added to superclass
Comment 1 Jan Pokorsky 2007-10-11 14:28:12 UTC
fixed together with the extract interface refactoring

/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/ExtractInterfaceRefactoringPlugin.java,v
new revision: 1.13; previous revision: 1.12
/cvs/refactoring/java/src/org/netbeans/modules/refactoring/java/plugins/ExtractSuperclassRefactoringPlugin.java,v
new revision: 1.14; previous revision: 1.13
Comment 2 Jiri Prox 2007-10-12 14:57:19 UTC
v.