Bug 98720

Summary: [preferences] classpath variables are not exported if the session is closed and restored
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2005-06-07 12:19:32 EDT
Following bug 97272, the classpath variables are not exported if the workspace
is closed and reopened.

Steps to reproduce:
1) Start a fresh workspace
2) Create a new classpath variable
3) Export all preferences.
4) Check that the new classpath variable is exported
5) Close the workspace
6) Open it again
7) Export again all preferences
8) The classpath variables are not exported anymore
Comment 1 Jerome Lanneluc CLA 2005-06-08 07:49:04 EDT
The fix would be to not remove the variable from the preferences in
JavaModelManager#loadVariableAndContainers() (ligne 1787)
Comment 2 Philipe Mulet CLA 2005-06-08 10:46:46 EDT
+1 for RC2
Comment 3 Jerome Lanneluc CLA 2005-06-08 10:50:17 EDT
Changed JavaModelManager#loadVariablesAndContainers() to remove the variable
from the preferences only in the case of CP_ENTRY_IGNORE.
Also changed JavaModelManager#variablePut(...) to remove the variable from the
preferences if the path is null.
Added regression tests OptionTest#test10() and test11().
Comment 4 Olivier Thomann CLA 2005-06-09 09:27:31 EDT
Verified in N20050609-0010 + JDT/Core HEAD
Comment 5 Frederic Fusier CLA 2005-06-10 09:43:17 EDT
Verified for 3.1 RC2 using build I20050610-0010