Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » pasting multiple lines in scripting console on Windows(pasting multiple lines in scripting console on Windows)
pasting multiple lines in scripting console on Windows [message #876247] Thu, 24 May 2012 08:27 Go to next message
Valentin Georgiev is currently offline Valentin GeorgievFriend
Messages: 2
Registered: May 2012
Junior Member
Hi,

We have a RCP application with a scripting console, where JavaScript, R, etc. code is entered and executed. On Mac OS X and Linux one can paste in the scripting console text containing multiple lines, while on Windows only the first line of the clipboard text is pasted.
We have this code in the scripting console view class:

pasteInputAction = new Action("Paste") {
public void run() {
input.paste();
}

Is it possible to paste multiple lines text via SWT.

Thanks in advance for any help!
Valentin
Re: pasting multiple lines in scripting console on Windows [message #878677 is a reply to message #876247] Tue, 29 May 2012 17:59 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
My guess is that the text entry field is not being created with style
SWT.MULTI. I assume the scripting console is something you have written
in your RCP app(?). If so then this should be an easy change to try.

Grant


On 5/24/2012 4:27 AM, Valentin Georgiev wrote:
> Hi,
>
> We have a RCP application with a scripting console, where JavaScript, R,
> etc. code is entered and executed. On Mac OS X and Linux one can paste
> in the scripting console text containing multiple lines, while on
> Windows only the first line of the clipboard text is pasted. We have
> this code in the scripting console view class:
>
> pasteInputAction = new Action("Paste") {
> public void run() {
> input.paste();
> }
>
> Is it possible to paste multiple lines text via SWT.
>
> Thanks in advance for any help!
> Valentin
>
Re: pasting multiple lines in scripting console on Windows [message #879451 is a reply to message #878677] Thu, 31 May 2012 08:52 Go to previous message
Valentin Georgiev is currently offline Valentin GeorgievFriend
Messages: 2
Registered: May 2012
Junior Member
Grant Gayed wrote on Tue, 29 May 2012 13:59
My guess is that the text entry field is not being created with style
SWT.MULTI. I assume the scripting console is something you have written
in your RCP app(?). If so then this should be an easy change to try.

Grant
>


Had just figured it out myself, but Grant, thanks for your answer, you're totally right. It was the text entry field that was constructed with SWT.SINGLE style. And yes, the scripting condole is written in the RCP app, but we have several consoles and I just needed to look at the abstract class they all extend and the input Text object was there.

Thank you again!
Previous Topic:StyledText and secondary display
Next Topic:SWT Browser Widget, surpress CTRL-N with setUrl
Goto Forum:
  


Current Time: Sat Oct 24 04:37:18 GMT 2020

Powered by FUDForum. Page generated in 0.02119 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top