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 - Comments in property files are associated with the wrong value.
Summary: Comments in property files are associated with the wrong value.
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Jan Peska
URL:
Keywords:
: 210654 (view as bug list)
Depends on:
Blocks:
 
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
Exception Reporter:


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