Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-05-31 17:07:55 +0000
committerAndre Weinand2002-05-31 17:07:55 +0000
commit564f8152c23d87abf935ca9cc680b47db04f8ea3 (patch)
tree50b38169c549bb95c114fa6d310e0a4c80d0f433
parentfce716cf5564308d65df4dab3ee3c5f4add38e35 (diff)
downloadeclipse.platform.team-564f8152c23d87abf935ca9cc680b47db04f8ea3.tar.gz
eclipse.platform.team-564f8152c23d87abf935ca9cc680b47db04f8ea3.tar.xz
eclipse.platform.team-564f8152c23d87abf935ca9cc680b47db04f8ea3.zip
Made NavigationAction public
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java41
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java41
2 files changed, 82 insertions, 0 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
new file mode 100644
index 000000000..e79b381ac
--- /dev/null
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
@@ -0,0 +1,41 @@
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+package org.eclipse.compare;
+
+import java.util.ResourceBundle;
+import org.eclipse.jface.action.Action;
+
+import org.eclipse.compare.internal.CompareNavigator;
+import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.Utilities;
+
+
+public class NavigationAction extends Action {
+
+ private boolean fNext;
+ private CompareEditorInput fCompareEditorInput;
+
+
+ public NavigationAction(boolean next) {
+ this(CompareUIPlugin.getResourceBundle(), next);
+ }
+
+ public NavigationAction(ResourceBundle bundle, boolean next) {
+ Utilities.initAction(this, bundle, next ? "action.Next." : "action.Previous."); //$NON-NLS-2$ //$NON-NLS-1$
+ fNext= next;
+ }
+
+ public void run() {
+ if (fCompareEditorInput != null) {
+ Object adapter= fCompareEditorInput.getAdapter(CompareNavigator.class);
+ if (adapter instanceof CompareNavigator)
+ ((CompareNavigator)adapter).selectChange(fNext);
+ }
+ }
+
+ public void setCompareEditorInput(CompareEditorInput input) {
+ fCompareEditorInput= input;
+ }
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
new file mode 100644
index 000000000..e79b381ac
--- /dev/null
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/NavigationAction.java
@@ -0,0 +1,41 @@
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+package org.eclipse.compare;
+
+import java.util.ResourceBundle;
+import org.eclipse.jface.action.Action;
+
+import org.eclipse.compare.internal.CompareNavigator;
+import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.Utilities;
+
+
+public class NavigationAction extends Action {
+
+ private boolean fNext;
+ private CompareEditorInput fCompareEditorInput;
+
+
+ public NavigationAction(boolean next) {
+ this(CompareUIPlugin.getResourceBundle(), next);
+ }
+
+ public NavigationAction(ResourceBundle bundle, boolean next) {
+ Utilities.initAction(this, bundle, next ? "action.Next." : "action.Previous."); //$NON-NLS-2$ //$NON-NLS-1$
+ fNext= next;
+ }
+
+ public void run() {
+ if (fCompareEditorInput != null) {
+ Object adapter= fCompareEditorInput.getAdapter(CompareNavigator.class);
+ if (adapter instanceof CompareNavigator)
+ ((CompareNavigator)adapter).selectChange(fNext);
+ }
+ }
+
+ public void setCompareEditorInput(CompareEditorInput input) {
+ fCompareEditorInput= input;
+ }
+} \ No newline at end of file

Back to the top