Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 How about a bulk encapsulate

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mcaron Posted - Sep 17 2009 : 08:41:57 AM
It would be nice to be able to select a bunch of member variables at once and have the encapsulation done on each of them. Just me being greedy but it would be handy to have the Get* functions and the Set* functions all grouped together too. Select the lines you want to encapsulate int bar1 through float bar3 in the example below:

class foo
{
int bar1;
char bar2;
float bar3;
}

the select encapsultate to get this:

class foo
{
inline int GetBar1() const { return bar1; }
inline char GetBar2() const { return bar2; }
inline float GetBar3() const { return bar3; }

inline void SetBar1(const int val) { bar1 = val; }
inline void SetBar2(const char val) { bar2 = val; }
inline void SetBar3(const float val) { bar3 = val; }

int bar1;
char bar2;
float bar3;
}

It would be nice for "fixing" code written without encapsulation.

-Mike
4   L A T E S T    R E P L I E S    (Newest First)
mcaron Posted - Sep 17 2009 : 2:03:57 PM
No I'm actually quite happy with how it is all running. I've got to wrap my head around some of the new functionality, but I've already used to to refactor code and simplify things all over the place. Renaming and the ability to turn a block into a function have been HUGE hits with me and the guys I work with.

-Mike
feline Posted - Sep 17 2009 : 1:51:00 PM
I hope you are not suffering any performance problems now with VA. We work hard to try and make sure it runs quickly, so does not slow your machine down to much.
mcaron Posted - Sep 17 2009 : 12:34:37 PM
I used to use VA a long time ago and stopped using it because it had gotten so slow on my development system. After having been away from it for a few years and coming back I'm pleased to see that all the old functionality is still there and there are tons of new things. The VA Outline feature is a good example. I'll have to look into using that to group my accessors and mutators.

Thanks for the tip,
Mike
feline Posted - Sep 17 2009 : 12:26:37 PM
We are considering allowing you to select several items in VA Outline and trigger a VA refactoring commands on all of them in one go, which would allow you to use Encapsulate Field on several members at once.

case=7787

The grouping of the Get and Set methods, this is going to be something some people like and others dislike. Personally I tend to keep the pairs together, so I can see what is being done to the variable in one place.

VA Outline makes it easy to reorder the class via drag and drop.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000