6 comments
Comment actions Permalink

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

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

Hello Dean,

Thank you for your feedback.
It is always somewhat difficult to decide where you rely on a tool and where
you do things manually. At present, you have no such choice. You have either
to disable 'Redundant name qualifier' and/or 'Redundant this qualifier' highlighting,
or distinguish static members by other means than prefixing them with a class
name.
I agree that, since there is different handling of namespaces and types in
the code: namespaces are imported via using directives while types inherit
from each other, different highlightings make sense. We will consider splitting
'Redundant name qualifier' into 'Redundant namespace qualifier' and 'Redundant
type qualifier'.

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

Thanks,
Andrey Simanovsky


0
Comment actions Permalink

Andrey,

I thought this option was there in the past? Or am I mistaken?

I am sure it used to work, because I never had these warnings in the past,
but it did warn me about redundant namespace qualifiers.

Dino

"Andrey Simanovsky (JetBrains)" <ands@intellij.com> wrote in message
news:c8a8a15d12eb48c88948fe46697f@news.intellij.net...

Hello Dean,

>

Thank you for your feedback.
It is always somewhat difficult to decide where you rely on a tool and
where you do things manually. At present, you have no such choice. You
have either to disable 'Redundant name qualifier' and/or 'Redundant this
qualifier' highlighting, or distinguish static members by other means than
prefixing them with a class name. I agree that, since there is different
handling of namespaces and types in the code: namespaces are imported via
using directives while types inherit from each other, different
highlightings make sense. We will consider splitting 'Redundant name
qualifier' into 'Redundant namespace qualifier' and 'Redundant type
qualifier'.

>
>> 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
>>

Thanks,
Andrey Simanovsky

>



0
Comment actions Permalink

I believe there was no such option. Perhaps, ReSharper failed to detect redundancy
in some cases.

Andrey,

I thought this option was there in the past? Or am I mistaken?

I am sure it used to work, because I never had these warnings in the
past, but it did warn me about redundant namespace qualifiers.

Dino

"Andrey Simanovsky (JetBrains)" <ands@intellij.com> wrote in message
news:c8a8a15d12eb48c88948fe46697f@news.intellij.net...

>> Hello Dean,
>>
>> Thank you for your feedback.
>> It is always somewhat difficult to decide where you rely on a tool
>> and
>> where you do things manually. At present, you have no such choice.
>> You
>> have either to disable 'Redundant name qualifier' and/or 'Redundant
>> this
>> qualifier' highlighting, or distinguish static members by other means
>> than
>> prefixing them with a class name. I agree that, since there is
>> different
>> handling of namespaces and types in the code: namespaces are imported
>> via
>> using directives while types inherit from each other, different
>> highlightings make sense. We will consider splitting 'Redundant name
>> qualifier' into 'Redundant namespace qualifier' and 'Redundant type
>> qualifier'.
>>> 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
>>>
>> Thanks,
>> Andrey Simanovsky
Best regards,
Andrey Simanovsky


0
Comment actions Permalink

Heh - I might go back to that old buggy version then ;)

If this could be considered for the future I'd appreciate it.

Cheers,
Dino

"Andrey Simanovsky (JetBrains)" <ands@intellij.com> wrote in message
news:c8a8a15d12eef8c889e1360f4fdc@news.intellij.net...
>I believe there was no such option. Perhaps, ReSharper failed to detect
>redundancy in some cases.
>
>> Andrey,
>>
>> I thought this option was there in the past? Or am I mistaken?
>>
>> I am sure it used to work, because I never had these warnings in the
>> past, but it did warn me about redundant namespace qualifiers.
>>
>> Dino
>>
>> "Andrey Simanovsky (JetBrains)" <ands@intellij.com> wrote in message
>> news:c8a8a15d12eb48c88948fe46697f@news.intellij.net...
>>
>>> Hello Dean,
>>>
>>> Thank you for your feedback.
>>> It is always somewhat difficult to decide where you rely on a tool
>>> and
>>> where you do things manually. At present, you have no such choice.
>>> You
>>> have either to disable 'Redundant name qualifier' and/or 'Redundant
>>> this
>>> qualifier' highlighting, or distinguish static members by other means
>>> than
>>> prefixing them with a class name. I agree that, since there is
>>> different
>>> handling of namespaces and types in the code: namespaces are imported
>>> via
>>> using directives while types inherit from each other, different
>>> highlightings make sense. We will consider splitting 'Redundant name
>>> qualifier' into 'Redundant namespace qualifier' and 'Redundant type
>>> qualifier'.
>>>> 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
>>>>
>>> Thanks,
>>> Andrey Simanovsky

Best regards,
Andrey Simanovsky

>



0

Please sign in to leave a comment.