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

Bug 394972

Summary: [PrefDialog] Last selected node is not session based
Product: [RT] RAP Reporter: Volker Althaus <v.althaus>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5   
Target Milestone: 2.0 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Application to reproduce the bug none

Description Volker Althaus CLA 2012-11-23 09:03:23 EST
Created attachment 223913 [details]
Application to reproduce the bug

When one user opens a WorkbenchPreferenceDialog, selects a preference node and closes the dialog, all other users after then get this particular node initial selected and not the one that was selected when they left the dialog the last time.

The reason seems to be that the last selected node is not stored into the user session but into the static variable org.eclipse.jface.preference.PreferenceDialog.lastPreferenceId.


I attached an example application to this post. Simply open the preferences with File->Preferences, select a node and close the dialog.
Any other user from now on would get this node as initial selection.
Comment 1 Ivan Furnadjiev CLA 2012-12-06 08:20:32 EST
I don't see any reason why this filed is static. It is private and there are setter and getter for it which are not static. Fixed with commit aa1864dcadd1df90707165764adeb6c4c1435054.
Comment 2 Ivan Furnadjiev CLA 2012-12-06 09:28:04 EST
Keep lastPreferenceId in the session store instead of static field. Changes pushed with commit 64b9832d2169b60cc4a82d94d65bd184486469fb.