Bug 148345 - Comments in property files are associated with the wrong value.
Comments in property files are associated with the wrong value.
Status: NEW
Product: utilities
Classification: Unclassified
Component: Properties
6.x
All All
: P3 with 1 vote (vote)
: 6.x
Assigned To: Jan Peska
issues@utilities
:
: 210654 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-25 12:57 UTC by Jana Maleckova
Modified: 2012-04-04 12:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jana Maleckova 2008-09-25 12:57:48 UTC
Product Version: NetBeans IDE Dev (Build 20080924002214)
Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

Description:
============
this happens when appropriate testcase is done
1. create new JFrame
2. switch on automatic i18n for this container
3. insert e.g. jLabel
4. select it, press ctrl+c and then ctrl+v
5. do it once again
check properties file and there you can see something like this:

# To change this template, choose Tools | Templates
# and open the template in the editor.

NewJFrame.jLabel1.text=jLabel1
# To change this template, choose Tools | Templates
# and open the template in the editor.
NewJFrame.jLabel2.text=jLabel1
# To change this template, choose Tools | Templates
# and open the template in the editor.
NewJFrame.jLabel5.text=jLabel1
# To change this template, choose Tools | Templates
# and open the template in the editor.
Comment 1 Ralph Ruijs 2012-04-04 12:47:10 UTC
*** Bug 210654 has been marked as a duplicate of this bug. ***
Comment 2 Ralph Ruijs 2012-04-04 12:53:24 UTC
Comments in properties files are not associated with the right "element" in the file. Looking at the example below, an entry gets all the comments defined above it. Properties files should handle comments more carefully and not assign the initial comment to the first entry, but to the file. (if separated with an empty line)



# To change this template, choose Tools | Templates
# and open the template in the editor.

#First item
NewJFrame.jLabel8.text=jLabel8
#End of first item

#Second item
NewJFrame.jLabel10.text=jLabel10
#End of second item


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo