Bug 87950

Summary: [organize imports] Incorporate type inferencing
Product: [Eclipse Project] JDT Reporter: Dave Orme <djo>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, deepakazad, eclipse-bugs, jeff.myers, markus.kell.r, some_guy_coding, srikanth_sankaran, tobias_widmer
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: fix candidate
Bug Depends on:    
Bug Blocks: 377658    

Description Dave Orme CLA 2005-03-14 12:02:47 EST
Suppose I type the line:

Label path = ui.getPathLabel();

(where ui.getPathLabel() returns an org.eclipse.swt.widgets.Label) and select
"Organize Imports" via my favorite mechanism.  It is not necessary for JDT to
prompt me for which Label class to add to the imports section because
ui.getPathLabel() already disambiguates this.  JDT should notice that 'path' is
part of an assignment statement and see if the data type on the right hand side
of the expression already sufficiently disambiguates the expression that it does
not need to prompt me for the exact data type.
Comment 1 Dirk Baeumer CLA 2005-03-15 05:03:32 EST
Given that J2SE 5.0 & performance is the major focus for 3.1 this has to wait.
Comment 2 Martin Aeschlimann CLA 2005-05-23 13:22:21 EDT
not for 3.1
Comment 3 Martin Aeschlimann CLA 2005-06-15 04:45:35 EDT
*** Bug 99669 has been marked as a duplicate of this bug. ***
Comment 4 Martin Aeschlimann CLA 2005-07-26 07:07:06 EDT
should look at this for 3.2
Comment 5 Dani Megert CLA 2010-05-19 03:21:12 EDT
This would improve organize import in many cases.

Moving to JDT Core who owns ImportRewrite these days.
Comment 6 Srikanth Sankaran CLA 2010-05-19 03:34:51 EDT
Jay, please follow up -- Thanks
Comment 7 Markus Keller CLA 2010-05-20 10:28:54 EDT
Moving back to UI. We still implement the actual OrganizeImportsOperation.
Comment 8 Dani Megert CLA 2010-05-21 02:32:02 EDT
> We still implement the actual OrganizeImportsOperation.
Ah, right.