Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java
deleted file mode 100644
index 75248aa8b..000000000
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/target/SyncAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.team.internal.ui.target;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.sync.IRemoteSyncElement;
-import org.eclipse.team.core.target.TargetManager;
-import org.eclipse.team.core.target.TargetProvider;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.actions.TeamAction;
-import org.eclipse.team.internal.ui.sync.SyncCompareInput;
-import org.eclipse.team.internal.ui.sync.SyncView;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Action for catchup/release in popup menus.
- */
-public class SyncAction extends TeamAction {
-
- public void run(IAction action) {
- IResource[] resources = getSelectedResources();
- SyncView view = (SyncView)TeamUIPlugin.getActivePage().findView(SyncView.VIEW_ID);
- if (view == null) {
- view = SyncView.findInActivePerspective();
- }
- if (view != null) {
- try {
- TeamUIPlugin.getActivePage().showView(SyncView.VIEW_ID);
- } catch (PartInitException e) {
- TeamUIPlugin.log(e.getStatus());
- }
- view.showSync(getCompareInput(resources));
- }
- }
-
- protected boolean isEnabled() throws TeamException {
- IResource[] resources = getSelectedResources();
- for (int i = 0; i < resources.length; i++) {
- IResource resource = resources[i];
- if (!resource.isAccessible()) return false;
- TargetProvider provider = TargetManager.getProvider(resource.getProject());
- if(provider == null) return false;
- }
- return true;
- }
-
- protected SyncCompareInput getCompareInput(IResource[] resources) {
- return new TargetSyncCompareInput(resources, IRemoteSyncElement.GRANULARITY_TIMESTAMP);
- }
-} \ No newline at end of file

Back to the top