Bug 179869 - [quick fix] Make Auto-import more aggressive
Summary: [quick fix] Make Auto-import more aggressive
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 18:51 EDT by Tim Hanson CLA
Modified: 2009-01-23 11:36 EST (History)
1 user (show)

See Also:


Attachments
Screen shot (8.41 KB, image/jpeg)
2007-04-02 13:42 EDT, Tim Hanson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hanson CLA 2007-03-28 18:51:48 EDT
Build ID:  I20070323-1616

Steps To Reproduce:
In a blank Java method type a line like the following:

        List l = new ArrayList();

In general, you don't know whether some type has been imported or not. By the time the missing type errors are squiggled, the cursor is often on the next line.

What I would like is a more aggressive pop-up to appear below the first missing type with note that says something like "import type List - Ctrl+1". The key binding would then work no matter where the cursor is. In other words, fixing missing types would have priority over all other "Ctrl+1" quick fixes.

This is what IntelliJ has always done, and I really miss it.

This is distinct from https://bugs.eclipse.org/bugs/show_bug.cgi?id=107496, which seems to try to minimize the pain associated with the missing import.

More information:
Comment 1 Martin Aeschlimann CLA 2007-04-02 13:06:07 EDT
If I remember right, Intellij uses a different key for missing types. Our key would be 'Organize Import' or, if you enabled Organize Imports on Save, 'Save'.

No plans to play around with the CTRL+1 positioning behaviour for now
Comment 2 Tim Hanson CLA 2007-04-02 13:40:40 EDT
IntelliJ uses "Alt+Enter" for fixing imports, which is the same key binding as is used for Quick Fix (IntelliJ uses a different term called "Intention Action"). This is such a widely used operation, the preference to disable it is in the status bar.

I have attached a screen shot to show how it looks with a missing type.

I am fine with having a different key binding than Ctrl+1, as long as the key binding is shown in the popup. I would not like this bound to either Save or Organize Imports because Organize Imports does too much. I don't use it since it creates too many diffs.

Comment 3 Tim Hanson CLA 2007-04-02 13:42:14 EDT
Created attachment 62687 [details]
Screen shot