platform-text-home/development/String_Externalization_Improvements.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : dmegert 1.1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 :     <html><head><title>String Externalization Improvements</title>
3 :     <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css"></head>
4 :     <body>
5 :     &nbsp;
6 :     <table border="0" cellpadding="2" cellspacing="5" width="100%">
7 :     <tbody><tr>
8 :     <td colspan="2" align="left" bgcolor="#0080c0" valign="top" width="100%"><b><font face="Arial,Helvetica"><font color="#ffffff">String Externalization Improvements</font></font></b></td>
9 :     </tr>
10 :     <tr>
11 :     <td width="100%"> This document contains possible
12 :     work items to improve the externalization of strings. It is under
13 :     continuous refinement. Feedback welcome.<br>
14 :     Last edited: 19.07.2005
15 :     <h4>Possible Work Items</h4>
16 :     <ul>
17 :     <li style="font-weight: bold;">improve Java Editor<br style="font-weight: normal;">
18 :     </li>
19 :     <ul>
20 :     <li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/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>
21 :     </ul>
22 :     <ul>
23 :     <ul>
24 :     <li>navigate to start of file if the key is not yet defined<br>
25 :     </li>
26 :     </ul>
27 :     </ul>
28 :    
29 :    
30 :     <ul>
31 :     <li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/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>
32 :     </ul>
33 :    
34 :     <ul style="font-weight: bold;">
35 :    
36 :     <ul style="font-weight: normal;">
37 :     <li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/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>
38 :     </ul>
39 :    
40 :    
41 :     <ul style="font-weight: normal;">
42 :     <li>show value as returned by the accessor class (substitute parameters with defaults)</li>
43 :     </ul>
44 :     <li style="font-weight: normal;">offer a new Quick Fix to mark all strings on a line as non-externalizable at once</li>
45 :     <li style="font-weight: normal;">offer a new Quick Fix which externalizes just that string</li>
46 :     <ul>
47 :     <li style="font-weight: normal;">ideas:</li>
48 :     <ul>
49 :     <li style="font-weight: normal;">open corresponding properties file, add key, be in linked mode in CU editor<br>
50 :     </li>
51 :     </ul>
52 :     <ul>
53 :     <li style="font-weight: normal;">make it a refactoring</li>
54 :     <li style="font-weight: normal;">allow to type the key at the place of the string and add the new code</li>
55 :     <li style="font-weight: normal;">the hover which shows the value is an action hover which allows to change the value</li>
56 :     </ul>
57 :     <li style="font-weight: normal;">should support parametrized strings (see below)<br>
58 :     </li>
59 :     </ul>
60 :     <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>
61 :    
62 :     </ul><li style="font-weight: bold;">improve Properties File editor</li>
63 :     <ul>
64 :     <li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/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>
65 :     </li><li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/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>
66 :     </li>
67 :     <li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/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>
68 :     <li><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/images/ok.gif" nosave="" border="0" height="10" width="10"><font color="#4eb153"> 3.1</font> spell checking</li>
69 :     <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>
70 :     <li>allow to sort alphabetically</li>
71 :     </ul>
72 :     <ul>
73 :     <li>allow to group by first common prefix up to a specified separator (preference)
74 :     </li>
75 :     </ul>
76 :    
77 :    
78 :     <ul>
79 :     <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>
80 :    
81 :     <li>problem reporter which reports temporary problems (builder might be added later)</li>
82 :     <ul>
83 :     <li>duplicate keys<br>
84 :     </li>
85 :     <li>unused keys</li>
86 :     </ul>
87 :     <ul>
88 :     <li>invalid format strings being passed to MessageFormat causing IllegalArgumentException<br>
89 :     </li>
90 :     </ul>
91 :     </ul>
92 :     <ul>
93 :     <li>offer Quick Fixes to solve above errors:</li>
94 :    
95 :     <ul>
96 :     <li>remove unused key (plus value)</li><li>correct invalid strings that cause MessageFormat to fail<br>
97 :     </li>
98 :     </ul>
99 :     <li>offer folding via first common prefix up to a specified separator (preference)</li>
100 :     <li>offer an Outline (request from Adam - asked him via e-mail)</li>
101 :    
102 :     </ul>
103 :    
104 :     <ul>
105 :    
106 :     <ul>
107 :     <li>along a separator (e.g. . or _) or common prefix</li>
108 :     </ul>
109 :    
110 :    
111 :     <ul>
112 :     <li>allow to sort the file<br>
113 :     </li>
114 :     </ul>
115 :    
116 :    
117 :     <ul>
118 :     <li>allow to add, remove, paste, sort, ...</li>
119 :     </ul>
120 :    
121 :    
122 :     <ul>
123 :     <li>allow to change the key</li>
124 :     </ul>
125 :    
126 :    
127 :     <ul>
128 :     <li>allow to change the value<br>
129 :     </li>
130 :     </ul>
131 :    
132 :     </ul>
133 :     <li style="font-weight: bold;">improve Externalize Strings wizard<br>
134 :     </li>
135 :     <ul>
136 :     <li>spell checking</li><li>ensure correct ISO-8859-1 encoding when writing a properties file. Convert to ascii
137 :     upon save. If using native2ascii tool a preference is needed to specify it (try to auto-detected)
138 :     </li>
139 :    
140 :     </ul>
141 :     <ul>
142 :     <li>improve setting of default values<br>
143 :     </li>
144 :     </ul>
145 :     <ul>
146 :     <li>improve accessor class (and properties file) selection dialog</li>
147 :     </ul>
148 :     <ul>
149 :     <ul>
150 :     <li>replace it: instead of a dialog make it the first page of the wizard<br>
151 :     </li>
152 :     <li>add an Advanced &gt;&gt; button</li>
153 :     </ul>
154 :     <ul>
155 :     <li>correctly fill in values (detect and make read-only if accessor class has been chosen)<br>
156 :     </li>
157 :     </ul>
158 :     </ul>
159 :     <ul>
160 :     <li>find duplicate keys: currently the scope is limited to the keys inside the CU instead of the whole properties file<br>
161 :     </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>
162 :    
163 :    
164 :     <li>support parametrized strings:</li>
165 :     <ul>
166 :     <li>allow to generate accessor method with parameters</li><li>suggest string with&nbsp; {0}, {1}, ...<br>
167 :     </li><li>correctly pass the parameters to the accessor method</li>
168 :     </ul>
169 :     </ul>
170 :     <li style="font-weight: bold;">improve NLS Search</li>
171 :     <ul>
172 :    
173 :     <li>improve setting of default values in NLS Search page</li><li>reduce wrong matches reported by NLS Search</li>
174 :     <li>improve visibility (the tool is not well known)<br>
175 :     </li>
176 :     <ul>
177 :     <li>possible solution: integrate NLS Search into the Externalize Strings wizard or the new Java Properties view<br>
178 :     </li>
179 :     </ul>
180 :    
181 :     </ul>
182 :     <li><span style="font-weight: bold;">improve property handling when moving and copying CUs</span><br>
183 :     </li>
184 :     <ul>
185 :     <li>add refactoring, move and copy participants which help take care of properties</li>
186 :     </ul>
187 :     <ul>
188 :     <li>offer a command to inline the property values into the CU</li>
189 :     </ul>
190 :     <ul>
191 :     <ul>
192 :     <li>this is already available as "Internalize" from the Externalize Strings wizard</li>
193 :     <li>problems:</li>
194 :     <ul>
195 :     <li>comments might get lost</li>
196 :     <li>keys might have to be entered again<br>
197 :     </li>
198 :     </ul>
199 :     </ul>
200 :     </ul>
201 :     <ul>
202 :     <ul>
203 :     <li>for one CU and it CU members</li>
204 :     </ul>
205 :     <ul>
206 :     <li>for multiple CUs i.e. for a selection with CUs, packages, source folders and projects</li>
207 :     </ul>
208 :     </ul>
209 :     <li><span style="font-weight: bold;">provide a builder which generates</span></li>
210 :     <ul>
211 :     <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>
212 :     <li>problems on CUs for non-existent keys</li><li>problems on CUs for unused keys</li>
213 :     </ul>
214 :     <li><span style="font-weight: bold;">investigate</span></li>
215 :     <ul>
216 :     <li>provide the functionality of the Externalize Strings wizard through a new Java
217 :     Properties view which allows to externalize the strings of the
218 :     currently selected element</li>
219 :     <li>make the NLS hover an action hover: user can activate it and directly change the value</li>
220 :     <li>add a preview to the Properties File editor which shows the file in ascii mode</li>
221 :     <li>show the UI (e.g. error dialog) where a select a property is used</li>
222 :     <li>NLS manager which allows to manage key/values per Java project / plug-in</li>
223 :     <ul>
224 :     <li>show all key/values, find duplicate values, allow to cut/copy/paste key/value pairs</li>
225 :     <li>find all unused keys</li>
226 :     <li>fix spell check errors</li>
227 :     <li>find duplicates</li>
228 :     </ul>
229 :     </ul>
230 :     </ul><br>
231 :     </td>
232 :     </tr>
233 :     </tbody></table>
234 :     <table border="0" cellpadding="2" cellspacing="5" width="100%"><tbody><tr><td colspan="4" align="left" bgcolor="#0080c0" valign="top" width="100%"><b><font face="Arial,Helvetica"><font color="#ffffff">Legend
235 :     </font></font></b></td>
236 :     </tr>
237 :     <tr>
238 :     <td valign="center"><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/images/progress.gif" nosave="" border="0" height="5" width="14" align="middle"></td>
239 :     <td width="50%">item is under development.</td>
240 :     <td valign="top"><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/images/glass.gif" nosave="" border="0" height="10" width="10"></td>
241 :     <td width="50%">item is under investigation.</td>
242 :     </tr>
243 :     <tr>
244 :     <td valign="center"><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/images/ok.gif" nosave="" border="0" height="10" width="10"></td>
245 :     <td width="50%">item is finished.</td>
246 :     <td valign="top">( )</td>
247 :     <td width="50%">item is time permitted.</td>
248 :     </tr>
249 :     <tr>
250 :     <td valign="center"><font class="indexsub" color="#8080ff">[xyz]</font></td>
251 :     <td width="50%">item is deferred to or continues in xyz.</td>
252 :     <td valign="top"><font class="indexsub"><img src="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/images/new.gif" border="0"></font></td>
253 :     <td width="50%">new</td>
254 :     </tr>
255 :     </tbody>
256 :     </table>
257 :    
258 :     <br>
259 :    
260 :    
261 :     <br></body></html>