Bug 304827 - [move member type] Move Type to New File leaves unnecessary imports
Summary: [move member type] Move Type to New File leaves unnecessary imports
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 310510 305026
  Show dependency tree
 
Reported: 2010-03-05 10:16 EST by Markus Keller CLA
Modified: 2023-12-16 04:53 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.