Bug 295820 - [organize imports] 'Organize imports' usability problem on large number of files with ambiguity
Summary: [organize imports] 'Organize imports' usability problem on large number of fi...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows NT
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-22 21:09 EST by Prashant Deva CLA
Modified: 2009-11-30 10:30 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prashant Deva CLA 2009-11-22 21:09:28 EST
Often time after adding/changing a library I want to do an 'organize imports' on a whole project with > 500 files. 
But most of the times the command fails because it encounters an ambiguity between say - 'java.util.List' and 'java.awt.List'. 

The current solution is to just go to each of those 500 files individually and perform Organize Imports and select the correct class in the dialog that pops up.


Currently this dialog doesnt seem to pop up when more than one file is selected to do Organize Imports on. 

This is a big usability problem and the dialog pop should pop up when multiple files are selected too.

It is true that in some case in the case of multiple files one may want to use a different class in each of those files but a lot of times that is not the case and in any way just having an option to have the user himself confirm to use the selected class should solve that problem.
Comment 1 Dani Megert CLA 2009-11-23 02:49:53 EST
If you want to use the same List (or whatever type) only, then you can use this trick:
1. add all types you don't want to Java > Appearance > Type Filters
2. Organize the imports
3. Optionally revert the changes made in step 1
Comment 2 Prashant Deva CLA 2009-11-23 03:13:17 EST
I know this is possible but a good UI wouldnt need the user to follow these arcane steps.

As I said this is a usability and ease of use issue.
Comment 3 Markus Keller CLA 2009-11-30 10:30:42 EST
We would have to show a dialog per project (since projects can have different classpaths).