I would find it very useful to have a Change Type refactoring:

1) Select a variable (local or member) and invoke "Change Type".

2) Idea scans all usages of this variable and offers all possible types for 
selection, that would not break the code.

3) The user selects one and IDEA changes the type of the variable declaration.


Example:

   MyButton button = new MyButton();
   button.setText("Hello world!"); // JButton.setText()
   addComponent(button); // addComponent(Component)

IDEA would suggest:
- MyButton
- JButton
but not "Component" or "JComponent", because they would break the code.
After selecting "JButton", the code would look like:

   JButton button = new MyButton();
   button.setText("Hello world!");
   addComponent(button);

Tom


_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to