I suggest you ...

Refactoring : Place a set of variables into a new sub struct/class/namespace

This suggestion is migrated to Developer Community. Please use below link to view the current status.
https://developercommunity.visualstudio.com/content/idea/351387/refactoring-place-a-set-of-variables-into-a-new-su.html
During design I often endup with having to group variable into logical concept at a later stage and this can be time consuming, so an automatic refactoring option would be usefull.

The feature would allow the selection of a block of variable and wraping them into a struct{}name; or class{}name; using a refactoring option.

example:

class A {
int x;
int y;
int age;
int height;
int weight;
};

refactored to:

class A {
struct {
int x;
int y;
} position;

struct {
int age;
int height;
int weight;
} attribute;
};

code get refacored accordingly

x = 0; into position.x = 0;
age = 21; into attribute.age = 21;

1 vote
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Stephan Schaem shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base