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 148345

Summary: Comments in property files are associated with the wrong value.
Product: utilities Reporter: Jana Maleckova <janie>
Component: PropertiesAssignee: Jan Peska <JPESKA>
Status: NEW ---    
Severity: blocker CC: MackSix
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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