T O P I C R E V I E W |
clawton |
Posted - Aug 13 2020 : 1:43:24 PM Can we get the ability to encapsulate multiple fields at once?
I use WPF Prism and need to encapsulate fields all the time and find myself writing all the backing variables first and then have to one by one select the variable and right-click, etc... This can be very tedious if you have lots of fields (as you typically do in Prism apps).
Would be nice to be able to highlight them all and do encapsulate just once.
Thanks for considering this. |
6 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Aug 17 2020 : 05:19:44 AM That's fair, and gives a sense of scale of the number of variables you are dealing with. We are considering an option to suppress the dialog, just generating the getter / setter for the variable, which would clearly help here:
case=95791 |
clawton |
Posted - Aug 15 2020 : 2:50:52 PM Certainly slower. Try doing it 20 times in a row for 20 fields.... |
feline |
Posted - Aug 15 2020 : 10:42:15 AM You should just be able to press Enter without interacting with the dialog box, so the dialog should be fairly fast. Is seeing the dialog causing a significant slow down for you? |
clawton |
Posted - Aug 14 2020 : 11:52:00 AM I like the keyboard shortcut idea. Maybe another option would be to make a "Quick" Encapsulate that just does the change without the intervening dialog box? |
feline |
Posted - Aug 14 2020 : 10:21:35 AM Another thought, to help speed this process up a little bit, you can map a keyboard shortcut in the IDE keyboard settings to the command:
VAssistX.RefactorEncapsulateField
allowing you to trigger the Encapsulate Field command directly, saving you a few actions each time you want to run this refactoring. |
feline |
Posted - Aug 14 2020 : 10:12:49 AM This is something we are considering, but I am not sure when we will get around to having a go at this:
case=1091 |