| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| |
| <html> |
| <head> |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <title>Finding unused and incorrectly used keys in property files</title> |
| </head> |
| |
| <body> |
| <h1>Finding unused and incorrectly used keys in property files</h1> |
| |
| <p>Finding unused and incorrectly used keys in a property file:</p> |
| |
| <ul> |
| <li> |
| Open the Search dialog by: |
| |
| <ul> |
| <li>pressing <kbd>Ctrl</kbd>+<kbd>H</kbd> or</li> |
| |
| <li>selecting <span class="control">Search > Search</span> from the menu bar</li> |
| </ul> |
| </li> |
| |
| <li>See if a tab called <span class="control">NLS Keys</span> is visible. If it is, then select it.</li> |
| |
| <li>If it is not visible, press the <span class="control">Customize</span> button and select the <span class="control">NLS Keys</span> checkbox, press <span class= |
| "control">OK</span> to close the dialog and switch to the <span class="control">NLS Key</span> tab.</li> |
| |
| <li>In the <span class="control">Resource bundle accessor class</span> field, enter the name of the class that you use to retrieve strings from the property file. You can |
| use the <span class="control">Browse</span> button to select the class from a list.</li> |
| |
| <li>In the <span class="control">Property file name</span> field, enter the name of the property file. You can use the <span class="control">Browse</span> button to select |
| the file.</li> |
| |
| <li>Select the scope of the search by using the controls in the <span class="control">Scope</span> group.</li> |
| |
| <li>Press <span class="control">Search</span></li> |
| </ul> |
| |
| <p>After the search is finished, the Search Result view displays a list of unused keys in the property file and all incorrect references to non-existing keys.</p> |
| |
| <p class="Note">Note: This feature assumes that the resource bundle accessor class used a method called <em>getString</em> with a single <em>String</em> parameter to retrieve |
| strings from the property file.</p> |
| |
| <p><img src="../images/ngrelc.png" alt="Related concepts" border="0" ><br> |
| <a href="../concepts/cnls.htm">String Externalization</a><br> |
| </p> |
| |
| <p><img src="../images/ngrelt.png" alt="Related tasks" border="0" ><br> |
| <a href="tasks-206.htm">Externalizing Strings</a><br> |
| <a href="tasks-188.htm">Finding strings to externalize</a><br> |
| <a href="tasks-180.htm">Using the Externalize Strings wizard</a></p> |
| |
| <p><img src="../images/ngrelr.png" alt="Related reference" border="0" ><br> |
| <a href="../reference/ref-wizard-externalize-strings.htm">Externalize Strings wizard</a><br> |
| <a href="../reference/ref-menu-source.htm">Source menu</a><br> |
| </p> |
| |
| |
| </body> |
| </html> |
| |