blob: e4b44a7f151fca37d411b899f57f3ea1451bf6c2 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>String Externalization Improvements</title>
</head>
<body>
&nbsp;
<table border="0" cellpadding="2" cellspacing="5" width="100%">
<tbody><tr>
<td colspan="2" align="left" bgcolor="#595791" valign="top" width="100%"><font face="Arial,Helvetica"><font color="#ffffff">String Externalization Improvements</font></font></td>
</tr>
<tr>
<td width="100%"> This document contains possible
work items to improve the externalization of strings. It is under
continuous refinement. Feedback welcome.<br>
Last edited: 19.07.2005
<h4>Possible Work Items</h4>
<ul>
<li style="font-weight: bold;">improve Java Editor<br style="font-weight: normal;">
</li>
<ul>
<li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> navigate from selected key in Java editor to definition in properties file editor</li>
</ul>
<ul>
<ul>
<li>navigate to start of file if the key is not yet defined<br>
</li>
</ul>
</ul>
<ul>
<li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> show value when hovering over key in Java editor</li>
</ul>
<ul style="font-weight: bold;">
<ul style="font-weight: normal;">
<li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> show value as is in the properties file</li>
</ul>
<ul style="font-weight: normal;">
<li>show value as returned by the accessor class (substitute parameters with defaults)</li>
</ul>
<li style="font-weight: normal;">offer a new Quick Fix to mark all strings on a line as non-externalizable at once</li>
<li style="font-weight: normal;">offer a new Quick Fix which externalizes just that string</li>
<ul>
<li style="font-weight: normal;">ideas:</li>
<ul>
<li style="font-weight: normal;">open corresponding properties file, add key, be in linked mode in CU editor<br>
</li>
</ul>
<ul>
<li style="font-weight: normal;">make it a refactoring</li>
<li style="font-weight: normal;">allow to type the key at the place of the string and add the new code</li>
<li style="font-weight: normal;">the hover which shows the value is an action hover which allows to change the value</li>
</ul>
<li style="font-weight: normal;">should support parametrized strings (see below)<br>
</li>
</ul>
<li style="font-weight: normal;">provide a Quick Assist to rename a property key and all places where it is used</li><li style="font-weight: normal;">allow to invoke the NLS Quick Fixes even if NLS warning is disabled (&#8658; Quick Assists?)</li>
</ul><li style="font-weight: bold;">improve Properties File editor</li>
<ul>
<li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> syntax coloring for Properties File Editor (comments, keys and values)<br>
</li><li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> provide separate double-click strategy for key and value part<br>
</li>
<li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> navigate from selected key and value in properties file to location in Java editor and Plug-in Manifest editor</li>
<li><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> spell checking</li>
<li>ensure correct ISO-8859-1 encoding when writing a properties file. Convert to ascii upon save. If using native2ascii tool a preference is needed to specify it (try to auto-detected).</li>
<li>allow to sort alphabetically</li>
</ul>
<ul>
<li>allow to group by first common prefix up to a specified separator (preference)
</li>
</ul>
<ul>
<li>context-sensitive search: Search Reference</li><li>provide a Quick Assist to rename a property key and all places where it is used</li>
<li>problem reporter which reports temporary problems (builder might be added later)</li>
<ul>
<li>duplicate keys<br>
</li>
<li>unused keys</li>
</ul>
<ul>
<li>invalid format strings being passed to MessageFormat causing IllegalArgumentException<br>
</li>
</ul>
</ul>
<ul>
<li>offer Quick Fixes to solve above errors:</li>
<ul>
<li>remove unused key (plus value)</li><li>correct invalid strings that cause MessageFormat to fail<br>
</li>
</ul>
<li>offer folding via first common prefix up to a specified separator (preference)</li>
<li>offer an Outline (request from Adam - asked him via e-mail)</li>
</ul>
<ul>
<ul>
<li>along a separator (e.g. . or _) or common prefix</li>
</ul>
<ul>
<li>allow to sort the file<br>
</li>
</ul>
<ul>
<li>allow to add, remove, paste, sort, ...</li>
</ul>
<ul>
<li>allow to change the key</li>
</ul>
<ul>
<li>allow to change the value<br>
</li>
</ul>
</ul>
<li style="font-weight: bold;">improve Externalize Strings wizard<br>
</li>
<ul>
<li>spell checking</li><li>ensure correct ISO-8859-1 encoding when writing a properties file. Convert to ascii
upon save. If using native2ascii tool a preference is needed to specify it (try to auto-detected)
</li>
</ul>
<ul>
<li>improve setting of default values<br>
</li>
</ul>
<ul>
<li>improve accessor class (and properties file) selection dialog</li>
</ul>
<ul>
<ul>
<li>replace it: instead of a dialog make it the first page of the wizard<br>
</li>
<li>add an Advanced &gt;&gt; button</li>
</ul>
<ul>
<li>correctly fill in values (detect and make read-only if accessor class has been chosen)<br>
</li>
</ul>
</ul>
<ul>
<li>find duplicate keys: currently the scope is limited to the keys inside the CU instead of the whole properties file<br>
</li><li>keep a history of values, especially which property file belongs to which accessor (if it can't be detected from the accessor)</li>
<li>support parametrized strings:</li>
<ul>
<li>allow to generate accessor method with parameters</li><li>suggest string with&nbsp; {0}, {1}, ...<br>
</li><li>correctly pass the parameters to the accessor method</li>
</ul>
</ul>
<li style="font-weight: bold;">improve NLS Search</li>
<ul>
<li>improve setting of default values in NLS Search page</li><li>reduce wrong matches reported by NLS Search</li>
<li>improve visibility (the tool is not well known)<br>
</li>
<ul>
<li>possible solution: integrate NLS Search into the Externalize Strings wizard or the new Java Properties view<br>
</li>
</ul>
</ul>
<li><span style="font-weight: bold;">improve property handling when moving and copying CUs</span><br>
</li>
<ul>
<li>add refactoring, move and copy participants which help take care of properties</li>
</ul>
<ul>
<li>offer a command to inline the property values into the CU</li>
</ul>
<ul>
<ul>
<li>this is already available as "Internalize" from the Externalize Strings wizard</li>
<li>problems:</li>
<ul>
<li>comments might get lost</li>
<li>keys might have to be entered again<br>
</li>
</ul>
</ul>
</ul>
<ul>
<ul>
<li>for one CU and it CU members</li>
</ul>
<ul>
<li>for multiple CUs i.e. for a selection with CUs, packages, source folders and projects</li>
</ul>
</ul>
<li><span style="font-weight: bold;">provide a builder which generates</span></li>
<ul>
<li>problems on properties files for unused keys</li><li>problems on properties files for duplicate keys</li><li>problems on properties files for invalid format strings being passed to MessageFormat</li>
<li>problems on CUs for non-existent keys</li><li>problems on CUs for unused keys</li>
</ul>
<li><span style="font-weight: bold;">investigate</span></li>
<ul>
<li>provide the functionality of the Externalize Strings wizard through a new Java
Properties view which allows to externalize the strings of the
currently selected element</li>
<li>make the NLS hover an action hover: user can activate it and directly change the value</li>
<li>add a preview to the Properties File editor which shows the file in ascii mode</li>
<li>show the UI (e.g. error dialog) where a select a property is used</li>
<li>NLS manager which allows to manage key/values per Java project / plug-in</li>
<ul>
<li>show all key/values, find duplicate values, allow to cut/copy/paste key/value pairs</li>
<li>find all unused keys</li>
<li>fix spell check errors</li>
<li>find duplicates</li>
</ul>
</ul>
</ul><br>
</td>
</tr>
</tbody></table>
<table border="0" cellpadding="2" cellspacing="5" width="100%"><tbody><tr><td colspan="4" align="left" bgcolor="#595791" valign="top" width="100%"><font face="Arial,Helvetica"><font color="#ffffff">Legend
</font></font></td>
</tr>
<tr>
<td valign="center"><img src="../images/progress.gif" nosave="" border="0" height="5" width="14" align="middle"></td>
<td width="50%">item is under development.</td>
<td valign="top"><img src="../images/glass.gif" nosave="" border="0" height="10" width="10"></td>
<td width="50%">item is under investigation.</td>
</tr>
<tr>
<td valign="center"><img src="../images/ok.gif" nosave="" border="0" height="10" width="10"></td>
<td width="50%">item is finished.</td>
<td valign="top">( )</td>
<td width="50%">item is time permitted.</td>
</tr>
<tr>
<td valign="center"><font class="indexsub" color="#8080ff">[xyz]</font></td>
<td width="50%">item is deferred to or continues in xyz.</td>
<td valign="top"><font class="indexsub"><img src="../images/new.gif" border="0"></font></td>
<td width="50%">new</td>
</tr>
</tbody>
</table>
<br>
<br></body></html>