Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-12-08 21:33:23 -0500
committerMichael Valenta2002-12-08 21:33:23 -0500
commit39f4ad2640089342a44150b4c6bd8c70c07cb7a2 (patch)
tree11102f054bdf4ebe111a5d8d7be767af165c2dff
parent575ed31a2ca55c86732051021a568e203c53f925 (diff)
downloadeclipse.platform.team-39f4ad2640089342a44150b4c6bd8c70c07cb7a2.tar.gz
eclipse.platform.team-39f4ad2640089342a44150b4c6bd8c70c07cb7a2.tar.xz
eclipse.platform.team-39f4ad2640089342a44150b4c6bd8c70c07cb7a2.zip
All test working so far but the adjustment of parent count is simply a flush
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java25
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java90
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java64
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java19
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java35
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java17
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java3
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java2
8 files changed, 156 insertions, 99 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
index cd1c7d32a..f01349200 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
@@ -463,7 +463,7 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
}
}
- public void syncInfoChanged(ResourceSyncInfo info) throws CVSException {
+ public void syncInfoChanged() throws CVSException {
if (isIgnored()) {
// check to see if the file was previously marked as dirty
String indicator = EclipseSynchronizer.getInstance().getDirtyIndicator(getIResource());
@@ -471,12 +471,10 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
((EclipseFolder)getParent()).adjustModifiedCount(false);
}
// make sure the file is no longer marked
- if (indicator != null) {
- EclipseSynchronizer.getInstance().setDirtyIndicator(getIResource(), null);
- }
+ flushModificationCache();
return;
}
- setModified(isModified(info));
+ setModified(isModified(getSyncInfo()));
}
/**
@@ -532,7 +530,7 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
} catch (CVSException e) {
// flush any cached info for the file and it's parent's so they are recalculated.
try {
- flushAncestors();
+ flushWithAncestors();
} catch (CVSException ex) {
// This is bad because now we have no clue as to whether the properties are up to date
// XXX Need a multi-status with original exception as well.
@@ -549,21 +547,6 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
EclipseSynchronizer.getInstance().flushModificationCache(getIFile());
}
-
- /*
- * @see org.eclipse.team.internal.ccvs.core.resources.EclipseResource#prepareToBeDeleted()
- */
- protected void prepareToBeDeleted() throws CVSException {
- // Decrement the parent count for both managed and unmanaged files.
- // For managed files, the sync info change following the delete will increment the count again
- if (!isIgnored()) {
- String indicator = EclipseSynchronizer.getInstance().getDirtyIndicator(getIFile());
- if (indicator == EclipseSynchronizer.IS_DIRTY_INDICATOR) {
- // If the file is mark as dirty, decrement the parent's dirty count
- ((EclipseFolder)getParent()).adjustModifiedCount(false);
- }
- }
- }
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
index 0bc7b1999..6ae0fdc70 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFolder.java
@@ -11,7 +11,9 @@
package org.eclipse.team.internal.ccvs.core.resources;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -114,12 +116,22 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
project.open(null);
} else {
((IFolder)resource).create(false /*don't force*/, true /*make local*/, null);
- EclipseSynchronizer.getInstance().folderCreated((IFolder)resource);
+ folderCreated();
}
} catch (CoreException e) {
throw CVSException.wrapException(resource, Policy.bind("EclipseFolder_problem_creating", resource.getFullPath().toString(), e.getStatus().getMessage()), e); //$NON-NLS-1$
}
}
+ /**
+ * Method folderCreated.
+ */
+ protected void folderCreated() throws CVSException {
+ Integer count = EclipseSynchronizer.getInstance().getDirtyCount((IContainer)getIResource());
+ if (count != null) {
+ flushWithAncestors();
+ }
+ EclipseSynchronizer.getInstance().folderCreated((IFolder)getIResource());
+ }
/**
* @see ICVSResource#isFolder()
@@ -209,7 +221,7 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
Integer count = synchronizer.getDirtyCount((IContainer)getIResource());
if (count == null) {
// There was no cached count. Flush the ancestors so they are recalculated
- flushAncestors();
+ flushWithAncestors();
} else {
// There is a count. Decrement the parent's count if the count is zero.
// Otherwise, the receiver and it's parents remain dirty.
@@ -242,7 +254,7 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
}, Policy.subMonitorFor(monitor, 99));
// unmanaged from parent
super.unmanage(Policy.subMonitorFor(monitor, 1));
- flushAncestors();
+ flushWithAncestors();
} finally {
monitor.done();
}
@@ -365,9 +377,10 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
* @param b
*/
protected void adjustModifiedCount(boolean modified) throws CVSException {
- if (EclipseSynchronizer.getInstance().adjustModifiedCount((IContainer)getIResource(), modified)) {
- ((EclipseFolder)getParent()).adjustModifiedCount(modified);
- }
+ flushWithAncestors();
+// if (EclipseSynchronizer.getInstance().adjustModifiedCount((IContainer)getIResource(), modified)) {
+// ((EclipseFolder)getParent()).adjustModifiedCount(modified);
+// }
}
/*
@@ -383,6 +396,8 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
*/
protected void handleDeletion(IFile file, boolean modified) throws CVSException {
boolean adjustParent;
+ Integer dirtyCount = EclipseSynchronizer.getInstance().getDirtyCount((IContainer)getIResource());
+ if (dirtyCount == null) return;
if (modified) {
adjustParent = EclipseSynchronizer.getInstance().addDeletedChild((IContainer)getIResource(), file);
} else {
@@ -395,14 +410,16 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
public boolean isModified() throws CVSException {
// If it's not a CVS folder, assume it's modified unless it is ignored
+ // if (isIgnored()) return false;
IContainer container = (IContainer)getIResource();
+ boolean shared = isCVSFolder();
Integer count = EclipseSynchronizer.getInstance().getDirtyCount(container);
if (count == null) {
String indicator = EclipseSynchronizer.getInstance().getDirtyIndicator(container);
if (indicator == null) {
// We have no cached info for the folder. We'll need to check directly,
// caching as go.
- determineDirtyCount(indicator);
+ indicator = determineDirtyCount(indicator, shared);
} else {
// the count has not been initialized yet
if (indicator == EclipseSynchronizer.NOT_DIRTY_INDICATOR) {
@@ -410,26 +427,25 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
EclipseSynchronizer.getInstance().setDirtyCount(container, 0);
} else {
// The folder is dirty
- determineDirtyCount(indicator);
+ indicator = determineDirtyCount(indicator, shared);
}
- return indicator == EclipseSynchronizer.IS_DIRTY_INDICATOR;
}
+ return indicator == EclipseSynchronizer.IS_DIRTY_INDICATOR;
} else {
- return count.intValue() > 0;
+ return isModified(count.intValue(), shared);
}
- return false;
}
public boolean handleModification(boolean forAddition) throws CVSException {
if (isIgnored()) return false;
- // For non-additions, we are only interested in syn cinfo changes
+ // For non-additions, we are only interested in sync info changes
if (!forAddition) return false;
// the folder is an addition.
FolderSyncInfo info = getFolderSyncInfo();
// if the folder has sync info, it was handled is setFolderInfo
// otherwise, flush the ancestors to recalculate
if (info == null) {
- flushAncestors();
+ flushWithAncestors();
}
return true;
@@ -438,20 +454,36 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
/**
* Method determineDirtyCount.
*/
- private void determineDirtyCount(String indicator) throws CVSException {
+ private String determineDirtyCount(String indicator, boolean shared) throws CVSException {
IContainer container = (IContainer)getIResource();
ICVSResource[] children = members(ALL_UNIGNORED_MEMBERS);
int count = 0;
+ Set deletedChildren = new HashSet();
for (int i = 0; i < children.length; i++) {
ICVSResource resource = children[i];
- if (resource.isModified()) count++;
+ if (resource.isModified()) {
+ count++;
+ if (!resource.isFolder() && !resource.exists()) {
+ deletedChildren.add(resource.getName());
+ }
+ }
}
- if (count == 0 && indicator != EclipseSynchronizer.NOT_DIRTY_INDICATOR) {
- EclipseSynchronizer.getInstance().setDirtyIndicator(container, EclipseSynchronizer.NOT_DIRTY_INDICATOR);
- } else if (count > 0 && indicator != EclipseSynchronizer.IS_DIRTY_INDICATOR) {
- EclipseSynchronizer.getInstance().setDirtyIndicator(container, EclipseSynchronizer.IS_DIRTY_INDICATOR);
+ if (!isModified(count, shared) && indicator != EclipseSynchronizer.NOT_DIRTY_INDICATOR) {
+ indicator = EclipseSynchronizer.NOT_DIRTY_INDICATOR;
+ EclipseSynchronizer.getInstance().setDirtyIndicator(container, indicator);
+ } else if ((isModified(count, shared)) && indicator != EclipseSynchronizer.IS_DIRTY_INDICATOR) {
+ indicator = EclipseSynchronizer.IS_DIRTY_INDICATOR;
+ EclipseSynchronizer.getInstance().setDirtyIndicator(container, indicator);
+ if (!deletedChildren.isEmpty()) {
+ EclipseSynchronizer.getInstance().setDeletedChildren((IContainer)getIResource(), deletedChildren);
+ }
}
EclipseSynchronizer.getInstance().setDirtyCount(container, count);
+ return indicator;
+ }
+
+ private boolean isModified(int count, boolean shared) {
+ return count > 0 || !shared;
}
/*
@@ -460,13 +492,19 @@ class EclipseFolder extends EclipseResource implements ICVSFolder {
protected void prepareToBeDeleted() throws CVSException {
if (isCVSFolder()) {
EclipseSynchronizer.getInstance().prepareForDeletion((IContainer)getIResource());
- } else if (!isIgnored()) {
- Integer count = EclipseSynchronizer.getInstance().getDirtyCount((IContainer)getIResource());
- if (count != null) {
- // If there is a count then the folder would have been added to the parent's dirty count.
- // We need to decrement the parent's count/
- ((EclipseFolder)getParent()).adjustModifiedCount(false);
- }
+ }
+ super.prepareToBeDeleted();
+ }
+
+ public void syncInfoChanged() throws CVSException {
+ // It hard to deterime the effect of sync info for forlders so just flush the parent info
+ String indicator = EclipseSynchronizer.getInstance().getDirtyIndicator(getIResource());
+ if (indicator != EclipseSynchronizer.IS_DIRTY_INDICATOR) {
+ flushWithAncestors();
+ }
+ if (isIgnored()) {
+ // make sure the folder (or any of it's childen are no longer marked
+ EclipseSynchronizer.getInstance().flushModificationCache((IContainer)getIResource(), IResource.DEPTH_INFINITE);
}
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java
index 3cb655e20..515c45f82 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipsePhantomSynchronizer.java
@@ -225,11 +225,6 @@ public class EclipsePhantomSynchronizer extends EclipseSynchronizer {
// set the dirty count using what was cached in the phantom it
beginOperation(null);
FolderSyncInfo folderInfo = getPhantomFolderSyncInfo(folder);
- int count = internalGetDirtyCount(folder);
- if (count != -1) {
- setDirtyCount(folder, count);
- setModified(folder, count > 0 || folderInfo == null);
- }
if (folderInfo != null) {
beginOperation(null);
Map map = getPhantomResourceSyncInfoMap(folder);
@@ -597,20 +592,21 @@ public class EclipsePhantomSynchronizer extends EclipseSynchronizer {
*/
protected boolean addDeletedChild(IContainer container, IFile file) throws CVSException {
if (container.isPhantom()) {
- try {
- beginOperation(null);
- int oldCount = internalGetDirtyCount(container);
- if (oldCount == -1) {
- // there is no cached count so wait until the first query
- // or there was no deleted file
- return false;
- }
- int newCount = calculateDirtyCountForPhantom(container);
- // adjust the parent folder count if the newCount is 1;
- return oldCount == 0 && newCount == 1;
- } finally {
- endOperation(null);
- }
+// try {
+// beginOperation(null);
+// int oldCount = internalGetDirtyCount(container);
+// if (oldCount == -1) {
+// // there is no cached count so wait until the first query
+// // or there was no deleted file
+// return false;
+// }
+// int newCount = calculateDirtyCountForPhantom(container);
+// // adjust the parent folder count if the newCount is 1;
+// return oldCount == 0 && newCount == 1;
+// } finally {
+// endOperation(null);
+// }
+ return true;
} else {
return super.addDeletedChild(container, file);
}
@@ -621,23 +617,23 @@ public class EclipsePhantomSynchronizer extends EclipseSynchronizer {
*/
protected boolean removeDeletedChild(IContainer container, IFile file) throws CVSException {
if (container.isPhantom()) {
- try {
- beginOperation(null);
- int oldCount = internalGetDirtyCount(container);
- if (oldCount == -1 || oldCount == 0) {
- // there is no cached count so wait until the first query
- // or there was no deleted file
- return false;
- }
- int newCount = calculateDirtyCountForPhantom(container);
- // adjust the parent folder count if the newCount is 0;
- return newCount == 0;
- } finally {
- endOperation(null);
- }
+// try {
+// beginOperation(null);
+// int oldCount = internalGetDirtyCount(container);
+// if (oldCount == -1 || oldCount == 0) {
+// // there is no cached count so wait until the first query
+// // or there was no deleted file
+// return false;
+// }
+// int newCount = calculateDirtyCountForPhantom(container);
+// // adjust the parent folder count if the newCount is 0;
+// return newCount == 0;
+// } finally {
+// endOperation(null);
+// }
+ return true;
} else {
return super.removeDeletedChild(container, file);
}
}
-
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
index aaf4652a3..84e58f931 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
@@ -277,12 +277,12 @@ abstract class EclipseResource implements ICVSResource, Comparable {
/*
* Flush all cached info for the file and it's ancestors
*/
- protected void flushAncestors() throws CVSException {
+ protected void flushWithAncestors() throws CVSException {
if (resource.getType() == IResource.ROOT) return;
try {
flushModificationCache();
} finally {
- ((EclipseResource)getParent()).flushAncestors();
+ ((EclipseResource)getParent()).flushWithAncestors();
}
}
@@ -298,5 +298,18 @@ abstract class EclipseResource implements ICVSResource, Comparable {
* Method prepareToBeDeleted is invoked by the move/delete hook to allow the
* resource to prepare to be deleted.
*/
- protected abstract void prepareToBeDeleted() throws CVSException;
+ protected void prepareToBeDeleted() throws CVSException {
+ // Flush the dirty info for the resource and it's ancestors.
+ // Although we could be smarter, we need to do this because the
+ // deletion may fail.
+ String indicator = EclipseSynchronizer.getInstance().getDirtyIndicator(getIResource());
+ if (indicator != null) {
+ flushWithAncestors();
+ }
+ }
+
+ /*
+ * Method syncInfoChanged is invoked by the sync file change listener.
+ */
+ protected abstract void syncInfoChanged() throws CVSException;
} \ No newline at end of file
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 66e837d41..e95f73bcd 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
@@ -1317,8 +1317,13 @@ public class EclipseSynchronizer {
}
}
- private void setDeletedChildren(IContainer parent, Set deletedFiles) throws CoreException {
- parent.setSessionProperty(DELETED_CHILDREN, deletedFiles);
+ protected void setDeletedChildren(IContainer parent, Set deletedFiles) throws CVSException {
+ if (!parent.exists()) return;
+ try {
+ parent.setSessionProperty(DELETED_CHILDREN, deletedFiles);
+ } catch (CoreException e) {
+ throw CVSException.wrapException(e);
+ }
}
private Set getDeletedChildren(IContainer parent) throws CoreException {
@@ -1343,6 +1348,32 @@ public class EclipseSynchronizer {
}
}
+ protected void flushModificationCache(IContainer container, int depth) throws CVSException {
+ if (container.getType() == IResource.ROOT) return;
+ final CVSException[] exception = new CVSException[] { null };
+ try {
+ container.accept(new IResourceVisitor() {
+ public boolean visit(IResource resource) throws CoreException {
+ try {
+ if (resource.getType() == IResource.FILE) {
+ flushModificationCache((IFile)resource);
+ } else {
+ flushModificationCache((IContainer)resource);
+ }
+ } catch (CVSException e) {
+ exception[0] = e;
+ }
+ return true;
+ }
+ }, depth, true);
+ } catch (CoreException e) {
+ throw CVSException.wrapException(e);
+ }
+ if (exception[0] != null) {
+ throw exception[0];
+ }
+ }
+
/*
* Flush all cached info for
* the file and it's ancestors
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 0ba21f06e..10ddb9e87 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
@@ -10,12 +10,11 @@
******************************************************************************/
package org.eclipse.team.internal.ccvs.core.resources;
-import java.util.ArrayList;
import java.util.HashSet;
-import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceChangeEvent;
@@ -35,7 +34,6 @@ import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
import org.eclipse.team.internal.ccvs.core.ICVSResource;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
/**
* This class performs several functions related to determining the modified
@@ -140,14 +138,8 @@ public class FileModificationManager implements IResourceChangeListener, ISavePa
* @param resources
*/
public void syncInfoChanged(IResource[] resources) throws CVSException {
- List files = new ArrayList();
for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (resource.getType() == IResource.FILE) {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
- ResourceSyncInfo info = file.getSyncInfo();
- ((EclipseFile)file).syncInfoChanged(info);
- }
+ ((EclipseResource)CVSWorkspaceRoot.getCVSResourceFor(resources[i])).syncInfoChanged();
}
}
@@ -175,6 +167,11 @@ public class FileModificationManager implements IResourceChangeListener, ISavePa
}
}
+ public void folderCreated(IFolder folder) throws CVSException {
+ EclipseFolder cvsFolder = (EclipseFolder)CVSWorkspaceRoot.getCVSFolderFor(folder);
+ cvsFolder.folderCreated();
+ }
+
/*
* Handle an added resource.
*/
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java
index cbf0864c2..7a22cafdf 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java
@@ -35,7 +35,6 @@ import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
-import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
@@ -174,7 +173,7 @@ public class AddDeleteMoveListener implements IResourceDeltaVisitor, IResourceCh
private void handleAddedFolder(IFolder resource) {
try {
- EclipseSynchronizer.getInstance().folderCreated(resource);
+ CVSProviderPlugin.getPlugin().getFileModificationManager().folderCreated(resource);
ICVSFolder mFolder = CVSWorkspaceRoot.getCVSFolderFor(resource);
if (mFolder.isManaged()) {
ResourceSyncInfo info = mFolder.getSyncInfo();
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
index ac588e83d..0e6f44138 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java
@@ -86,7 +86,7 @@ public class SyncFileChangeListener implements IResourceChangeListener {
// Inform the synchronizer about folder creations
if (kind == IResourceDelta.ADDED && resource.getType() == IResource.FOLDER) {
try {
- EclipseSynchronizer.getInstance().folderCreated((IFolder)resource);
+ CVSProviderPlugin.getPlugin().getFileModificationManager().folderCreated((IFolder)resource);
} catch (CVSException e) {
throw new CoreException(e.getStatus());
}

Back to the top