This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194342 - I18N support uses wrong offsets to modify the source
Summary: I18N support uses wrong offsets to modify the source
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: David Strupl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 10:11 UTC by _ rkubacki
Modified: 2011-01-31 11:00 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2011-01-14 10:11:11 UTC
Product Version: NetBeans IDE Dev (Build 201101040001)
Java: 1.6.0_22; Java HotSpot(TM) Server VM 17.1-b03
System: Linux version 2.6.35-24-generic running on i386; UTF-8; en_US (nb)

Open Java source that contains various hard-coded strings.
Tools | i18n | Internationalize ...

Let's say that I replace 1st string with an expression that will find the value in bundle and the dialog offers me another string. Now choose ignore and the comment is added to a wrong place. This new place is often in a middle of some code and thus breaking the source. This makes the tool unusable.

It looks to me that the support try to compensate for chars added during 'replace' twice (the offset can be adjusted automatically during edit and i18n support can do second shift).
Comment 1 David Strupl 2011-01-31 11:00:08 UTC
http://hg.netbeans.org/jet-main/rev/3daa9f25f307