[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] StyledText and keyboard actions
|
Hi Stephan,
That's what we've done until my recent rework, but overwriting SWT
classes seems considered to be bad design.
--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog
On 2017-02-09 8:46, Stephan Aßmus wrote:
Hi,
Am 02.02.2017 um 20:23 schrieb Thomas Singer:
But the main question is how to tell setKeyBinding what own code should
be executed? If I recall correctly, Swing used Actions for that, but
here a simple Runnable would do as well.
How exactly Eclipse injects own shortcuts - assuming that StyledText is
the core control for the code editor?
I've read to the end of the thread, but just thought I could answer the
above question:
After you have overridden actions via setKeyBinding(), or added new
bindings, you can override...
public void invokeAction(int action)
... in your StyledText sub-class to handle what you have defined. You
can also selectively call the super-class version when you want the
action handled by the original code. Hope this helps.
Best regards,
-Stephan
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev