| Summary: | [nls tooling] [quick assist] 'Rename in workspace' Quick Fix option for a properties editor key, only renames the java key | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | vciontu | ||||
| Component: | Text | Assignee: | Deepak Azad <deepakazad> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, gdtaylor | ||||
| Version: | 3.8 | ||||||
| Target Milestone: | 3.8 M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
vciontu
Sorry, but I cannot reproduce this. I assume you start the rename in the Properties File editor? Can you attach a test plug-in which allows us to reproduce this? Deepak, please stay tuned to this bug. Created attachment 208389 [details]
java project
Import existing project from the archive;
Open Messages.properties file;
On the first line, at the first character, invoke quick-fix (ctrl + 1) for 'key_one';
Select 'Rename in workspace';
Type in a new name and accept defaults;
The field is renamed in Messages.java but not in Messages.properties.
Also tested in Eclipse SDK, Build id: I20111028-1100.
The rename does not work because the Message.java does not conform to the proper format: it misses the initializer:
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
Due to this the rename fails and this is nothing new. In 3.7 it will also not rename the properties key if the rename is started on the field or on a reference to the field. Also, other NLS tooling like searching for broken externalized strings will fail (return false positives).
Do you really have NLS classes without the initializer? If so, I suggest to fix your code to conform to the proper format supported by the NLS tooling, so that it can correctly perform it's job.
|