1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-28 19:35:36 +02:00

Bug 205486 - [terminal] create a switch for scroll locking

This commit is contained in:
Martin Oberhuber 2010-06-03 08:34:24 +00:00
parent c5ed15ff5d
commit 408bb2afce
7 changed files with 35 additions and 23 deletions

View file

@ -13,7 +13,7 @@
<feature
id="org.eclipse.tm.terminal.sdk"
label="%featureName"
version="3.0.100.qualifier"
version="3.1.0.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg">

View file

@ -13,7 +13,7 @@
<feature
id="org.eclipse.tm.terminal.view"
label="%featureName"
version="2.0.200.qualifier"
version="2.1.0.qualifier"
provider-name="%providerName">
<description>

View file

@ -2,12 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.view;singleton:=true
Bundle-Version: 2.0.101.qualifier
Bundle-Version: 2.1.0.qualifier
Bundle-Activator: org.eclipse.tm.internal.terminal.view.TerminalViewPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.tm.terminal;bundle-version="[3.0.1,3.1.0)"
org.eclipse.tm.terminal;bundle-version="[3.0.100,3.1.0)"
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.4

View file

@ -1,5 +1,5 @@
################################################################################
# Copyright (c) 2006, 2009 Wind River Systems, Inc. and others.
# Copyright (c) 2006, 2010 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
@ -21,5 +21,5 @@ blurb=Target Management Terminal View\n\
Version: {featureVersion}\n\
Build id: {0}\n\
\n\
(c) Copyright Wind River Systems, Inc. and others 2003, 2009. All rights reserved.\n\
(c) Copyright Wind River Systems, Inc. and others 2003, 2010. All rights reserved.\n\
Visit http://www.eclipse.org/dsdp/tm

View file

