Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2005-05-17 19:04:10 +0000
committerMichael Valenta2005-05-17 19:04:10 +0000
commit39e43d36495b985b135ccb38debc1f190fc20d33 (patch)
tree59f71c3be8ac5582de79e617e6429dd98445b011
parent090df584cde3b133b1e2ce6c1762480ba311fe1e (diff)
downloadeclipse.platform.team-39e43d36495b985b135ccb38debc1f190fc20d33.tar.gz
eclipse.platform.team-39e43d36495b985b135ccb38debc1f190fc20d33.tar.xz
eclipse.platform.team-39e43d36495b985b135ccb38debc1f190fc20d33.zip
Bug 95568 M7: CVS commands in menu do not work but context menu does
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
index 873d44c5d..915872aa8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
@@ -168,8 +168,8 @@ public abstract class TeamAction extends ActionDelegate implements IObjectAction
Object[] elements = selection.toArray();
ArrayList providerMappings = new ArrayList();
for (int i = 0; i < elements.length; i++) {
- Object object = elements[i];
- Object adapted = LegacyResourceSupport.getAdaptedContributorResourceMapping(object);
+ Object object = elements[i];
+ Object adapted = getResourceMapping(object);
if (adapted instanceof ResourceMapping) {
ResourceMapping mapping = (ResourceMapping) adapted;
if (providerId == null || isMappedToProvider(mapping, providerId)) {
@@ -179,6 +179,12 @@ public abstract class TeamAction extends ActionDelegate implements IObjectAction
}
return (ResourceMapping[]) providerMappings.toArray(new ResourceMapping[providerMappings.size()]);
}
+
+ private Object getResourceMapping(Object object) {
+ if (object instanceof ResourceMapping)
+ return (ResourceMapping)object;
+ return LegacyResourceSupport.getAdaptedContributorResourceMapping(object);
+ }
private boolean isMappedToProvider(ResourceMapping element, String providerId) {
IProject[] projects = element.getProjects();

Back to the top