My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 23940: ADT setting Format XML with Android XML Style can corrupt string resources.
4 people starred this issue and may be notified of changes. Back to list
Status:  Released
Owner:  tnor...@google.com
Closed:  Jan 2012


Sign in to add a comment
 
Reported by miyamo...@gmail.com, Jan 4, 2012
Host OS: Linux
SDK tools version (available in the "About" section of the 'android' tool
UI): Revision 16
Eclipse version: Indigo Service Release 1, Build id: 20110916-0149
ADT plug-in version: Version: 16.0.1.v201112150204-238534 (also saw this on Version 15).
Platform targeted by your project: SDK 10
Version of the platform running in the emulator: N/A

STEPS TO REPRODUCE:
1. Within Eclipse, select Window -> Preferences.
2. Select the preferences for Android -> Editors
3. Enable the checkbox for "Format XML files using the standard Android XML style ..."
4. Enable checkbox for "Format on Save"
5. Edit a resource file, text.xml(attached). Save the file within the Eclipse Editor.

EXPECTED RESULTS:
<string name="test_string">a </string>

OBSERVED RESULTS:
<string name="test_string"> </string>


ADDITIONAL INFORMATION:
Removing the formatting options stated above, seems to prevent the problem from occurring. Basically the first character of the string is chopped off for all strings ending in a newline. Across an entire file this is really annoying/scary. 


text.xml
108 bytes   Download
output.xml
104 bytes   Download
Jan 5, 2012
Project Member #1 vs...@google.com
(No comment was entered for this change.)
Owner: tnor...@google.com
Jan 5, 2012
Project Member #2 tnor...@google.com
I can reproduce it. Will fix right away.
Status: Assigned
Jan 5, 2012
Project Member #3 tnor...@google.com
Fix pending in changeset 6c4b8c1257da2fba53ffeee7c449939b42770b5c.
Jan 5, 2012
Project Member #4 tnor...@google.com
I've uploaded a build of ADT 16 + this fix to 
     http://tools.android.com/download/android-eclipse-23940.zip?attredirects=0&d=1
in case you want to verify the fix. Installation instructions are basically those from http://developer.android.com/sdk/eclipse-adt.html#troubleshooting
Jan 6, 2012
Project Member #5 tnor...@google.com
Fixed in ADT 17. If we do a 16.0.2 I'll backport it.
Status: FutureRelease
Labels: Target-r17
Feb 21, 2012
Project Member #6 tnor...@google.com
 Issue 25792  has been merged into this issue.
Feb 23, 2012
#8 darkpai...@gmail.com
I have the same problem.
I thought that was because of the Greek characters fault.
My strings got chopped off and i had to check all my strings again and repairing this.
Please fix this as soon as posible! 
Feb 24, 2012
Project Member #9 tnor...@google.com
This was fixed in ADT 17, and there's an ADT 17 preview out now which contains this fix.
http://tools.android.com/download/adt-17-preview
Mar 23, 2012
Project Member #10 tnor...@google.com
Fixed in ADT 17, now released.
Status: Released
Sign in to add a comment

Powered by Google Project Hosting