Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] StyledText and keyboard actions

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



Back to the top