IntelliJ IDEA 13.1 Web Help

Alt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+Enter, Shift+Alt+J or Ctrl+Shift+MAlt EnterAlt EnterCommand 1 - i18nize hard coded string literal


Use this dialog box to extract a hard-coded string literal to the specified .properties file. This intention action becomes available, when the Hard-Coded Strings inspection is enabled.

Item Description
Properties file In this text box, specify the .properties file to store the extracted string literal in. Type the path to the file manually or click the Browse button img to open the Choose Properties File dialog, where you can select the desired location using the project tree view or through a search by name. As you type the search string, the suggestion list shrinks to show the matching properties files only.
Update all properties files in resource bundle Select this check box to have all properties files in the target bundle updated.
Property key By default, this text box displays the suggested key name, based on the value of the string to be extracted. Accept the default name or type the desired one.
Property value By default, this field displays the value of the string to be extracted. Accept the default value or type the desired one.
Resource bundle expression By default, this field displays a resource bundle expression from the resource bundle declaration in the source code. If the resource bundle is not declared in the source code, the field shows an invalid value in red. To improve the situation, define the desired expression. Do one of the following:

Tip

Basic code completion (Ctrl+SpaceCtrl+SpaceCtrl+SpaceCtrl+SpaceAlt+SlashCtrl+SpaceCtrl+SpaceCtrl+Space or Ctrl+Back SlashCtrl+SpaceControl SpaceControl SpaceControl Space) is available in this field.

Edit i18n template Click this link to open the File Template dialog box, where you can change the I18nized Expression template to point to the method of a custom utility class that will be used to access a resource bundle.

Note

Changed file template is a global setting that affects all projects. If you want to restore defaults, open the File Templates dialog box, find the I18nized Expression template in the Code tab, and click the Reset button reset.

Preview This read-only field displays the results of applying the I18nize hard-coded string literal intention action.

See Also

Concepts:

Procedures:

Reference:

Web Resources: