I was just doing a routine "extract method" and came up with a novel, and usefull IDEA(tm).
At first, I couldn't complete the extraction as the block of code I selected contained two output fields. Once I'd fixed that, I could now extract, but I have 10 parameters.
Now, heres my idea.... it would great if I could select a block of code for extraction, and select an "extraction mode" monitor, this would open up a tab on the bottom of the editor showing the output fields, and incoming parameters that would be created if the selected block was extracted.
Now, the actual editor would unselect the text, but cover it in say a pale blue background, as I edit the code block, moving declarations inside or outside, the list of output fields and parameters would change, this way I can interactively rework the code to limit the number of parameters passed in.
Once I'm happy with the code block, I can click the extract button in the tab, which does the extraction as normal.
If multiple return values still exist, an option to "extract and create
inner return class" could also be usefull.
This has also just been added in the tracker. Thoughts?
Discouragement is a disatisfaction with the past, a distate for the
present, and a distrust of the future - Maree De Jong, CLCA.