Bug 339252 - Save action Organize Imports removes import validly created from Ctrl-Shift-O command
Summary: Save action Organize Imports removes import validly created from Ctrl-Shift-O...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2011-03-08 12:04 EST by Daniel Holmes CLA
Modified: 2019-05-29 05:04 EDT (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 Daniel Holmes CLA 2011-03-08 12:04:05 EST
Build Identifier: Helios Build id: 20100917-0705

The import is for the an inner class that is being extended.  It seems that there are different organize import algorithms between the editing Cntl-Shift-O action and the OrganizeImports on Save action.  The save action is removing the valid import of this inner class.

These two methods of organize should be identical.

I have not been able to create a simple example that demonstrates this action and to extract a small compilable example from my project is pretty difficult as this is part of a pretty combined family of abstract concrete classes within my framework.

I'm hoping that there is something that you could identify or confirm above these procedures being different that could be identified.

Usage of the inner class scoped by the outer class in the code to avoid the direct import of the inner class is required.

Reproducible: Always

Steps to Reproduce:
I have not been able to create a simple example that demonstrates this action and to extract a small compilable example from my project is pretty difficult as this is part of a pretty combined family of abstract concrete classes within my framework.

This occurs for every developer running this eclipse build on our code.
Comment 1 Olivier Thomann CLA 2011-03-10 09:28:13 EST
Could you please try with a newer build like the upcoming 3.7M6?
Thanks.
Comment 2 Daniel Holmes CLA 2011-03-10 09:35:45 EST
(In reply to comment #1)
> Could you please try with a newer build like the upcoming 3.7M6?
> Thanks.

Sure, I'll let you know.
Comment 3 Olivier Thomann CLA 2011-03-17 09:33:44 EDT
Any news on this ?
Comment 4 Daniel Holmes CLA 2011-03-17 09:45:22 EDT
(In reply to comment #3)
> Any news on this ?

Haven't had time to try the latest 3.7 as you suggested yet.
Comment 5 Daniel Holmes CLA 2011-03-18 11:38:16 EDT
Tried with 3.7M5, this still occurs in my setup.
Comment 6 Olivier Thomann CLA 2011-08-24 15:00:40 EDT
Do you have a package-info.java file in the package in which you have issues ?
Comment 7 Daniel Holmes CLA 2011-08-24 15:17:37 EDT
(In reply to comment #6)
No package-info.java within the package or entire module that contains the class
Comment 8 Eclipse Genie CLA 2019-05-13 01:05:09 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 9 Jay Arthanareeswaran CLA 2019-05-29 05:04:19 EDT
It appears that the JDT team was unable to reproduce this problem. So, perhaps Daniel can tell us if this is still a problem. Lot has happened since this was reported and I doubt the issue is still present.