Bug 218487

Summary: [organize imports] should allow to filter forbidden and discouraged types
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: akiezun, juergen, markus.kell.r, martinae
Version: 3.4   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 296277    
Bug Blocks:    
Attachments:
Description Flags
Fix none

Description Dani Megert CLA 2008-02-11 06:57:20 EST
3.4 M5

Organize Imports should allow to filter forbidden and discouraged types. Currently the out of the box behavior doesn't match content assist and hence leads to unexpected results: while code assist doesn't show forbidden types they are suggested by Organize Imports.
Comment 1 Markus Keller CLA 2008-10-15 05:06:58 EDT
At least, the dialog should show good types before discouraged and forbidden types.
Comment 2 Markus Keller CLA 2009-11-26 13:18:47 EST
There's no API to compute access rules on TypeNameMatch cheaply, see bug 264695.
Comment 3 Markus Keller CLA 2009-11-26 13:33:44 EST
The other bug is actually another problem. Field bug 296277 for new JDT/Core API.
Comment 4 Markus Keller CLA 2009-12-07 10:08:29 EST
I think we should generalize the settings for access restrictions from the
'Java > Editor > Content Assist' page. E.g. move the 'Hide forbidden/discouraged references' checkboxes to the Type Filters page.
Comment 5 Dani Megert CLA 2009-12-09 02:21:12 EST
>I think we should generalize the settings for access restrictions from the
>'Java > Editor > Content Assist' page. E.g. move the 'Hide
>forbidden/discouraged references' checkboxes to the Type Filters page.
Sounds reasonable to me.
Comment 6 Markus Keller CLA 2010-04-13 05:36:23 EDT
Should look at this together with the bugs concerning type filters and relevance.
Comment 7 Markus Keller CLA 2010-12-09 06:52:11 EST
*** Bug 91683 has been marked as a duplicate of this bug. ***
Comment 8 Markus Keller CLA 2010-12-09 09:33:19 EST
Created attachment 184851 [details]
Fix
Comment 9 Markus Keller CLA 2010-12-09 09:34:00 EST
The patch implements comment 4.
Comment 10 Markus Keller CLA 2010-12-09 11:06:14 EST
Fixed in HEAD (and fixed a conflicting mnemonic).
Comment 11 Markus Keller CLA 2010-12-14 08:41:46 EST
Fixed failing test in OptionsConfigurationBlockTest.
Comment 12 Markus Keller CLA 2010-12-14 10:00:15 EST
... and updated Type Filters preference page description in PreferencesMessages.properties
Comment 13 Dani Megert CLA 2011-01-25 06:14:44 EST
(In reply to comment #8)
> Created attachment 184851 [details] [diff]
> Fix
This is only the preference file and not the full fix. Marking as obsolete.
Comment 14 Dani Megert CLA 2011-01-25 06:15:21 EST
Verified in I20110124-1800.