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 48263 - Do not bundle multiple .properties file into a DataObject
Summary: Do not bundle multiple .properties file into a DataObject
Alias: None
Product: utilities
Classification: Unclassified
Component: Properties (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Alexey Butenko
Depends on:
Blocks: 25334 26705 31061 32786 42919 47273 54238 65643 87668 117766
  Show dependency tree
Reported: 2004-08-31 17:33 UTC by Marian Petras
Modified: 2009-07-01 17:08 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Exception Reporter:

Patch for the issue (85.20 KB, patch)
2009-01-19 09:23 UTC, Alexey Butenko
Details | Diff
Updated patch (87.00 KB, patch)
2009-01-21 08:41 UTC, Alexey Butenko
Details | Diff
Updated patch, added tests, and apichanges.xml (108.30 KB, patch)
2009-01-28 07:53 UTC, Alexey Butenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2004-08-31 17:33:54 UTC
Do not bundle multiple .properties files into a
DataObject. This causes mostly problems, such as
bug #26705 ("Find tool does not search localized
properties files"), bug #32786 ("Creating new
properties file with locale extension makes more
tabs in editor") and bug #42919 ("Poor UI of
*.properties used for non-I18N purposes").
Comment 1 Jesse Glick 2005-01-19 23:19:26 UTC
This was dropped for D, then ignored for E. Any chance for F?
Comment 2 Marian Petras 2005-02-22 14:35:47 UTC
Yes, there is a chance for F.

I am just collecting opinions on the change.
Comment 3 Marian Petras 2005-02-22 14:40:48 UTC
It seems there is no problem with splitting compound
PropertiesDataObjects to multiple simpler PropertiesDataObjects. Most
people have no objections agains the change of how multiple locales of
a single resource bundle are displayed in the explorer (Projects view).

The table view needs to be retained though. It provides functionality
people find useful.
Comment 4 Marian Petras 2005-02-22 14:47:28 UTC
Several people were concerned about growing number of .properties
nodes in the explorer. But it will hardly be serious problem because
there is usually only one .properties used for localization per Java
package and at most two locales.

I even asked people working in a globalization team and saw a
directory with multiple .properties file, each with several localized
variants, but it was rather a working directory generated by an
automatic test.
Comment 5 Petr Jiricka 2007-07-16 14:45:34 UTC
I am all for doing this even if we have to drop the table view. 

I never heard anyone complain about OS file manager displaying too many files, so I am not sure why people should
complain about this in NetBeans. Just do it.
Comment 6 Tomas Pavek 2008-08-15 14:02:05 UTC
See how non-i18n usage was improved in issue 42919, however the need to eliminate the .properties file grouping is still
Comment 7 Alexey Butenko 2009-01-19 09:23:06 UTC
Created attachment 75967 [details]
Patch for the issue
Comment 8 Alexey Butenko 2009-01-19 09:30:42 UTC
Attached patch:
- In BundleStructure method updateStructure maid protected to have ability to extend
- Added 2 protected methods.
- Added new class MultiBundleStructure extends BundleStructure
- PropertiesDataLoader findPrimaryFile changed:
    Every property file created as separate DataObject
- Added 2 protected methods in Util class
- Significant changes maid in PropertiesOpen class

Thus we have each properties file as separate DataObject and
table view functionality preserved.
Comment 9 Alexey Butenko 2009-01-21 08:41:45 UTC
Created attachment 76070 [details]
Updated patch
Comment 10 Alexey Butenko 2009-01-21 13:35:36 UTC
Removed wrong Keyword, because this change is not trivial.
Comment 11 Alexey Butenko 2009-01-28 07:53:10 UTC
Created attachment 76287 [details]
Updated patch, added tests, and apichanges.xml
Comment 12 Alexey Butenko 2009-01-28 07:54:12 UTC
If there is no objections, I'm going to integrate this patch into trunk in 24 hours
Comment 13 Alexey Butenko 2009-01-30 14:54:55 UTC
pushed in Fri Jan 30 17:44:21 2009 +0300
changeset 7cce58411eaf
Comment 14 Alexey Butenko 2009-02-02 11:24:12 UTC
Comment 15 Michel Graciano 2009-02-04 11:55:08 UTC
v. 200902011401
I hope to see it for patch 3.
Comment 16 Alexey Butenko 2009-02-05 12:14:22 UTC
Reopen the issue, because I've found some copy/paste issues, which should be fixed during M2 stabilization period.
And dependency tree is not resolved yet.
Comment 17 Alexey Butenko 2009-02-05 12:42:45 UTC
I don't think it is good idea to put it into 6.5, because there are a lot of changes were made, which can cause
regressions, so it is too risky for 6.5.
Comment 18 Alexey Butenko 2009-02-09 12:56:05 UTC
Integrated fix for copy/paste and rename issue
changeset e1dddf1ea9a0
Comment 19 Alexey Butenko 2009-02-13 10:11:23 UTC
Comment 20 Michel Graciano 2009-07-01 17:08:15 UTC
v. 200906241340