Bug 310510 - [move member type] Move Type to New File creates illegal imports (with doubly-nested type)
Summary: [move member type] Move Type to New File creates illegal imports (with doubly...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 107409 353727 (view as bug list)
Depends on: 304827
Blocks:
  Show dependency tree
 
Reported: 2010-04-26 13:48 EDT by Chris West (Faux) CLA
Modified: 2022-09-27 03:42 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris West (Faux) CLA 2010-04-26 13:48:44 EDT
Build Identifier: I20100413-1521

Probably the same issue as #304827 and #305026 , but with actually introducing compile errors.  Feel free to close as duplicate.

package bugs;
public class Holder {
  static class Insider {
    Q q;
    static class Q {
    }
  }
}

Moving Insider to a new file generates:

package bugs;
import bugs.Holder.Insider; // illegal and completely non-sensical import.
public class Holder {
}

and:

package bugs;
import bugs.Holder.Insider.Q; // illegal
class Insider {
	Insider.Q q; // strange..
	static class Q {
	}
}

Reproducible: Always

Steps to Reproduce:
1. Create file.
2. Move to new file.
3. Shows in preview / hit confirm.
Comment 1 Markus Keller CLA 2010-04-28 09:31:40 EDT
Same problems in 3.5 in class Insider. The bad import in Holder is new in 3.6. Depends on bug 304827.
Comment 2 Dani Megert CLA 2012-04-03 11:46:51 EDT
*** Bug 353727 has been marked as a duplicate of this bug. ***
Comment 3 Martin Mathew CLA 2014-06-24 22:30:56 EDT
*** Bug 107409 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Genie CLA 2018-11-05 14:32:48 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 5 Erik Brangs CLA 2018-11-06 14:41:27 EST
The problem still occurs in Eclipse 2018-09. The original description is still accurate.

Please consider fixing the problem.
Comment 6 Stephan Herrmann CLA 2018-11-06 16:56:15 EST
(In reply to Erik Brangs from comment #5)
> The problem still occurs in Eclipse 2018-09. The original description is
> still accurate.
> 
> Please consider fixing the problem.

Thanks for retesting.
Comment 7 Eclipse Genie CLA 2020-04-04 09:12:19 EDT
New Gerrit change created: https://git.eclipse.org/r/160479
Comment 8 Roland Grunberg CLA 2020-04-16 13:53:32 EDT
Have you had a look at Bug 304827 to see if it's possible ? Seems like that should be the first one addressed and might help fix this one.

Otherwise, I'd guess the current fix would only serve as a workaround until the the other bug is resolved.
Comment 9 Kenneth Styrberg CLA 2020-04-17 14:30:38 EDT
(In reply to Roland Grunberg from comment #8)
> Have you had a look at Bug 304827 to see if it's possible ? Seems like that
> should be the first one addressed and might help fix this one.
> 
> Otherwise, I'd guess the current fix would only serve as a workaround until
> the the other bug is resolved.

Oh, that was a real tar pit to walk into. I think I'll slowly back away... :/

And I think you're right that Bug 304827 probably solves this one also, so perhaps close this one as duplicate and throw away my band-aid attempt.
Comment 10 Eclipse Genie CLA 2022-09-26 16:47:32 EDT
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 11 Mauro Molinari CLA 2022-09-27 03:42:25 EDT
Still applies to 2022-06.