Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-12-03 12:16:13 -0500
committerMichael Valenta2003-12-03 12:16:13 -0500
commit5f99d331f258bc2c26cce23d8b9aa71355df5c85 (patch)
tree7bcd4d043cc123579acb7f3a3a00151c70ab268b
parent540f4104c2328feb8bd6f0af2f82ad153e9c03f6 (diff)
downloadeclipse.platform.team-5f99d331f258bc2c26cce23d8b9aa71355df5c85.tar.gz
eclipse.platform.team-5f99d331f258bc2c26cce23d8b9aa71355df5c85.tar.xz
eclipse.platform.team-5f99d331f258bc2c26cce23d8b9aa71355df5c85.zip
Handle RESOURCE_NOT_FOUND return code from core
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
index 0d078f3b9..fce0d5a2f 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
@@ -306,16 +306,25 @@ public abstract class CVSSyncTreeSubscriber extends TeamSubscriber {
* @see org.eclipse.team.core.sync.ISyncTreeSubscriber#isSupervised(org.eclipse.core.resources.IResource)
*/
public boolean isSupervised(IResource resource) throws TeamException {
- RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
- if (provider == null) return false;
- // TODO: what happens for resources that don't exist?
- // TODO: is it proper to use ignored here?
- ICVSResource cvsThing = CVSWorkspaceRoot.getCVSResourceFor(resource);
- if (cvsThing.isIgnored()) {
- // An ignored resource could have an incoming addition (conflict)
- return getRemoteSynchronizer().hasRemote(resource);
+ try {
+ RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), CVSProviderPlugin.getTypeId());
+ if (provider == null) return false;
+ // TODO: what happens for resources that don't exist?
+ // TODO: is it proper to use ignored here?
+ ICVSResource cvsThing = CVSWorkspaceRoot.getCVSResourceFor(resource);
+ if (cvsThing.isIgnored()) {
+ // An ignored resource could have an incoming addition (conflict)
+ return getRemoteSynchronizer().hasRemote(resource);
+ }
+ return true;
+ } catch (TeamException e) {
+ // If there is no resource in coe this measn there is no local and no remote
+ // so the resource is not supervised.
+ if (e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND) {
+ return false;
+ }
+ throw e;
}
- return true;
}
/* (non-Javadoc)

Back to the top