This simple extension adds an "Extract strings to constants" command to the "Tools" menu.
The command extract all the strings inside the class, converting them to member constants.
If a string is duplicated or has already been extracted, the same constant reference is used.
The generated constant variable name is generated from the content of the string itself.
Special characters are ignored.
1) Sample: the original code
2) Select the code you want to refactor
3) Click the command in the menu
4) Refactored code