Bug 334079 - [quick fix] Allow to apply "import missing type" to several files
Summary: [quick fix] Allow to apply "import missing type" to several files
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 07:42 EST by Aaron Digulla CLA
Modified: 2011-01-17 10:19 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 Aaron Digulla CLA 2011-01-12 07:42:08 EST
Build Identifier: 3.6.1

When I do a global search and replace, I can end up with many files that are missing an import. I'd like to be able to select all entries in the problems view and fix them all at once.

Reproducible: Always

Steps to Reproduce:
1. Add a new type to two Java source files (without the imports)
2. Select the two new items in the problems view
3. Apply quick fix to import the type in both files
Comment 1 Deepak Azad CLA 2011-01-12 07:51:48 EST
Note that you can select multiple packages or projects and invoke 'Source > Organize Imports' (Ctrl+Shift+O) to fix all import issues in one go.
Comment 2 Markus Keller CLA 2011-01-17 10:19:45 EST
In general, I also recommend 'Organize Imports'.

But I see that a multi-fix would also be helpful in cases where the unqualified name is ambiguous, e.g. here:

class E {
    List i;
    List i2;
}