Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-02-04 21:02:33 +0000
committerMichael Valenta2003-02-04 21:02:33 +0000
commita8a7a855bba3482e1ae7149acc80fd87f04e3916 (patch)
tree139880989c9bfd1fa12316a4691c23f8ab5e08e3
parent378860342517ac0005b30651978b65f91580ca41 (diff)
downloadeclipse.platform.team-a8a7a855bba3482e1ae7149acc80fd87f04e3916.tar.gz
eclipse.platform.team-a8a7a855bba3482e1ae7149acc80fd87f04e3916.tar.xz
eclipse.platform.team-a8a7a855bba3482e1ae7149acc80fd87f04e3916.zip
30896: Marker deletion should just use findMarkers
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/AddDeleteMoveListener.java39
1 files changed, 17 insertions, 22 deletions
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 ed9a3600b..cf53ff9b9 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
@@ -344,34 +344,29 @@ public class AddDeleteMoveListener implements IResourceDeltaVisitor, IResourceCh
for (int i = 0; i < changedResources.length; i++) {
try {
final IResource resource = changedResources[i];
- // Only update markers for projects with a provider
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) break;
- ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
- // Continue to attempt to remove addition markers even though we no longer create them
- if (cvsResource.isManaged() || cvsResource.isIgnored()) {
- if (cvsResource.exists()) {
- // Remove the addition marker for managed or ignored resources
- IMarker marker = getAdditionMarker(resource);
+
+ if (resource.exists()) {
+ // First, delete any addition markers even though we no longer create them
+ IMarker marker = getAdditionMarker(resource);
+ if (marker != null)
+ marker.delete();
+ // Also, delete any deletion markers stored on the parent
+ if (resource.getType() == IResource.FILE) {
+ marker = getDeletionMarker(resource);
if (marker != null)
marker.delete();
}
- }
-
- // Handle deletion markers
- if (resource.getType() == IResource.FILE) {
- if (cvsResource.exists()) {
+ } else if (resource.getType() == IResource.FILE) {
+ // Handle deletion markers on non-existant files
+ RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
+ if (provider == null) break;
+ ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
+ if (cvsResource.isManaged()) {
+ createDeleteMarker(resource);
+ } else {
IMarker marker = getDeletionMarker(resource);
if (marker != null)
marker.delete();
- } else {
- if (cvsResource.isManaged()) {
- createDeleteMarker(resource);
- } else {
- IMarker marker = getDeletionMarker(resource);
- if (marker != null)
- marker.delete();
- }
}
}
} catch (CVSException e) {

Back to the top