3 comments
Comment actions Permalink

Actually, I am helping, you just don't want the help that's available.
There's no NEED to redundantly qualify the identifier like that, and the
reason for doing so (to easily tell statics from non-statics) can be done
via Resharper's additional color coding. If you want to reject my help,
fine, but don't say I'm not helping.

"Dean Cleaver" <dean.cleaver@panties.xceptionsoftware.com> wrote in message
news:eb8b7p$qcr$1@is.intellij.net...

But I WANT to redundantly qualify the static call with Foo, but I don't
want it to be a warning!

>

Paul - please - you are not helping.

>

"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:eb7n45$6qb$1@is.intellij.net...

>>I was just saying, if you use coloring to highlight usages like this, you
>>don't NEED to redundantly and needelessly qualify the identifier with
>>"Foo". It's obvious from the color.
>>
>>
>> "Dean Cleaver" <dean.cleaver@panties.xceptionsoftware.com> wrote in
>> message news:eb0fns$bl7$1@is.intellij.net...
>>> Perhaps I didn't explain it well...
>>>
>>> using System;
>>>
>>> public class Foo
>>> {
>>> public static int Bar()
>>> {
>>> return 1;
>>> }
>>>
>>> public static void Test()
>>> {
>>> System.Int32 test = Foo.Bar(); // THIS LINE
>>> }
>>> }
>>>
>>> On that line, it highlights System and Foo as being redundant as a
>>> warning. I want the warning about System, but not the warning about
>>> Foo - I often prefer to explicitely reference the class when making
>>> static calls.
>>>
>>> Dino
>>>
>>> "Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
>>> news:eavq2a$jv8$1@is.intellij.net...
>>>> Have you changed the syntax coloring for static members? You could use
>>>> THAT as an indicator...
>>>>
>>>> "Dean Cleaver" <dean.cleaver@panties.xceptionsoftware.com> wrote in
>>>> message news:eautof$71t$1@is.intellij.net...
>>>>> Personally, I often put the class name before a static call just to
>>>>> clarify, or to differentiate between a local variable and a static
>>>>> module level one.
>>>>>
>>>>> However, ReSharper seems to highlight these as unnecessary, and the
>>>>> only option to override that is to change the "Redundant name
>>>>> qualifier" warning, but that removes warnings for all redundant
>>>>> qualifiers... like if I have using System; and then use
>>>>> System.DBNull.Value somewhere, it removes the highlighting of System
>>>>> as being redundant which I want.
>>>>>
>>>>> Can we have a separate "Redundant classname modifier" warning or have
>>>>> I missed something somewhere?
>>>>>
>>>>> Dino
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>



0
Comment actions Permalink

Paul Bradshaw wrote:

Actually, I am helping, you just don't want the help that's available.
There's no NEED to redundantly qualify the identifier like that, and the
reason for doing so (to easily tell statics from non-statics) can be done
via Resharper's additional color coding. If you want to reject my help,
fine, but don't say I'm not helping.


Really? I can't seem to find that in the latest EAP fonts and colors...
am I looking in the wrong place (because i'd like the coloring, and
don't have the same style requirement as Dean...)

Flipside: this seems like a dial that would be nice to be able to tune,
I could see a god justification for the style Dean is describing being
part of a coding pratices standard.

0

Please sign in to leave a comment.