Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Encapsulate multiple fields
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

clawton
New Member

USA
8 Posts

Posted - Aug 13 2020 :  1:43:24 PM  Show Profile  Reply with Quote
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.

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 14 2020 :  10:12:49 AM  Show Profile  Reply with Quote
This is something we are considering, but I am not sure when we will get around to having a go at this:

case=1091

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 14 2020 :  10:21:35 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

clawton
New Member

USA
8 Posts

Posted - Aug 14 2020 :  11:52:00 AM  Show Profile  Reply with Quote
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?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 15 2020 :  10:42:15 AM  Show Profile  Reply with Quote
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?

zen is the art of being at one with the two'ness
Go to Top of Page

clawton
New Member

USA
8 Posts

Posted - Aug 15 2020 :  2:50:52 PM  Show Profile  Reply with Quote
Certainly slower. Try doing it 20 times in a row for 20 fields....
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Aug 17 2020 :  05:19:44 AM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000