Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319336 - Wrongly name messages.properties file
Summary: Wrongly name messages.properties file
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 7.0.1   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 20:56 EDT by Marc Khouzam CLA
Modified: 2010-07-11 21:23 EDT (History)
2 users (show)

See Also:
marc.khouzam: review? (john.cortell)


Attachments
Fix (2.10 KB, patch)
2010-07-08 20:56 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Fix to avoid Windows problem (2.90 KB, patch)
2010-07-09 15:57 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
mylyn/context/zip (10.22 KB, application/octet-stream)
2010-07-09 15:57 EDT, Marc Khouzam CLA
no flags Details
Fix for 7_0 branch (912 bytes, patch)
2010-07-11 21:13 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2010-07-08 20:56:52 EDT
Created attachment 173830 [details]
Fix

org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.Messages expects its property file to be named Messages.properties instead of messages.properties.

The consequence is a missing string for an error path, which explains why we didn't notice it before.

This was actually found in Bug 302121.
Comment 1 Marc Khouzam CLA 2010-07-08 21:29:40 EDT
John can you confirm this makes sense to you?

Also, renaming a messages.properties to Messages.properties is allowed for the 7_0 branch, right?  If not, then we can fix this in Messages.java

I committed this to HEAD but not to 7_0 until I know if its allowed.
Comment 2 John Cortell CLA 2010-07-08 21:36:38 EDT
Marc, changing the case of a file in CVS is a sticky situation when the repository is used on Windows, due to the case-insensitive nature of the file system. In this case, your commit causes problems for developers updating their sources on Windows.

Problem writing resource '/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/Messages.properties'. A resource already exists on disk 'C:\eclipse_3.6\workspace_cdt\org.eclipse.cdt.dsf.gdb.ui\src\org\eclipse\cdt\dsf\gdb\internal\ui\viewmodel\Messages.properties'.
A resource already exists on disk 'C:\eclipse_3.6\workspace_cdt\org.eclipse.cdt.dsf.gdb.ui\src\org\eclipse\cdt\dsf\gdb\internal\ui\viewmodel\Messages.properties'.

Probably the best thing is to indeed change Messages.java to simply specify the fully qualified message bundle name (with lower case messages.propertes) in its NLS.initializeMessages() call.
Comment 4 Marc Khouzam CLA 2010-07-09 08:47:22 EDT
(In reply to comment #2)
> Marc, changing the case of a file in CVS is a sticky situation when the
> repository is used on Windows, due to the case-insensitive nature of the file
> system. In this case, your commit causes problems for developers updating their
> sources on Windows.
> 
> Problem writing resource
> '/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/Messages.properties'.
> A resource already exists on disk
> 'C:\eclipse_3.6\workspace_cdt\org.eclipse.cdt.dsf.gdb.ui\src\org\eclipse\cdt\dsf\gdb\internal\ui\viewmodel\Messages.properties'.
> A resource already exists on disk
> 'C:\eclipse_3.6\workspace_cdt\org.eclipse.cdt.dsf.gdb.ui\src\org\eclipse\cdt\dsf\gdb\internal\ui\viewmodel\Messages.properties'.
> 
> Probably the best thing is to indeed change Messages.java to simply specify the
> fully qualified message bundle name (with lower case messages.propertes) in its
> NLS.initializeMessages() call.

But I'm sure you've done this before.  Or were you changing the name of the file in more than just the upper/lower case?
Comment 5 Marc Khouzam CLA 2010-07-09 15:57:07 EDT
Created attachment 173907 [details]
Fix to avoid Windows problem

This fix will seem weird, but here is my thought.

The problem happens when people have 'messages.properties' in their workspace and synch to get 'Messages.properties.  So, this patch renames the file in question to 'Message.properties' (note the missing 's').  This will no longer cause a problem on Windows.  It will also allow us to move back to Messages.properties (which really should be the name) in some months after most people have synched with the repo and got rid of the original messages.properties.

Committed to HEAD.

For 7_0 I'll come up with a straightforward solution since it is not as important for the future.
Comment 6 Marc Khouzam CLA 2010-07-09 15:57:09 EDT
Created attachment 173908 [details]
mylyn/context/zip
Comment 8 Marc Khouzam CLA 2010-07-11 21:13:33 EDT
Created attachment 173987 [details]
Fix for 7_0 branch

This simply makes a change in Messages.java to point to the correct properties file.

Committed to 7_0
Comment 9 Marc Khouzam CLA 2010-07-11 21:15:40 EDT
John, is that good with you?
Comment 10 CDT Genie CLA 2010-07-11 21:23:03 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 319336: Point to the right properties file.  We don't want to rename the properties file itself because the renaming would simply be a change in lower-case to upper-case which causes problem when replacing the file on Windows.

[*] Messages.java 1.2.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/Messages.java?root=Tools_Project&r1=1.2&r2=1.2.2.1