Bug 63519 - "Move member type to new file" omits to add imports [refactoring]
Summary: "Move member type to new file" omits to add imports [refactoring]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 minor (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Tobias Widmer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-22 07:51 EDT by Paweł Sakowski CLA
Modified: 2005-03-17 06:52 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Sakowski CLA 2004-05-22 07:51:51 EDT
Given the following two classes:
---
package foo;

public abstract class Superclass {
    public int i;
    protected class Inner {
        void go() {
        	i = 1;
        }
    }
    public abstract void go(Inner param);
}
---
package bar;

import foo.Superclass;

public class Subclass extends Superclass {
	public void go(Inner param) {}
}
---

extracting Inner to a new file (with default settings) produces non-building
code, because:
- Subclass receives no 'import foo.Inner' (so, Inner can't be resolved)
- Inner is declared as package-visible, not public-visible (so, the import
wouldn't work anyway)

Eclipse 3.0M9
Comment 1 Dirk Baeumer CLA 2005-03-16 18:10:20 EST
Tobias, is this still a problem ?
Comment 2 Tobias Widmer CLA 2005-03-17 06:52:48 EST
Fixed > 20050316