@ -4,12 +4,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="copyright" content="Copyright (c) 2004, 2008 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
<meta name="copyright" content="Copyright (c) 2004, 2010 Wind River Systems, Inc. and others. This page is made available under license. For full details see the LEGAL notice in the documentation book that contains this page." />
<link rel="stylesheet" type="text/css" href="../book.css" />
<title>Terminal View Quick Reference</title>
</head>
<!--
Copyright (c) 2004, 2008 Wind River Systems, Inc. and others.
Copyright (c) 2004, 2010 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
@ -27,17 +27,13 @@ Martin Oberhuber (Wind River) - initial API and implementation
<td><p><b>Button</b></p></td>
<td><p><b>Description</b></p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/clcl16/newterminal.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Open another Terminal connection in the current view, or in a new <b>Terminal</b> view instance.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/clcl16/connect_co.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Connect to selected port.</p></td>
<td><p>Connect to selected target.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/clcl16/disconnect_co.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Disconnect from selected port.</p></td>
<td><p>Disconnect from selected connection.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/clcl16/properties_tsk.gif" border="0" hspace="0" vspace="0"/></p></td>
@ -49,11 +45,19 @@ Martin Oberhuber (Wind River) - initial API and implementation
<td><p>Toggle the <a href="04_terminal_emulation.html"><b>Command Input</b></a> field,
for editing complex command lines on dumb terminals.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/clcl16/lock_co.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Toggle <b>Scroll Lock</b></a> in the current terminal connection.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/cview16/terminal_view.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Select a Terminal connection to show in this view instance.
Only available when multiple connections have been defined in this view.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/clcl16/newterminal.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Open another Terminal connection in the current view, or in a new <b>Terminal</b> view instance.</p></td>
</tr>
<tr align="left" valign="top">
<td><p><img src="../../icons/dlcl16/rem_co.gif" border="0" hspace="0" vspace="0"/></p></td>
<td><p>Remove the currently selected Terminal Connection from this view.

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2003, 2009 Wind River Systems, Inc. and others.
* Copyright (c) 2003, 2010 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
@ -24,6 +24,7 @@
* Michael Scharf (Wind River) - [196454] Initial connection settings dialog should not be blank
* Michael Scharf (Wind River) - [241096] Secondary terminals in same view do not observe the "invert colors" Preference
* Michael Scharf (Wind River) - [262996] get rid of TerminalState.OPENED
* Martin Oberhuber (Wind River) - [205486] Enable ScrollLock
*******************************************************************************/
package org.eclipse.tm.internal.terminal.view;
@ -54,6 +55,7 @@ import org.eclipse.tm.internal.terminal.actions.TerminalActionConnect;
import org.eclipse.tm.internal.terminal.actions.TerminalActionDisconnect;
import org.eclipse.tm.internal.terminal.actions.TerminalActionNewTerminal;
import org.eclipse.tm.internal.terminal.actions.TerminalActionRemove;
import org.eclipse.tm.internal.terminal.actions.TerminalActionScrollLock;
import org.eclipse.tm.internal.terminal.actions.TerminalActionSelectionDropDown;
import org.eclipse.tm.internal.terminal.actions.TerminalActionSettings;
import org.eclipse.tm.internal.terminal.actions.TerminalActionToggleCommandInputField;
@ -104,7 +106,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
protected TerminalAction fActionTerminalConnect;
// private TerminalAction fActionTerminalScrollLock;
private TerminalAction fActionTerminalScrollLock;
protected TerminalAction fActionTerminalDisconnect;
@ -297,6 +299,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
updateTerminalDisconnect();
updateTerminalSettings();
fActionToggleCommandInputField.setChecked(hasCommandInputField());
fActionTerminalScrollLock.setChecked(isScrollLock());
updateSummary();
}
@ -558,7 +561,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
fActionTerminalDropDown = new TerminalActionSelectionDropDown(fMultiConnectionManager);
fActionTerminalRemove=new TerminalActionRemove(fMultiConnectionManager);
fActionTerminalNewTerminal = new TerminalActionNewTerminal(this);
// fActionTerminalScrollLock = new TerminalActionScrollLock(this);
fActionTerminalScrollLock = new TerminalActionScrollLock(this);
fActionTerminalConnect = new TerminalActionConnect(this);
fActionTerminalDisconnect = new TerminalActionDisconnect(this);
fActionTerminalSettings = new TerminalActionSettings(this);
@ -572,11 +575,11 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
protected void setupLocalToolBars() {
IToolBarManager toolBarMgr = getViewSite().getActionBars().getToolBarManager();
// toolBarMgr.add(fActionTerminalScrollLock);
toolBarMgr.add(fActionTerminalConnect);
toolBarMgr.add(fActionTerminalDisconnect);
toolBarMgr.add(fActionTerminalSettings);
toolBarMgr.add(fActionToggleCommandInputField);
toolBarMgr.add(fActionTerminalScrollLock);
toolBarMgr.add(new Separator("fixedGroup")); //$NON-NLS-1$
toolBarMgr.add(fActionTerminalDropDown);
toolBarMgr.add(fActionTerminalNewTerminal);
@ -606,7 +609,7 @@ public class TerminalView extends ViewPart implements ITerminalView, ITerminalVi
menuMgr.add(fActionEditSelectAll);
menuMgr.add(new Separator());
menuMgr.add(fActionToggleCommandInputField);
// menuMgr.add(fActionTerminalScrollLock);
menuMgr.add(fActionTerminalScrollLock);
// Other plug-ins can contribute there actions here

View file

@ -11,6 +11,7 @@
* Uwe Stieber (Wind River) - [281328] The very first few characters might be missing in the terminal control if opened and connected programmatically
* Martin Oberhuber (Wind River) - [294327] After logging in, the remote prompt is hidden
* Anton Leherbauer (Wind River) - [294468] Fix scroller and text line rendering
* Uwe Stieber (Wind River) - [205486] Fix ScrollLock always moving to line 1
*******************************************************************************/
package org.eclipse.tm.internal.terminal.textcanvas;
@ -93,9 +94,11 @@ public class TextCanvas extends GridCanvas {
return;
scrollToEnd();
// make sure the scroll area is correct:
if (!fScrollLock) {
scrollY(getVerticalBar());
scrollX(getHorizontalBar());
}
}
});
// let the cursor blink if the text canvas gets the focus...
addFocusListener(new FocusListener(){
@ -250,8 +253,10 @@ public class TextCanvas extends GridCanvas {
// scroll to end
scrollToEnd();
// make sure the scroll area is correct:
if (!fScrollLock) {
scrollY(getVerticalBar());
scrollX(getHorizontalBar());
}
getParent().layout();
} finally {