Bug 541839 - Organize import (and family) could take into account the deferenced fields/methods.
Summary: Organize import (and family) could take into account the deferenced fields/me...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.10   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-03 07:40 EST by Mickael Istria CLA
Modified: 2018-12-03 09:36 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2018-12-03 07:40:10 EST
It's quite frequent that when doing a Ctrl+Shift+O on some code, we get JDT suggesting multiple types when the editor contains hints about fields or methods to find in the type that would resolve to only one of them.
In this case, either Ctrl+Shift+O should automatically select the type that has the dereferenced fields, or it should show this type as first recommendation in the dialog.
One example is when code references "Messages.blahblah" and Messages is not imported, Ctrl+Shift+O shows all known Messages class when only one of them has a "blahblah" field.