Bug 304827

Summary: [move member type] Move Type to New File leaves unnecessary imports
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P4 CC: daniel_megert, deepakazad, nikolaymetchev
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 310510, 305026    

Description Markus Keller CLA 2010-03-05 10:16:47 EST
HEAD

Before and after the fixes for bug 43277 and bug 295638, the Move Type to New File refactoring creates unnecessary imports in the new CU.

The fix is not trivial and requires a rewrite of the refactoring:
- imports should only be updated while a context is available, and not afterwards via ImportRewriteUtil.collectImports(..)
- we need a new import rewrite context that knows about the context at the old location (but without considering imports), and at the same time knows about the context at the new location (including visible supertypes, etc.).

I'll release a few disabled tests for this to MoveInnerToTopLevelTests.
Comment 1 Eclipse Genie CLA 2020-01-03 18:59:51 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2021-12-25 16:26:47 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2023-12-16 04:53:52 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.