### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v retrieving revision 1.467 diff -u -r1.467 JavaModelManager.java --- model/org/eclipse/jdt/internal/core/JavaModelManager.java 10 May 2011 19:29:43 -0000 1.467 +++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 16 May 2011 22:50:00 -0000 @@ -5054,9 +5054,9 @@ } return result; } - + static int count = 0; public synchronized void variablePut(String variableName, IPath variablePath){ - + System.out.println("variablePut ("+variableName+","+variablePath+") #"+(++count)); // set/unset the initialization in progress HashSet initializations = variableInitializationInProgress(); if (variablePath == VARIABLE_INITIALIZATION_IN_PROGRESS) { @@ -5076,7 +5076,10 @@ this.variablesWithInitializer.remove(variableName); this.deprecatedVariables.remove(variableName); } else { - this.variables.put(variableName, variablePath); + if (count != 1) + this.variables.put(variableName, variablePath); + else + System.out.println("DISCARD this.variables.put("+variableName+", "+variablePath+")"); } // discard obsoleted information about previous session this.previousSessionVariables.remove(variableName); Index: model/org/eclipse/jdt/internal/core/SetVariablesOperation.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetVariablesOperation.java,v retrieving revision 1.11 diff -u -r1.11 SetVariablesOperation.java --- model/org/eclipse/jdt/internal/core/SetVariablesOperation.java 11 May 2010 18:47:09 -0000 1.11 +++ model/org/eclipse/jdt/internal/core/SetVariablesOperation.java 16 May 2011 22:50:00 -0000 @@ -38,7 +38,7 @@ this.variablePaths = variablePaths; this.updatePreferences = updatePreferences; } - + static int count = 0; protected void executeOperation() throws JavaModelException { checkCanceled(); try { @@ -122,8 +122,15 @@ // update variables for (int i = 0; i < varLength; i++){ manager.variablePut(this.variableNames[i], this.variablePaths[i]); - if (this.updatePreferences) - manager.variablePreferencesPut(this.variableNames[i], this.variablePaths[i]); + if (count != 0) { + if (this.updatePreferences) { + System.out.println("manager.variablePreferencesPut("+this.variableNames[i]+","+this.variablePaths[i]+")"); + manager.variablePreferencesPut(this.variableNames[i], this.variablePaths[i]); + } + } else { + System.out.println("DISCARD manager.variablePreferencesPut("+this.variableNames[i]+","+this.variablePaths[i]+")"); + } + count++; } // update affected project classpaths