![Image 2](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Introduction
This article describes plugin functions.
DT ReSharper Plugin roadmap
is available in the latest version
is partly available
- Context actions
Move strings to resource
Replace string by property
Use System.String.Empty
instead of ""
Use System.Environment.NewLine
instead of "\r\n"
- Highlighting
String literal is invalid
String could be moved to resource
String present in a resource
- Refactoring
Move strings to resource
Move all strings from file(s) to resource - Move all strings from folder(s) to resource
- Move all strings from project(s) to resource
- Move all strings from solution to resource
Context actions
Move strings to resource
Move strings to resource by context action.
![Image 14](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Replace string by property
If a string exists in project resource files, then use "Replace string by property" context action.
![Image 15](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Use System.String.Empty instead of ""
For empty strings use System.String.Empty
.
![Image 16](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Use System.Environment.NewLine instead of "\r\n"
For string that contains \r
and \n
, use System.Environment.NewLine
.
![Image 17](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Highlighting
String literal is invalid
In the ReSharper -> Options you can set "Localization -> String literal is invalid" to "Show as error".
![Image 18](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
An unrecognized escape sequence marked by red wave.
![Image 19](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
String could be moved to resource
In the ReSharper -> Options you can set "Localization -> String literal could be moved to resource" to "Show as warning".
![Image 20](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
All strings underlined by wavy line.
![Image 21](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Refactoring
Move strings to resource
You can move strings to resource by context action or main menu item.
![Image 22](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
First, you select the resource file and string name.
![Image 23](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
If the checkbox "Apply for all same strings in project {CurrentProjectName}" is true
, then you can see all the same strings in this project.
Current string does not present in this list.
String placed to resource file after action.
![Image 26](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
and string literal replaced by property.
If checkbox "Keep modified files open" is true
, then you can undo this action.
History
All changes
Visit DT ReSharper plugin homepage.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.