mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 07:05:24 +02:00
bug 168183: [terminal] Exception logged when switching to terminal view for the first time
https://bugs.eclipse.org/bugs/show_bug.cgi?id=168183 moved the context and key bindings to the terminal plugin
This commit is contained in:
parent
f7230852a2
commit
7ac215b39e
5 changed files with 72 additions and 83 deletions
|
@ -21,9 +21,6 @@ terminal.views.view.name = Terminal
|
|||
terminal.views.view.font.description = The font for the terminal console.
|
||||
terminal.views.view.font.label = Terminal Console Font
|
||||
|
||||
terminal.view.context.name=Terminal view context
|
||||
terminal.view.context.description=control-q override
|
||||
|
||||
terminal.view.insertion.description=Terminal view insertion
|
||||
terminal.view.insertion.name=Terminal view insert
|
||||
terminal.view.insertion.category.name=Terminal view commands
|
||||
|
|
|
@ -62,14 +62,6 @@
|
|||
</description>
|
||||
</fontDefinition>
|
||||
</extension>
|
||||
|
||||
<extension point="org.eclipse.ui.contexts">
|
||||
<context
|
||||
name="%terminal.view.context.name"
|
||||
description="%terminal.view.context.description"
|
||||
id="org.eclipse.tm.terminal.TerminalContext"
|
||||
/>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.commands">
|
||||
<command
|
||||
|
@ -81,64 +73,4 @@
|
|||
id="org.eclipse.tm.terminal.category1"
|
||||
name="%terminal.view.insertion.category.name"/>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.bindings">
|
||||
<!--
|
||||
These keybindings are needed to disable the menu-activation keys (e.g.,
|
||||
Alt-F for the File menu, etc.). The code in method
|
||||
TerminalControl.TerminalFocusListener.focusGained() disables the Eclipse key
|
||||
binding service, but it doesn't disable the global menu-activation
|
||||
keys.
|
||||
-->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+A"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+E"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+F"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+G"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+H"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+N"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+P"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+R"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+T"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+W"/>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
|
|
@ -97,9 +97,6 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalLi
|
|||
|
||||
private SettingsStore fStore;
|
||||
|
||||
/** Remember the item with which we contributed the shortcut to unregister them again! */
|
||||
private IContextActivation fRememberedContextActivation;
|
||||
|
||||
public TerminalView() {
|
||||
Logger
|
||||
.log("==============================================================="); //$NON-NLS-1$
|
||||
|
@ -346,7 +343,6 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalLi
|
|||
/** Activate the sy context allowing shortcuts like F3(open declaration) in the view */
|
||||
IContextService ctxtService = (IContextService) getSite().getService(IContextService.class);
|
||||
// TODO define context if not existing
|
||||
fRememberedContextActivation = ctxtService.activateContext("org.eclipse.tm.terminal.TerminalContext"); //$NON-NLS-1$
|
||||
|
||||
setPartName(ViewMessages.PROP_TITLE);
|
||||
|
||||
|
@ -371,14 +367,6 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalLi
|
|||
MenuManager menuMgr;
|
||||
Menu menu;
|
||||
|
||||
/** The context (for short cuts) was set above, now unset it again */
|
||||
if (fRememberedContextActivation != null) {
|
||||
IContextService ctxService = (IContextService) getSite()
|
||||
.getService(IContextService.class);
|
||||
ctxService.deactivateContext(fRememberedContextActivation);
|
||||
fRememberedContextActivation = null;
|
||||
}
|
||||
|
||||
JFaceResources.getFontRegistry().removeListener(fPropertyChangeHandler);
|
||||
plugin = TerminalViewPlugin.getDefault();
|
||||
workbench = plugin.getWorkbench();
|
||||
|
|
|
@ -16,3 +16,7 @@
|
|||
###############################################################################
|
||||
pluginName = TM Terminal Widget
|
||||
providerName = Eclipse.org
|
||||
|
||||
terminal.view.name=Terminal view context
|
||||
terminal.view.description=control-q override
|
||||
|
||||
|
|
|
@ -17,4 +17,72 @@
|
|||
point="org.eclipse.tm.terminal.terminalConnector">
|
||||
<connector class="org.eclipse.tm.terminal.internal.telnet.TelnetConnector"/>
|
||||
</extension>
|
||||
|
||||
<extension point="org.eclipse.ui.contexts">
|
||||
<context
|
||||
name="%terminal.context.name"
|
||||
description="%terminal.context.description"
|
||||
id="org.eclipse.tm.terminal.TerminalContext"
|
||||
/>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.bindings">
|
||||
<!--
|
||||
These keybindings are needed to disable the menu-activation keys (e.g.,
|
||||
Alt-F for the File menu, etc.). The code in method
|
||||
TerminalControl.TerminalFocusListener.focusGained() disables the Eclipse key
|
||||
binding service, but it doesn't disable the global menu-activation
|
||||
keys.
|
||||
-->
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+A"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+E"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+F"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+G"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+H"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+N"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+P"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+R"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+T"/>
|
||||
<key
|
||||
commandId="org.eclipse.tm.terminal.command1"
|
||||
contextId="org.eclipse.tm.terminal.TerminalContext"
|
||||
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
|
||||
sequence="Alt+W"/>
|
||||
</extension>
|
||||
</plugin>
|
||||
|
|
Loading…
Add table
Reference in a new issue