Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2005-12-08 15:39:08 -0500
committerKevin Barnes2005-12-08 15:39:08 -0500
commit1408e6daf183e72c07f7cc47d839a717b5689011 (patch)
tree0b5704209a2c6f1615ae6dbb2b299b792851e547
parent522a46b976e0882d18b8e8345fba5ce5b7f02de0 (diff)
downloadeclipse.platform.debug-1408e6daf183e72c07f7cc47d839a717b5689011.tar.gz
eclipse.platform.debug-1408e6daf183e72c07f7cc47d839a717b5689011.tar.xz
eclipse.platform.debug-1408e6daf183e72c07f7cc47d839a717b5689011.zip
Bug 37590 - Move Console Preferences
-rw-r--r--org.eclipse.debug.ui/plugin.properties5
-rw-r--r--org.eclipse.debug.ui/plugin.xml8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.properties1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleShowPreferencesAction.java68
5 files changed, 82 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
index d695307da..066b7aac4 100644
--- a/org.eclipse.debug.ui/plugin.properties
+++ b/org.eclipse.debug.ui/plugin.properties
@@ -369,4 +369,7 @@ toggleMemoryMonitorsPane.description = Toggle visibility of the Memory Monitors
nextMemoryBlockCommand.label = Next Memory Monitor
nextMemoryBlockCommand.description = Show renderings from next memory monitor.
resetMemoryMonitorPrefAction.label = &Reset Memory Monitor...
-resetMemoryMonitorAction.label = &Reset Monitor \ No newline at end of file
+resetMemoryMonitorAction.label = &Reset Monitor
+
+ConsolePreferencesAction.label = &Preferences...
+ConsolePreferencesAction.tooltip = Opens the console's Preferences Page
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index d6c7d4ed3..970ec6b63 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -2408,7 +2408,13 @@ M4 = Platform-specific fourth key
class="org.eclipse.debug.internal.ui.views.console.ConsoleTerminateActionDelegate"
menubarPath="additions"
id="org.eclipse.debug.ui.consoleTerminateAction"
- helpContextId="console_terminate_action_context"/>
+ helpContextId="console_terminate_action_context"/>
+ <action
+ label="%ConsolePreferencesAction.label"
+ tooltip="%ConsolePreferencesAction.tooltip"
+ class="org.eclipse.debug.internal.ui.views.console.ConsoleShowPreferencesAction"
+ menubarPath="preferences"
+ id="org.eclipse.debug.ui.consolePreferencesAction"/>
</viewerContribution>
</extension>
<extension
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.java
index c12339a46..3b11be2af 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.java
@@ -33,4 +33,6 @@ public class ConsoleMessages extends NLS {
public static String ConsoleRemoveTerminatedAction_0;
public static String ConsoleRemoveTerminatedAction_1;
+
+ public static String ConsoleShowPreferencesAction__run_debug_console;
} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.properties
index 0e4371f2f..ed78c3a1d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleMessages.properties
@@ -21,3 +21,4 @@ ProcessConsole_0=<terminated> {0}
ProcessConsole_1=[Console output redirected to file:{0}]\n
ProcessConsole_2=[Invalid file specified for console output: {0}]\n
+ConsoleShowPreferencesAction__run_debug_console=Run/Debug Console
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleShowPreferencesAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleShowPreferencesAction.java
new file mode 100644
index 000000000..74a190eab
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ConsoleShowPreferencesAction.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.views.console;
+
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.preferences.ConsolePreferencePage;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.IPreferenceNode;
+import org.eclipse.jface.preference.IPreferencePage;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.jface.preference.PreferenceNode;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ui.IViewActionDelegate;
+import org.eclipse.ui.IViewPart;
+
+/**
+ * ConsoleShowPreferencesAction Displays the Console's Preference page
+ *
+ * @since 3.2
+ */
+public class ConsoleShowPreferencesAction extends Action implements IViewActionDelegate {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
+ */
+ public void init(IViewPart view) {
+ // do nothing
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IPreferencePage page = new ConsolePreferencePage();
+ page.setTitle(ConsoleMessages.ConsoleShowPreferencesAction__run_debug_console);
+ IPreferenceNode targetNode = new PreferenceNode("org.eclipse.debug.internal.ui.preferences.ConsolePreferencePage", page); //$NON-NLS-1$
+ PreferenceManager manager = new PreferenceManager();
+ manager.addToRoot(targetNode);
+ PreferenceDialog dialog = new PreferenceDialog(DebugUIPlugin.getShell(), manager);
+ dialog.create();
+ dialog.setMessage(page.getDescription());
+ dialog.open();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
+ * org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ // do nothing
+ }
+}

Back to the top