Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/FileModificationManager.java18
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileChangeListener.java21
2 files changed, 16 insertions, 23 deletions
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 ad71ba405..3b25d5e1a 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
@@ -45,7 +45,7 @@ public class FileModificationManager implements IResourceChangeListener, ISavePa
private static final QualifiedName UPDATE_TIMESTAMP = new QualifiedName(CVSProviderPlugin.ID, "update-timestamp"); //$NON-NLS-1$
- private Set modifiedResources = new HashSet();
+ /* private */Set modifiedResources = new HashSet();
// consider the following changes types and ignore the others (e.g. marker and description changes are ignored)
protected int INTERESTING_CHANGES = IResourceDelta.CONTENT |
@@ -127,21 +127,25 @@ public class FileModificationManager implements IResourceChangeListener, ISavePa
* @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
*/
public void doneSaving(ISaveContext context) {
+ // Do nothing
}
/**
* @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
*/
- public void prepareToSave(ISaveContext context) throws CoreException {
+ public void prepareToSave(ISaveContext context) {
+ // Do nothing
}
/**
* @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
*/
public void rollback(ISaveContext context) {
+ // Do nothing
}
/**
* @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
*/
- public void saving(ISaveContext context) throws CoreException {
+ public void saving(ISaveContext context) {
+ // Do nothing
}
@@ -169,12 +173,14 @@ public class FileModificationManager implements IResourceChangeListener, ISavePa
* Handle added and changed resources by signaling the change to the corresponding
* CVS resource and recording the change for broadcast to interested listeners.
*/
- private void resourceChanged(IResource resource, boolean addition) throws CoreException {
+ /* private */void resourceChanged(IResource resource, boolean addition) throws CoreException {
if (isCleanUpdate(resource)) return;
try {
EclipseResource cvsResource = (EclipseResource)CVSWorkspaceRoot.getCVSResourceFor(resource);
- cvsResource.handleModification(addition);
- modifiedResources.add(resource);
+ if (!cvsResource.isIgnored()) {
+ cvsResource.handleModification(addition);
+ modifiedResources.add(resource);
+ }
} catch (CVSException e) {
throw e.toCoreException();
}
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 eff0002eb..715e7a2a5 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
@@ -92,7 +92,7 @@ public class SyncFileChangeListener implements IResourceChangeListener {
event.getDelta().accept(new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) throws CoreException {
+ public boolean visit(IResourceDelta delta) {
IResource resource = delta.getResource();
if(resource.getType()==IResource.ROOT) {
@@ -127,7 +127,7 @@ public class SyncFileChangeListener implements IResourceChangeListener {
}
if(isMetaFile(resource)) {
- IResource[] toBeNotified = handleChangedMetaFile(resource, kind);
+ IResource[] toBeNotified = handleChangedMetaFile(resource);
if(toBeNotified.length>0 && isModifiedBy3rdParty(resource)) {
for (int i = 0; i < toBeNotified.length; i++) {
changedContainers.add(toBeNotified[i]);
@@ -137,7 +137,7 @@ public class SyncFileChangeListener implements IResourceChangeListener {
}
return false; /*don't visit any children we have all the information we need*/
}
- } else if(isIgnoreFile(resource)) {
+ } else if(isIgnoreFile(resource) && isModifiedBy3rdParty(resource)) {
deferredHandler.ignoreFileChanged((IFile)resource);
} else if (isExternalDeletion(resource, kind)) {
externalDeletions.add(resource);
@@ -245,7 +245,7 @@ public class SyncFileChangeListener implements IResourceChangeListener {
* may have their CVS sync state changed. If the 'folder' is deleted than no notification is
* required.
*/
- protected IContainer[] handleChangedMetaFile(IResource resource, int kind) {
+ protected IContainer[] handleChangedMetaFile(IResource resource) {
IContainer changedContainer = resource.getParent().getParent();
if(changedContainer.exists()) {
return new IContainer[] {changedContainer};
@@ -253,19 +253,6 @@ public class SyncFileChangeListener implements IResourceChangeListener {
return new IContainer[0];
}
}
-
- /*
- * This is an ignore file (e.g. folder/.cvsignore), notify that 'folder' and it's immediate children
- * may have their CVS sync state changed.
- */
- protected IContainer[] handleChangedIgnoreFile(IResource resource, int kind) {
- IContainer changedContainer = resource.getParent();
- if(changedContainer.exists()) {
- return new IContainer[] {changedContainer};
- } else {
- return new IContainer[0];
- }
- }
/**
* @return boolean

Back to the top