extract variable and const
How do I configure Resharper when extracting to variable and making it a const to put it in the class scope instead of the scope where it is?
It seems there is a nice feature that it will find duplicates of the extraction and change them to the variable/const name but again, is limited to the scope where the value is instead of the class scope. Is there a way to change this behavior too?
Thanks In Advance.
Please sign in to leave a comment.
"j.west" <no_reply@jetbrains.com> wrote in message
news:5082013.1190905076286.JavaMail.itn@is.intellij.net...
>
>
Try using Introduce Field instead of Introduce Variable.
--
John
Introduce as field put it in the class scope.
However, having the same literal throughout the document
and use the introduce as field doesn't capture the duplicates.
Oh well, JetBrains folks, can this be a feature request?
Wonder if duplicate const or literals could be added to the global analysis.
Thanks for the reply!
Message was edited by:
j.west
any way to retroactively give the points on this?