I am currently developing an Eclipse4 RCP application, and I was wondering if it is possible to define tokens in SWT text fields so that they are not accessible by symbol.
So, for example, I have a text box, and I want to make markers that match " [anytext] " not accessible by character. (Where the brackets define the token)
This means: I canβt put the cursor in the parenthesis, and if I press the delete button directly in front of the left bracket or backspace right behind the right bracket, the entire token is deleted.
I am currently doing this with listeners, but it seems a bit complicated and expensive, since I need a KeyListener with a lot of logic and a mouse listener to prevent clicks inside the marker and set Drop Listener as Drops inside the token should not be allowed obviously.
Did I just skip some fancy way of doing this?
Hope you help me, thanks!
source
share