mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-03 13:43:31 +02:00
The "copy" menu item of the "Terminal" view isn't available if the text
is selected via "Select All" from the context menu Signed-off-by: Max Weninger <max.weninger@windriver.com>
This commit is contained in:
parent
dd006914b5
commit
7c218d95fb
6 changed files with 39 additions and 2 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %pluginName
|
Bundle-Name: %pluginName
|
||||||
Bundle-SymbolicName: org.eclipse.tm.terminal.control; singleton:=true
|
Bundle-SymbolicName: org.eclipse.tm.terminal.control; singleton:=true
|
||||||
Bundle-Version: 4.0.0.qualifier
|
Bundle-Version: 4.1.0.qualifier
|
||||||
Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
|
Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
|
||||||
Bundle-Vendor: %providerName
|
Bundle-Vendor: %providerName
|
||||||
Bundle-Localization: plugin
|
Bundle-Localization: plugin
|
||||||
|
|
|
@ -30,4 +30,13 @@ public interface ITerminalListener {
|
||||||
* @param title
|
* @param title
|
||||||
*/
|
*/
|
||||||
void setTerminalTitle(String title);
|
void setTerminalTitle(String title);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* selection has been changed internally e.g. select all
|
||||||
|
* clients might want to react on that
|
||||||
|
* NOTE: this does not include mouse selections
|
||||||
|
* those are handled in separate MouseListeners
|
||||||
|
* TODO should be unified
|
||||||
|
*/
|
||||||
|
void setTerminalSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -305,6 +305,7 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
||||||
*/
|
*/
|
||||||
public void selectAll() {
|
public void selectAll() {
|
||||||
getCtlText().selectAll();
|
getCtlText().selectAll();
|
||||||
|
fTerminalListener.setTerminalSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -330,8 +331,9 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
||||||
*/
|
*/
|
||||||
public void clearTerminal() {
|
public void clearTerminal() {
|
||||||
// The TerminalText object does all text manipulation.
|
// The TerminalText object does all text manipulation.
|
||||||
|
|
||||||
getTerminalText().clearTerminal();
|
getTerminalText().clearTerminal();
|
||||||
|
getCtlText().clearSelection();
|
||||||
|
fTerminalListener.setTerminalSelectionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -343,6 +343,11 @@ public class TextCanvas extends GridCanvas {
|
||||||
fCellCanvasModel.setSelection(0, fCellCanvasModel.getTerminalText().getHeight(), 0, fCellCanvasModel.getTerminalText().getWidth());
|
fCellCanvasModel.setSelection(0, fCellCanvasModel.getTerminalText().getHeight(), 0, fCellCanvasModel.getTerminalText().getWidth());
|
||||||
fCellCanvasModel.setSelectionAnchor(new Point(0,0));
|
fCellCanvasModel.setSelectionAnchor(new Point(0,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearSelection() {
|
||||||
|
fCellCanvasModel.setSelection(-1,-1,-1,-1);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -769,6 +769,22 @@ public class TabFolderManager extends PlatformObject implements ISelectionProvid
|
||||||
fireSelectionChanged(getSelection());
|
fireSelectionChanged(getSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fire the selection changed event with the terminal text!
|
||||||
|
* to the registered listeners.
|
||||||
|
* see also TerminalControlSelectionListener- mouseUp
|
||||||
|
*/
|
||||||
|
protected void fireTerminalSelectionChanged() {
|
||||||
|
updateStatusLine();
|
||||||
|
CTabItem item = getActiveTabItem();
|
||||||
|
if (item != null && !item.isDisposed()) {
|
||||||
|
ITerminalViewControl terminal = (ITerminalViewControl)item.getData();
|
||||||
|
if (terminal != null && !terminal.isDisposed()) {
|
||||||
|
fireSelectionChanged(new StructuredSelection(terminal.getSelection()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire the selection changed event to the registered listeners.
|
* Fire the selection changed event to the registered listeners.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -149,4 +149,9 @@ public class TabTerminalListener implements ITerminalListener {
|
||||||
@Override
|
@Override
|
||||||
public void setTerminalTitle(String title) {
|
public void setTerminalTitle(String title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTerminalSelectionChanged() {
|
||||||
|
tabFolderManager.fireTerminalSelectionChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue