### 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.434 diff -u -r1.434 JavaModelManager.java --- model/org/eclipse/jdt/internal/core/JavaModelManager.java 7 May 2009 16:08:11 -0000 1.434 +++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 7 May 2009 16:18:26 -0000 @@ -3960,26 +3960,29 @@ if (VERBOSE) traceVariableAndContainers("Saved", start); //$NON-NLS-1$ - if (context.getKind() == ISaveContext.FULL_SAVE) { - // save non-chaining jar cache on snapshot/full save - saveNonChainingJarsCache(); - - // will need delta since this save (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38658) - context.needDelta(); - - // clean up indexes on workspace full save - // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=52347) - IndexManager manager = this.indexManager; - if (manager != null - // don't force initialization of workspace scope as we could be shutting down - // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=93941) - && this.workspaceScope != null) { - manager.cleanUpIndexes(); - } - } - // clean up external folders on full save or snapshot - if (context.getKind() == ISaveContext.FULL_SAVE || context.getKind() == ISaveContext.SNAPSHOT) { - this.externalFoldersManager.cleanUp(null); + switch(context.getKind()) { + case ISaveContext.FULL_SAVE : { + // save non-chaining jar cache on snapshot/full save + saveNonChainingJarsCache(); + + // will need delta since this save (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38658) + context.needDelta(); + + // clean up indexes on workspace full save + // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=52347) + IndexManager manager = this.indexManager; + if (manager != null + // don't force initialization of workspace scope as we could be shutting down + // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=93941) + && this.workspaceScope != null) { + manager.cleanUpIndexes(); + } + } + //$FALL-THROUGH$ + case ISaveContext.SNAPSHOT : { + // clean up external folders on full save or snapshot + this.externalFoldersManager.cleanUp(null); + } } IProject savedProject = context.getProject();