1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 03:55:22 +02:00

RESOLVED - bug 240097: [terminal] Allow paste with the middle mouse button

https://bugs.eclipse.org/bugs/show_bug.cgi?id=240097
This commit is contained in:
Michael Scharf 2008-07-09 01:40:21 +00:00
parent 4e399ae9df
commit 84057d7cd6

View file

@ -7,6 +7,7 @@
*
* Contributors:
* Michael Scharf (Wind River) - initial API and implementation
* Michael Scharf (Wind River) - [240097] Allow paste with the middle mouse button
*******************************************************************************/
/**
*
@ -14,6 +15,8 @@
package org.eclipse.tm.internal.terminal.view;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.tm.internal.terminal.control.CommandInputFieldWithHistory;
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
@ -41,6 +44,12 @@ class TerminalViewConnection implements ITerminalViewConnection {
public TerminalViewConnection(ITerminalViewControl ctl) {
fCtlTerminal = ctl;
fCtlTerminal.getControl().addMouseListener(new MouseAdapter(){
public void mouseUp(MouseEvent e) {
// paste when the middle button is clicked
if(e.button==2) // middle button
fCtlTerminal.paste();
}});
}
/* (non-Javadoc)