Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
new file mode 100644
index 000000000..b8de9de93
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/pages/ShowSynchronizeViewPage.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.sync.pages;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.team.ui.sync.INewSynchronizeView;
+import org.eclipse.team.ui.sync.ISynchronizeViewPage;
+
+public class ShowSynchronizeViewPage extends Action {
+ private ISynchronizeViewPage fPage;
+ private INewSynchronizeView fView;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ public void run() {
+ if (!fPage.equals(fView.getSynchronizeTarget())) {
+ // only change if required (and un-pin the console if pinned)
+ fView.display(fPage);
+ }
+ }
+
+ /**
+ * Constructs an action to display the given page.
+ *
+ * @param view the synchronize view in which the given page is contained
+ * @param console the console
+ */
+ public ShowSynchronizeViewPage(INewSynchronizeView view, ISynchronizeViewPage page) {
+ super(page.getName(), Action.AS_RADIO_BUTTON);
+ fPage = page;
+ fView = view;
+ setImageDescriptor(page.getImageDescriptor());
+ }
+}

Back to the top