From 3fb136245db064efd70ffc91ad9be6bf94d607a6 Mon Sep 17 00:00:00 2001 From: Michael Valenta Date: Tue, 14 Oct 2003 18:01:20 +0000 Subject: 44614: [CVS] Unable to commit, NPE, broken UI --- .../internal/ccvs/core/resources/EclipseSynchronizer.java | 11 +++++++++++ .../eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java index 4c5e9cd87..36840732d 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java @@ -1540,5 +1540,16 @@ public class EclipseSynchronizer implements IFlushOperation { if (rule != null) endBatching(rule, null); } } + + /** + * React to a file that was just moved by the move/delete hook. + * @param file the file that was moved (at its new location) + */ + public void fileMoved(IFile file) throws CVSException { + if (!isWithinActiveOperationScope(file)) { + sessionPropertyCache.purgeCache(file.getParent(), false /*don't flush children*/); + } + + } } diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java index fc697ae70..3d103b2f9 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/MoveDeleteHook.java @@ -167,6 +167,7 @@ public class MoveDeleteHook implements IMoveDeleteHook { EclipseSynchronizer.getInstance().prepareForMoveDelete(destination, Policy.subMonitorFor(monitor, 20)); } tree.standardMoveFile(source, destination, updateFlags, Policy.subMonitorFor(monitor, 30)); + EclipseSynchronizer.getInstance().fileMoved(destination); } } finally { monitor.done(); @@ -265,7 +266,7 @@ public class MoveDeleteHook implements IMoveDeleteHook { * @param file * @return boolean */ - private boolean checkOutFiles(IResourceTree tree, IFile[] files, IProgressMonitor monitor) { + /* private */ boolean checkOutFiles(IResourceTree tree, IFile[] files, IProgressMonitor monitor) { // Ensure that the file is "checked out" (i.e. not read-only IFileModificationValidator validator = getFileModificationValidator(files); if (validator instanceof ICVSFileModificationValidator) { -- cgit v1.2.3