Bug 113669 - [organize import] "organize imports" removes class (from "class folder") import declaration
Summary: [organize import] "organize imports" removes class (from "class folder") impo...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2005-10-25 11:23 EDT by Przemysław Promiński CLA
Modified: 2009-08-30 02:07 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Przemysław Promiński CLA 2005-10-25 11:23:18 EDT
I noticed a bug while organizing imports.

I had class structure:

com.lowagie.text.Image
com.lowagie.text.pdf.PdfWriter

Package com.lowagie.text contains subpackages: html, pdf, xml.
I use class Image and PdfWriter.

I had declarations:
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
and everything was OK.

I choose "organize imports" and:
1. ...text.pdf.* was changed to ...text.pdf.PdfWriter (correct)
2. ...text.* was removed (wrong)

After that I tried to use Ctrl+Shift+O shortcut to add Image declaration, but I
was able to choose between java.awt.Image and another from sun package.

I left ...text.* declaration - then I was able to compile my class

When I packed my class folder into jar file and added it as external jar,
everything worked fine:
1. organize imports changed ...text.* to ...text.Image
2. shortcut Ctrl+Shift+O (with removed ...text.* declaration) allow me to choose
between java.awt, sun and com.lowagie package
Comment 1 Martin Aeschlimann CLA 2006-04-26 08:51:28 EDT
Can you reproduce this? It seems that there was a problem with our search index.

Setting to remind. Please reopen if you can still see this problem.
Comment 2 Denis Roy CLA 2009-08-30 02:07:45 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.