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 19921 - Properties files saved by the properties editor should be sorted and saved without extraneous line breaks.
Summary: Properties files saved by the properties editor should be sorted and saved wi...
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Jan Peska
Depends on:
Reported: 2002-01-30 00:56 UTC by Leo Yamamoto
Modified: 2011-09-01 16:00 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Leo Yamamoto 2002-01-30 00:56:13 UTC
Currently, if you edit a .properties file, add a few keys, then save the file, the new keys are saved at the end of the file in the order you entered them, with one line break in between each new property. I'd like to propose an enhancement where the .properties file would be saved with every key in order, and without line breaks.
Comment 1 Marek Grummich 2002-07-22 11:24:42 UTC
Set target milestone to TBD
Comment 2 _ proxity 2003-10-29 15:19:02 UTC
First I also thought that this would be a good idea.
But there are also reasons why this shouldn't be done:

1. If you want to have something like sections, e.g. grouping some
keys together you'll be forced to always use a common prefix.

2. Even worse, your sections will be ordered in alphabetically order,
but one might prefer a logical order.

3. When using properties files for i18n, it's very nice that new
strings are added at the bottom and not scattered over the file, so
the various translators only have to consider the bottom of the file
to do their work.

Since you can already click on the column headers for sorting the
files in the view I suggest to add an explicit sort option, but
nothing that is automatically done on an insert key or save operation.

Comment 3 Marian Petras 2005-05-03 14:57:48 UTC
I agree with Boris that auto-sorting should be turned off by default. But I
agree that I would be a nice enhancement. However, we do not plan to implement
it in the next release.