Skip to content

Commit

Permalink
N&N for method to specify message strings as known to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohnstn authored and iloveeclipse committed May 17, 2023
1 parent 5a8f478 commit 74c798d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 4.28/jdt.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ <h2>Debug</h2>
<h2>JDT Developers</h2>
</td>
</tr>
<tr id="new-method-to-mark-used-message keys">
<td class="title"><a href="#new-method-to-mark-used-message-keys">Method to mark message keys used</a></td>
<td class="content">
When developing Java code, there are set mechanisms for handling message translation. There is also a context action <b>Source &gt; Find Broken Externalized Strings</b> which checks <i>.properties</i> file and Java message translation classes that access the <i>.properties</i> file. The action checks for a number of issues including whether a message key is unused or missing and provides the results in the <b>Search</b> dialog.
<p>When detecting unused keys, it is possible for the action to generate false positives. For example, a message could be used by another plug-in or product which is not in the workspace or a message key could be dynamically created and the action cannot detect this.</p>
<p>A new mechanism has been added for a developer to denote that a message key is known to be used and should be ignored by the <b>Find Broken Externalized Strings</b> action. Simply copy any known used messages from the existing <i>.properties</i> file into a <i>.usedproperties</i> file with the same name, in the same package. The <i>.usedproperties</i> file follows the same syntax as a <i>.properties</i> file and any message keys added there will not be marked as unused by the action. The message data in the <i>.usedproperties</i> file is ignored and can be removed if desired.</p>
</td>
</tr>
<!-- *********************** End of JDT Developers ******************************** -->
<tr><td colspan="2"/></tr>
</tbody>
Expand Down

0 comments on commit 74c798d

Please sign in to comment.