Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java
index 3f63cecfd..9f304a14e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSDecorator.java
@@ -111,7 +111,7 @@ public class CVSDecorator extends LabelProvider implements ILabelDecorator, IRes
* Return the CVSDecorator instance that is currently enabled.
* Return null if we don't have a decorator or its not enabled.
*/
- private static CVSDecorator getActiveCVSDecorator() {
+ /* package */ static CVSDecorator getActiveCVSDecorator() {
IDecoratorManager manager = CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager();
if (manager.getEnabled(CVSUIPlugin.DECORATOR_ID))
return (CVSDecorator) manager.getLabelDecorator(CVSUIPlugin.DECORATOR_ID);
@@ -269,13 +269,14 @@ public class CVSDecorator extends LabelProvider implements ILabelDecorator, IRes
}
if (resource.getType() == IResource.PROJECT) {
- // If there is no CVS nature, don't continue
+ // deconfigure if appropriate (see CVSDecorator#projectDeconfigured(IProject))
+ // do this even if there is a provider (this is required since old projects may still have a cvs nature)
+ if (deconfiguredProjects.contains(resource)) {
+ deconfiguredProjects.remove(resource);
+ refresh((IProject)resource);
+ }
+ // If there is no CVS provider, don't continue
if (RepositoryProvider.getProvider((IProject)resource, CVSProviderPlugin.getTypeId()) == null) {
- // deconfigure if appropriate (see CVSDecorator#projectDeconfigured(IProject))
- if (deconfiguredProjects.contains(resource)) {
- refresh((IProject)resource);
- deconfiguredProjects.remove(resource);
- }
return false;
}
}
@@ -512,4 +513,14 @@ public class CVSDecorator extends LabelProvider implements ILabelDecorator, IRes
}
return false;
}
+ /**
+ * This method is used to indicate whether a particular resource is a member of
+ * a project that is in the process of being deconfigured. Such resources should not
+ * be decorated.
+ */
+ /* package */ boolean isMemberDeconfiguredProject(IResource resource) {
+ if (deconfiguredProjects.isEmpty()) return false;
+ return deconfiguredProjects.contains(resource.getProject());
+ }
+
} \ No newline at end of file

Back to the top