Finding unused and incorrectly used keys in property files
Finding unused and incorrectly used keys in a property file:
-
Open the Search dialog by:
-
pressing Ctrl+H or
-
selecting Search > Search from the menu bar
-
See if a tab called NLS Keys is visible. If it is, then select it.
-
If it is not visible, press the Customize button and select the
NLS Keys checkbox, press OK to close the dialog and switch
to the NLS Key tab.
- In the Resource bundle accessor class field, enter the name of the
class that you use to retrieve strings from the property file. You can use
the Browse button to select the class from a list.
-
In the Property file name field, enter the name of the property
file. You can use the Browse button to select the file.
-
Select the scope of the search by using the controls in the Scope
group.
-
Press Search
After the search is finished, the Search Result view displays a list
of unused keys in the property file and of all incorrect references to
non-existing keys.
Note: This feature assumes that the resource bundle accessor
class used a method called getString with a single String
parameter to retrieve strings from the property file.
String Externalization
Externalizing Strings
Finding strings to externalize
Using the Externalize Strings wizard