Bug 112999 - [clean up][code style] Refactoring to remove/add all fully qualified type names
Summary: [clean up][code style] Refactoring to remove/add all fully qualified type names
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 enhancement with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 61567 318612 374449 422001 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-18 16:14 EDT by Danny Yates CLA
Modified: 2013-11-19 08:23 EST (History)
10 users (show)

See Also:


Attachments
poposed fix (53.36 KB, patch)
2006-03-27 11:57 EST, Benno Baumgartner CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Yates CLA 2005-10-18 16:14:43 EDT
Would it be possible to add a refactoring (or equivalent) to find all fully 
qualified type references, remove the qualification and add the relevant 
import statement?
Comment 1 Martin Aeschlimann CLA 2005-10-19 04:02:06 EDT
A good candidate for the cleanup action.


Should also be offered the other way around: Fully qualify all type references

List l= new Vector()  -> java.util.List l= new java.util.Vector();
Comment 2 Danny Yates CLA 2006-02-21 06:35:18 EST
Can we expect to see this in 3.2 (it's not in M5 as far as I can see). Thanks!
Comment 3 Danny Yates CLA 2006-02-21 06:45:11 EST
Sorry - just saw you'd already updated the milestone to M6.
Comment 4 Benno Baumgartner CLA 2006-03-27 11:57:55 EST
Created attachment 36998 [details]
poposed fix
Comment 5 Benno Baumgartner CLA 2006-03-27 11:59:02 EST
Sorry, I've tried, but not enough time/too many bugs...
Comment 6 Dénes Harmath CLA 2010-04-15 06:59:37 EDT
I would be very glad to see this coming to JDT as a Clean Up action! I inherited a code base full of FQNs...
Comment 7 Dani Megert CLA 2010-07-28 08:40:16 EDT
*** Bug 318612 has been marked as a duplicate of this bug. ***
Comment 8 Dani Megert CLA 2012-03-19 07:59:39 EDT
*** Bug 61567 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2012-03-19 07:59:45 EDT
*** Bug 374449 has been marked as a duplicate of this bug. ***
Comment 10 Heiko Böttger CLA 2013-05-24 05:36:27 EDT
That would be a super feature, when using a code generator the code could be generated always using the fully qualified names to avoid conflicts and the cleanup could than be used as post processing step in order to beautify the code.
Comment 11 Dénes Harmath CLA 2013-06-13 11:08:40 EDT
In the meantime, here's a plugin offering this functionality called Clean Qualified Types Plugin (CQTP): http://blog.mi-ernst.de/projekte/
Comment 12 Dani Megert CLA 2013-11-19 08:12:18 EST
*** Bug 422001 has been marked as a duplicate of this bug. ***
Comment 13 Palmer Eldritch CLA 2013-11-19 08:23:47 EST
Unnecessary _static_ warnings deserve a compiler warning I think - see discussion : https://bugs.eclipse.org/bugs/show_bug.cgi?id=421969#c1