diff options
author | Uwe Stieber | 2014-09-23 09:48:08 +0000 |
---|---|---|
committer | Uwe Stieber | 2014-09-30 06:28:39 +0000 |
commit | 9405319247794b3f712479475b4839173a02668f (patch) | |
tree | 6b900e155c0dcbd929c5745aefc94e30306b6370 | |
parent | c742c686231b606ebadb8ceb6b810ec8b2a2951b (diff) | |
download | org.eclipse.tcf-9405319247794b3f712479475b4839173a02668f.tar.gz org.eclipse.tcf-9405319247794b3f712479475b4839173a02668f.tar.xz org.eclipse.tcf-9405319247794b3f712479475b4839173a02668f.zip |
Terminals: Fix Bug 435119 - Make the Alt+Up / Alt+Right keyboard
shortcuts discoverable
3 files changed, 93 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml index 494a39f4d..7de166ec0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/plugin.xml @@ -167,13 +167,13 @@ </menuContribution> <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.terminals.TerminalsView?after=additions"> <command - commandId="org.eclipse.ui.window.maximizePart" + commandId="org.eclipse.tm.terminal.maximize" id="org.eclipse.tcf.te.ui.terminals.commands.maximizePart" label="Maximize View" style="push"> </command> <command - commandId="org.eclipse.ui.window.quickAccess" + commandId="org.eclipse.tm.terminal.quickaccess" id="org.eclipse.tcf.te.ui.terminals.commands.quickAccess" label="Quick Access" style="push"> @@ -246,6 +246,27 @@ </with> </enabledWhen> </handler> + + <handler + class="org.eclipse.tcf.te.ui.terminals.internal.handler.MaximizeViewHandler" + commandId="org.eclipse.tm.terminal.maximize"> + <activeWhen> + <with variable="activePartId"> + <equals value="org.eclipse.tcf.te.ui.terminals.TerminalsView"/> + </with> + </activeWhen> + </handler> + + <handler + class="org.eclipse.tcf.te.ui.terminals.internal.handler.QuickAccessHandler" + commandId="org.eclipse.tm.terminal.quickaccess"> + <activeWhen> + <with variable="activePartId"> + <equals value="org.eclipse.tcf.te.ui.terminals.TerminalsView"/> + </with> + </activeWhen> + </handler> + </extension> <!-- Help Context contributions --> diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/MaximizeViewHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/MaximizeViewHandler.java new file mode 100644 index 000000000..290ff9882 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/MaximizeViewHandler.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2014 Wind River Systems, Inc. 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: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.te.ui.terminals.internal.handler; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.tcf.te.runtime.events.EventManager; +import org.eclipse.tcf.te.runtime.events.TriggerCommandEvent; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * Maximize view handler implementation. + */ +public class MaximizeViewHandler extends AbstractHandler { + + /* (non-Javadoc) + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + TriggerCommandEvent e = new TriggerCommandEvent(HandlerUtil.getActivePart(event), "org.eclipse.ui.window.maximizePart"); //$NON-NLS-1$ + EventManager.getInstance().fireEvent(e); + + return null; + } + +} diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/QuickAccessHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/QuickAccessHandler.java new file mode 100644 index 000000000..aa480e639 --- /dev/null +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/internal/handler/QuickAccessHandler.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2014 Wind River Systems, Inc. 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: + * Wind River Systems - initial API and implementation + *******************************************************************************/ +package org.eclipse.tcf.te.ui.terminals.internal.handler; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.tcf.te.runtime.events.EventManager; +import org.eclipse.tcf.te.runtime.events.TriggerCommandEvent; +import org.eclipse.ui.handlers.HandlerUtil; + +/** + * Quick access handler implementation. + */ +public class QuickAccessHandler extends AbstractHandler { + + /* (non-Javadoc) + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + TriggerCommandEvent e = new TriggerCommandEvent(HandlerUtil.getActivePart(event), "org.eclipse.ui.window.quickAccess"); //$NON-NLS-1$ + EventManager.getInstance().fireEvent(e); + + return null; + } + +} |