Bug 393964 - [quick fix] Change import if simple name of method argument type matches
Summary: [quick fix] Change import if simple name of method argument type matches
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-09 06:53 EST by Gábor Lipták CLA
Modified: 2012-11-09 12:21 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 Gábor Lipták CLA 2012-11-09 06:53:42 EST
The original related bug is described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=393781

Please read that first with a look on the screenshots.

It happens really often, that the sort name of classes are the same. With overloaded words like Index, Element and so on this happens really frequently especially if someone uses for example JAXB beans. So in general the problem occours oft.

In this game the declaring class (lets call it Declare) and the method argument type with matching short name (lets call it Argument) What a quick fix could do:

- it could look up all classes with the sort name Declare, and if it would not cause any other compilation failure (other occourances of Declare would compile), and the argument list would be ok, it could offer to change the import of Declare to another package.
- it could look up all classes with the sort name Argument, and if it would not cause any other compilation failure (other occourances of Argument would compile) and it would match the method, it could offer to change the import of Argument to another package.