"Remove Redundant Qualifier" quick-fix enhancement request

Currently when redundant qualifiers are present, the "quickfix" lightbulb
contains two options:

  • Remove Redundant Qualifier

  • Ignore "Redundant Qualifier" warnings


There is at least one, and probably up to three options missing from this
list:

  • Remove All Redundant Qualifiers Like This One

  • Remove All Redundant Qualifiers In Class

  • Remove All Redundant Qualifiers In File (when there's more than one

class in the file)

In the example I found, all the VS2005-generated event handlers in my
WinForms application had "System.EventArgs" parameters, where the "System."
part was flagged as a redundant qualifier. Since this occured at least 20
times in the same class, it was very tedious to remove them one at a time.
It would be nice to have a simple option to remove all "System." redundant
qualifiers (leaving others alone for me to inspect individually), or in some
cases, to remove ALL redundant qualifiers in one action.

Part of the reason for this suggestion, other than the tediousness of
clicking on each one and then selecting the option from the lightbulb is
that the lightbulb took a while to come up, so there was a bit of "click,
wait, move cursor over lightbulb to trigger menu, move cursor over
down-arrow to expand menu, move cursor to select item, click" over and over,
and that just seems to be a bit much.

Additionally, on some other redundant qualifiers (I think it was
"System.Window.Forms" or something like that) on some variable declarations,
I couldn't seem to get the lightbulb to pop up, no matter where I clicked.
So I was deleting those manually, and it was almost as fast as using the
'quickfix' (meaning the 'quickfix' isn't quick enough, and doesn't save you
enough time... there's just as much effort expended in accurately
positioning the mouse, for example).


4 comments
Comment actions Permalink

I think the best way is to optimize usings or reformat the file with
"Shorten references" option turned on. This will eliminate all redundant
qualifiers int he whole file

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dsau0n$1b8$1@is.intellij.net...

Currently when redundant qualifiers are present, the "quickfix" lightbulb
contains two options:

>

  • * Remove Redundant Qualifier

  • Ignore "Redundant Qualifier" warnings

>

There is at least one, and probably up to three options missing from this
list:

>

  • * Remove All Redundant Qualifiers Like This One

  • Remove All Redundant Qualifiers In Class

  • Remove All Redundant Qualifiers In File (when there's more than one

class in the file)

>

In the example I found, all the VS2005-generated event handlers in my
WinForms application had "System.EventArgs" parameters, where the
"System." part was flagged as a redundant qualifier. Since this occured
at least 20 times in the same class, it was very tedious to remove them
one at a time. It would be nice to have a simple option to remove all
"System." redundant qualifiers (leaving others alone for me to inspect
individually), or in some cases, to remove ALL redundant qualifiers in one
action.

>

Part of the reason for this suggestion, other than the tediousness of
clicking on each one and then selecting the option from the lightbulb is
that the lightbulb took a while to come up, so there was a bit of "click,
wait, move cursor over lightbulb to trigger menu, move cursor over
down-arrow to expand menu, move cursor to select item, click" over and
over, and that just seems to be a bit much.

>

Additionally, on some other redundant qualifiers (I think it was
"System.Window.Forms" or something like that) on some variable
declarations, I couldn't seem to get the lightbulb to pop up, no matter
where I clicked. So I was deleting those manually, and it was almost as
fast as using the 'quickfix' (meaning the 'quickfix' isn't quick enough,
and doesn't save you enough time... there's just as much effort expended
in accurately positioning the mouse, for example).



0
Comment actions Permalink

Right now it don't always work...

"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:dsav8v$g1$1@is.intellij.net...
>I think the best way is to optimize usings or reformat the file with
>"Shorten references" option turned on. This will eliminate all redundant
>qualifiers int he whole file
>

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dsau0n$1b8$1@is.intellij.net...

>> Currently when redundant qualifiers are present, the "quickfix" lightbulb
>> contains two options:
>>
>> * Remove Redundant Qualifier
>> * Ignore "Redundant Qualifier" warnings
>>
>> There is at least one, and probably up to three options missing from this
>> list:
>>
>> * Remove All Redundant Qualifiers Like This One
>> * Remove All Redundant Qualifiers In Class
>> * Remove All Redundant Qualifiers In File (when there's more than one
>> class in the file)
>>
>> In the example I found, all the VS2005-generated event handlers in my
>> WinForms application had "System.EventArgs" parameters, where the
>> "System." part was flagged as a redundant qualifier. Since this occured
>> at least 20 times in the same class, it was very tedious to remove them
>> one at a time. It would be nice to have a simple option to remove all
>> "System." redundant qualifiers (leaving others alone for me to inspect
>> individually), or in some cases, to remove ALL redundant qualifiers in
>> one action.
>>
>> Part of the reason for this suggestion, other than the tediousness of
>> clicking on each one and then selecting the option from the lightbulb is
>> that the lightbulb took a while to come up, so there was a bit of "click,
>> wait, move cursor over lightbulb to trigger menu, move cursor over
>> down-arrow to expand menu, move cursor to select item, click" over and
>> over, and that just seems to be a bit much.
>>
>> Additionally, on some other redundant qualifiers (I think it was
>> "System.Window.Forms" or something like that) on some variable
>> declarations, I couldn't seem to get the lightbulb to pop up, no matter
>> where I clicked. So I was deleting those manually, and it was almost as
>> fast as using the 'quickfix' (meaning the 'quickfix' isn't quick enough,
>> and doesn't save you enough time... there's just as much effort expended
>> in accurately positioning the mouse, for example).
>>
>



0
Comment actions Permalink

Right now it don't always work...


How to reproduce?

Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Right now it don't always work...

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

>> I think the best way is to optimize usings or reformat the file with
>> "Shorten references" option turned on. This will eliminate all
>> redundant qualifiers int he whole file
>>
>> --
>> Eugene Pasynkov
>> Developer
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>> "Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
>> news:dsau0n$1b8$1@is.intellij.net...
>>> Currently when redundant qualifiers are present, the "quickfix"
>>> lightbulb contains two options:
>>>
>>> * Remove Redundant Qualifier
>>> * Ignore "Redundant Qualifier" warnings
>>> There is at least one, and probably up to three options missing from
>>> this list:
>>>
>>> * Remove All Redundant Qualifiers Like This One
>>> * Remove All Redundant Qualifiers In Class
>>> * Remove All Redundant Qualifiers In File (when there's more than
>>> one
>>> class in the file)
>>> In the example I found, all the VS2005-generated event handlers in
>>> my WinForms application had "System.EventArgs" parameters, where the
>>> "System." part was flagged as a redundant qualifier. Since this
>>> occured at least 20 times in the same class, it was very tedious to
>>> remove them one at a time. It would be nice to have a simple option
>>> to remove all "System." redundant qualifiers (leaving others alone
>>> for me to inspect individually), or in some cases, to remove ALL
>>> redundant qualifiers in one action.
>>>
>>> Part of the reason for this suggestion, other than the tediousness
>>> of clicking on each one and then selecting the option from the
>>> lightbulb is that the lightbulb took a while to come up, so there
>>> was a bit of "click, wait, move cursor over lightbulb to trigger
>>> menu, move cursor over down-arrow to expand menu, move cursor to
>>> select item, click" over and over, and that just seems to be a bit
>>> much.
>>>
>>> Additionally, on some other redundant qualifiers (I think it was
>>> "System.Window.Forms" or something like that) on some variable
>>> declarations, I couldn't seem to get the lightbulb to pop up, no
>>> matter where I clicked. So I was deleting those manually, and it was
>>> almost as fast as using the 'quickfix' (meaning the 'quickfix' isn't
>>> quick enough, and doesn't save you enough time... there's just as
>>> much effort expended in accurately positioning the mouse, for
>>> example).
>>>


0
Comment actions Permalink

I agree this is one way to do it. I was just suggesting that it would be
more convenient and intuitive to have the option at the quick-fix
location... especially when you're faced with a dozen of the exact same
redundant qualifiers that VS2005 put in when generating code while creating
winforms, for example.

"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> wrote in
message news:dsav8v$g1$1@is.intellij.net...
>I think the best way is to optimize usings or reformat the file with
>"Shorten references" option turned on. This will eliminate all redundant
>qualifiers int he whole file
>

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dsau0n$1b8$1@is.intellij.net...

>> Currently when redundant qualifiers are present, the "quickfix" lightbulb
>> contains two options:
>>
>> * Remove Redundant Qualifier
>> * Ignore "Redundant Qualifier" warnings
>>
>> There is at least one, and probably up to three options missing from this
>> list:
>>
>> * Remove All Redundant Qualifiers Like This One
>> * Remove All Redundant Qualifiers In Class
>> * Remove All Redundant Qualifiers In File (when there's more than one
>> class in the file)
>>
>> In the example I found, all the VS2005-generated event handlers in my
>> WinForms application had "System.EventArgs" parameters, where the
>> "System." part was flagged as a redundant qualifier. Since this occured
>> at least 20 times in the same class, it was very tedious to remove them
>> one at a time. It would be nice to have a simple option to remove all
>> "System." redundant qualifiers (leaving others alone for me to inspect
>> individually), or in some cases, to remove ALL redundant qualifiers in
>> one action.
>>
>> Part of the reason for this suggestion, other than the tediousness of
>> clicking on each one and then selecting the option from the lightbulb is
>> that the lightbulb took a while to come up, so there was a bit of "click,
>> wait, move cursor over lightbulb to trigger menu, move cursor over
>> down-arrow to expand menu, move cursor to select item, click" over and
>> over, and that just seems to be a bit much.
>>
>> Additionally, on some other redundant qualifiers (I think it was
>> "System.Window.Forms" or something like that) on some variable
>> declarations, I couldn't seem to get the lightbulb to pop up, no matter
>> where I clicked. So I was deleting those manually, and it was almost as
>> fast as using the 'quickfix' (meaning the 'quickfix' isn't quick enough,
>> and doesn't save you enough time... there's just as much effort expended
>> in accurately positioning the mouse, for example).
>>
>



0

Please sign in to leave a comment.