This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 422033 - New Message extension - properties are not loaded when filename is lower case under Linux
Summary: New Message extension - properties are not loaded when filename is lower case...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 4.4 M4   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-19 04:15 EST by Dirk Fauth CLA
Modified: 2013-12-11 13:19 EST (History)
3 users (show)

See Also:


Attachments
find lower case named properties files under Linux (2.22 KB, patch)
2013-11-19 04:15 EST, Dirk Fauth CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Fauth CLA 2013-11-19 04:15:39 EST
Created attachment 237545 [details]
find lower case named properties files under Linux

After some discussion with Markus Kuppe we recognized a little issue with loading properties files that are located in the same package as the Messages class with the new message extension under Linux.

With the new message extension you are able to create a Messages class that is connected to a Messages.properties file in the same package. By default the properties files are searched and loaded using the fully qualified class name, case sensitive.

Now Markus mentioned correctly that using the existing Eclipse externalization mechanism, the properties file is names in lowercase, e.g. messages.properties (IMHO properties files should be named in lower case, looks more familiar).

I tested this on Windows, and there lower case named properties files are also loaded. For Markus it didn't work on Linux. I assume this is because Linux is case sensitive in the file system.

I created a patch and Markus tested it successfully.

The attached patch is first searching for the relative positioned properties file named in exact the same way the according class file is named (case sensitive). If it isn't found, it is searched for the base name in lower case.

I also removed the try-catch at that place because the MissingResourceException is already handled in ResourceBundleHelper.getEquinoxResourceBundle()
Comment 1 Paul Webster CLA 2013-11-27 10:25:00 EST
Dirk, is this something you need us to put in for M4?

I'll also mention you should use Gerrit for your patches for eclipse.platform.runtime and eclipse.platform.ui.

PW
Comment 2 Dirk Fauth CLA 2013-11-27 10:36:11 EST
Hi Paul,

since the last days I thought that I would need to contribute via Gerrit. I will search on how to do that.

Yes I would like to have this fix and the fix for the camel case member variable support to be added into M4 if they are verified.

I'll check asap.

Greez,
Dirk
Comment 3 Paul Webster CLA 2013-11-29 11:30:09 EST
Gerrit review: https://git.eclipse.org/r/#/c/19037/

PW
Comment 5 Paul Webster CLA 2013-12-11 13:19:29 EST
In 4.4.0.I20131209-2000

PW