AutoFormat: Always Include this. and ClassName.

Hi,

Our company policy is to always include the "this." qualifier for
fields/methods (instance members) as well as "ClassName." for static
fields/methods. I set "Force "this." qualifier for instance members" to
"Use always" in the Resharper options (Code Style/Other). I expected the
Format feature to add the qualifier to members where it was missing, but
it does not.

Also, with previous builds, QuickFixes added the qualifier for instance
members - they don't do this any more since a few builds.

The option to add qualified qualifiers for static members is missing
totally, Reformat even removes them as unnecessary.

Any chance this is fixed until the release?

Thanks in advance,
Alexander Reifinger

2 comments
Comment actions Permalink

1) The extra "this." qualifier won't be added on reformat - it will be added
only while generating code (and will not be removed on reformat)
2) There is no any ways to use static methods always fully qualified.


These features will not be added in 2.0 release.
Please post corresponding requests to ourtracker, and we will consider
inmplementing them in the future

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Alexander Reifinger" <nospam@reifinger.de> wrote in message
news:e3vhip$2ko$1@is.intellij.net...

Hi,

>

Our company policy is to always include the "this." qualifier for
fields/methods (instance members) as well as "ClassName." for static
fields/methods. I set "Force "this." qualifier for instance members" to
"Use always" in the Resharper options (Code Style/Other). I expected the
Format feature to add the qualifier to members where it was missing, but
it does not.

>

Also, with previous builds, QuickFixes added the qualifier for instance
members - they don't do this any more since a few builds.

>

The option to add qualified qualifiers for static members is missing
totally, Reformat even removes them as unnecessary.

>

Any chance this is fixed until the release?

>

Thanks in advance,
Alexander Reifinger



0
Comment actions Permalink

While I think forcing the use of redundant 'this' qualifiers is really
beyond silly and useless, I can see that there are actually a few levels of
things needed. If you implement the ability to force the addition of
"this." qualifiers to things, they should be separate checkboxes (or a
separate group of radio buttons to take care of options in how and where
"this." should be added). So in otherwords, if someone checks "Force
"this." qualifier for instance members", then another checkbox should be
come active to allow the option of "Add "this." qualifier for instance
membres where missing".


"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:e3vmdd$ekm$1@is.intellij.net...

1) The extra "this." qualifier won't be added on reformat - it will be
added only while generating code (and will not be removed on reformat)
2) There is no any ways to use static methods always fully qualified.

>
>

These features will not be added in 2.0 release.
Please post corresponding requests to ourtracker, and we will consider
inmplementing them in the future

>

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Alexander Reifinger" <nospam@reifinger.de> wrote in message
news:e3vhip$2ko$1@is.intellij.net...

>> Hi,
>>
>> Our company policy is to always include the "this." qualifier for
>> fields/methods (instance members) as well as "ClassName." for static
>> fields/methods. I set "Force "this." qualifier for instance members" to
>> "Use always" in the Resharper options (Code Style/Other). I expected the
>> Format feature to add the qualifier to members where it was missing, but
>> it does not.
>>
>> Also, with previous builds, QuickFixes added the qualifier for instance
>> members - they don't do this any more since a few builds.
>>
>> The option to add qualified qualifiers for static members is missing
>> totally, Reformat even removes them as unnecessary.
>>
>> Any chance this is fixed until the release?
>>
>> Thanks in advance,
>> Alexander Reifinger
>



0

Please sign in to leave a comment.