IntelliJ IDEA 2017.1 Help

Recognizing Hard-Coded String Literals

Your source code can contain hard-coded literals which you would like to recognize and further extract to properties. To highlight hard-coded literals in the editor, use Internationalization code inspections.

To enable recognizing hard-coded string literals

  1. Open the Settings dialog.
  2. In the Project Settings, select Editor | Inspections to open Inspections dialog box.
  3. Select the desired profile, and locate the node Internationalization issues.
  4. Check the option Hard coded strings, which will cause the hard-coded string literals to be highlighted in the editor.
  5. Apply changes and close the dialog. Now the editor will highlight the hard-coded string literals, as shown below:
    img

See Also

Reference:

Last modified: 18 July 2017