Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-10-26 15:41:15 +0000
committerMichael Valenta2007-10-26 15:41:15 +0000
commit641d9a4b614fb8e357af8dac79c5e179a89022cd (patch)
treed1ee99d72abb0cfa88ad4dff2301070ed3b799bf /bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs
parent77b621c93f350b03ffcb080f9fcacc2dc4f63337 (diff)
downloadeclipse.platform.team-641d9a4b614fb8e357af8dac79c5e179a89022cd.tar.gz
eclipse.platform.team-641d9a4b614fb8e357af8dac79c5e179a89022cd.tar.xz
eclipse.platform.team-641d9a4b614fb8e357af8dac79c5e179a89022cd.zip
Bug 199988 Folder containing outgoing change not label decorated
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java22
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java5
2 files changed, 25 insertions, 2 deletions
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 2659291e6..d68ac044b 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
@@ -723,10 +723,10 @@ public class EclipseSynchronizer implements IFlushOperation {
* In all cases (except when the resource doesn't exist), this method
* will indicate that the dirty state of the parent needs to be recomputed.
* For managed resources, it will move the cached sync info from the session
- * property cache into the sycnrhonizer cache, purging the session cache.
+ * property cache into the synchronizer cache, purging the session cache.
* @param resource the resource about to be deleted.
* <p>
- * Note taht this method is not recursive. Hence, for managed resources
+ * Note that this method is not recursive. Hence, for managed resources
*
* @returns whether children need to be prepared
* @throws CVSException
@@ -801,6 +801,24 @@ public class EclipseSynchronizer implements IFlushOperation {
}
/**
+ * The resource has been added. Make sure any cached state is cleared.
+ * This is needed because the add hook is not invoked in all situations
+ * (e.g. external addition).
+ *
+ * @param resource
+ * @throws CVSException
+ */
+ protected void handleAdded(IResource resource) throws CVSException {
+ if (!resource.exists()) return;
+ try {
+ beginOperation();
+ adjustDirtyStateRecursively(resource, RECOMPUTE_INDICATOR);
+ } finally {
+ endOperation();
+ }
+ }
+
+ /**
* Prepare for the deletion of the target resource from within
* the move/delete hook. The method is invoked by both the
* deleteFile/Folder methods and for the source resource
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
index 86af9ac51..9b9692970 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java
@@ -72,6 +72,11 @@ public class FileModificationManager implements IResourceChangeListener {
resourceChanged(resource, false);
}
} else if (delta.getKind() == IResourceDelta.ADDED) {
+ try {
+ EclipseSynchronizer.getInstance().handleAdded(resource);
+ } catch (CVSException e) {
+ CVSProviderPlugin.log(e);
+ }
resourceChanged(resource, true);
} else if (delta.getKind() == IResourceDelta.REMOVED) {
try {

Back to the top