| Summary: | Cleaning up ugly code: Turning FQN's into imports as appropriate | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Missing name <analogue> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | 2.1 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
It would be nice if Eclipse had a way to removed fully qualified class names from a source file by turning them into fully qualified import statements instead. Fully qualified class names littered throughout the souce have a way of making the source code look busy and unreadable IMO. Below you will find a before are after scenario. You may be thinking people don't code this way; let me assure you that they do and they've written millions of lines of code thats just asking for this feature to be added to Eclipse. ======================== BEFORE ================================= public void foo() { javax.swing.Label label = new javax.swing.Label("Bar"); label.setText(new java.lang.String("blah")); javax.swing.table.DefaultTableModel model = new javax.swing.table.DefaultTableModel(); } ======================== AFTER ================================= import javax.swing.Label; import javax.swing.table.DefaultTableModel; public void foo() { Label label = new Label("Bar"); label.setText(new String("blah")); DefaultTableModel model = new DefaultTableModel(); } ===============================================================