New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize field from constructor with custom names #179

Open
piteerus opened this Issue Feb 19, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@piteerus

piteerus commented Feb 19, 2016

Provide opiotn for initializing field from constructor parameters using specified template like:

  • m_[paramName]
  • _[paramName]

Names generated by Refactoring Essentials should be customizable or detected by heuristic algoritms from already created fields.

Right now there is no way to change the template how new fields are generated and it uses template:
this.[paramName] = [paramName]
which forces me to rename every time when it's created :)

@disklosr

This comment has been minimized.

Show comment
Hide comment
@disklosr

disklosr Mar 16, 2016

Just installed this extension and first thing I tried is generate fields from constructors and I couldn't find a way to customize the naming convention for private fields to match mine. This is an important settings to have imo.

disklosr commented Mar 16, 2016

Just installed this extension and first thing I tried is generate fields from constructors and I couldn't find a way to customize the naming convention for private fields to match mine. This is an important settings to have imo.

@Rpinski

This comment has been minimized.

Show comment
Hide comment
@Rpinski

Rpinski Mar 16, 2016

Member

Currently RefactoringEssentials is just a compilation of Roslyn-based analyzers/refactorings. They don't support any configuration. We are thinking about configuration through a JSON file inside of the solution/project in question, but that's only an idea at the moment.

Member

Rpinski commented Mar 16, 2016

Currently RefactoringEssentials is just a compilation of Roslyn-based analyzers/refactorings. They don't support any configuration. We are thinking about configuration through a JSON file inside of the solution/project in question, but that's only an idea at the moment.

@ivanz

This comment has been minimized.

Show comment
Hide comment
@ivanz

ivanz Apr 11, 2016

@Rpinski I am willing to potentially spend some time on this, but before I do - do you know if:

  1. Is someone else looking into this already?
  2. Is MS potentially working on or planning something in Roslyn for configuration?

ivanz commented Apr 11, 2016

@Rpinski I am willing to potentially spend some time on this, but before I do - do you know if:

  1. Is someone else looking into this already?
  2. Is MS potentially working on or planning something in Roslyn for configuration?
@disklosr

This comment has been minimized.

Show comment
Hide comment
@disklosr

disklosr Apr 11, 2016

@ivanz I know that next version of VS will have a settings panel where we can define code styles like this one.

disklosr commented Apr 11, 2016

@ivanz I know that next version of VS will have a settings panel where we can define code styles like this one.

@Rpinski

This comment has been minimized.

Show comment
Hide comment
@Rpinski

Rpinski May 10, 2016

Member

Also see #84 and the related Roslyn issue dotnet/roslyn#4616.

Member

Rpinski commented May 10, 2016

Also see #84 and the related Roslyn issue dotnet/roslyn#4616.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment