The refactor red light bulb and suggestions.

When I loaded a project I RS did its thing on the code and highlighted quite a number of redundant casts and so on. Up to now, I've clicked on each orange item in the inspection gutter (hope that makes sense) and RS takes me to the line of code. If I click on the 'offending' item, it displays the red light bulb to the left of the code and gives me the pulldown of the suggested items. No problem with this at all.

What I'd like to ask is if it is possible to tell RS to automatically correct all the similar suggestions in the source file? That is, instead of removing all redundant casts manually on each line, can you tell RS to remove all redundant casts in all the lines in one step?

If that's possible, can you do the same on all other types of suggested change that I select from the pulldown? It's just that if I have a source file that contains 100's of similar suggestions it takes quite a while to correct them all. I know I can do a manual search and replace but RS seems better as it takes redundant parentheses into account if they are part of the suggested code correction.

Message was edited by:
Peter Hamilton-Scott

Message was edited by:
Peter Hamilton-Scott

2 comments
Comment actions Permalink

This is already implemented in the next ReSharper version (4.0)

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Peter Hamilton-Scott" <no_reply@jetbrains.com> wrote in message
news:3814135.1200828480549.JavaMail.itn@is.intellij.net...

When I loaded a project I RS did its thing on the code and highlighted
quite a number of redundant casts and so on. Up to now, I've clicked on
each orange item in the inspection gutter (hope that makes sense) and RS
takes me to the line of code. If I click on the 'offending' item, it
displays the red light bulb to the left of the code and gives me the
pulldown of the suggested items. No problem with this at all.

>

What I'd like to ask is if it is possible to tell RS to automatically
correct all the similar suggestions in the source file? That is, instead
of manually removing all redundant casts manually on each line, can you
tell RS to remove all redundant casts in all the lines in one step?

>

If that's possible, can you do the same on all other types of suggested
change that I select from the pulldown. It's just that if I have a source
file that contains 100's of similar suggestions it takes quite a while to
correct them all. I know I can do a manual search and replace but RS seems
better as it takes redundant parentheses into account if they are part of
the suggested code correction.



0
Comment actions Permalink

Thanks Eugene. Now, all I want to know is when will RS4 be available for EAP or production level download. ;)

0

Please sign in to leave a comment.