Bug 323941

Summary: [organize imports] "Add Import" dialog should have hint about type filters
Product: [Eclipse Project] JDT Reporter: Christian <ChristianOrtolf>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, john.s.g.churchill, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562752
Whiteboard:
Bug Depends on: 48736    
Bug Blocks:    

Description Christian CLA 2010-08-30 05:29:14 EDT
Build Identifier: I20100608-0911

"Add import" considers classes from com.sun packages as every other class.
Though very seldom one is interested in using non api classes.

It would improve speed to not show a dialog for choosing between com.sun.* classes if only a single normal (not com.sun.*) class exists. 
The classes of com.sun are normally never used, so there is no need to consider them for "Add Import" function.

Reproducible: Always

Steps to Reproduce:
1. tpye "File" in the source file
2. hit ctrl+Shift+M
3. A window pops up giving you a choice ... that you don't want...
Comment 1 Markus Keller CLA 2010-08-30 12:34:12 EDT
You can add a Type Filter for com.sun.* classes in the preferences (Java > Appearance > Type Filters).

Keeping this bug for adding some affordance for this in the dialog (e.g. description with a link to the preference page). See also bug 48736, which could influence this.
Comment 2 Christian CLA 2010-08-31 11:53:32 EDT
It might be a good choice for a default setting then.

I don't know how eclipse policy is for default settings, but this seems like an advantageous setting for most users.
Comment 3 Noopur Gupta CLA 2020-05-04 03:05:12 EDT
*** Bug 562752 has been marked as a duplicate of this bug. ***