Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 37512 - Cleaning up ugly code: Turning FQN's into imports as appropriate
Summary: Cleaning up ugly code: Turning FQN's into imports as appropriate
Status: RESOLVED DUPLICATE of bug 12330
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 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: 2003-05-12 14:19 EDT by Missing name CLA
Modified: 2003-05-13 04:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2003-05-12 14:19:05 EDT
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();


}


===============================================================
Comment 1 Dirk Baeumer CLA 2003-05-13 04:36:58 EDT

*** This bug has been marked as a duplicate of 12330 ***