Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313143

Summary: Preferred Launch Delegate not recovered from preferences
Product: [Eclipse Project] Platform Reporter: Marc Khouzam <marc.khouzam>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, Michael_Rennie
Version: 3.6Flags: darin.eclipse: review+
Michael_Rennie: review+
Target Milestone: 3.6 RC2   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed fix darin.eclipse: iplog+

Description Marc Khouzam CLA 2010-05-17 10:37:36 EDT
Created attachment 168738 [details]
Proposed fix

When I set the preferred launch delegate as part of my preferences (Run/Debug->Default Launchers), the preference is not restored when I restart my workbench.

I believe the problem was introduced with bug 288299 which started using the 'new' preference code.  The problem is that special handling seems to be necessary with the new preferences code, when dealing with properties that contain a '/'.

From the javadoc of Platform.getPreferencesService().getString() we can read:

"If the key contains a slash ("/") character, then a double-slash must be used to denote the end of they child path and the beginning of the key."

This patch should fix the problem.

Please not that I did _not_ check if any other preference affected by bug 288299 uses a '/' and therefore would have the same problem.
Comment 1 Darin Wright CLA 2010-05-17 10:41:30 EDT
Dup of bug 300946, but since this one has a patch, I'll dup the older against the newer.
Comment 2 Darin Wright CLA 2010-05-17 10:41:52 EDT
*** Bug 300946 has been marked as a duplicate of this bug. ***
Comment 3 Darin Wright CLA 2010-05-18 10:24:59 EDT
+1
Comment 4 Michael Rennie CLA 2010-05-18 12:05:05 EDT
+1, applied patch to HEAD
Comment 5 Michael Rennie CLA 2010-05-18 12:05:20 EDT
.