Using ModifyListener in XtextEditor [message #723444] |
Thu, 08 September 2011 11:08  |
Eclipse User |
|
|
|
Hello,
is there a service in XtextEditor that is similar to standard modify listener? I need to modify keyboard input as it is typed (replace character combinations with other characters). I thought value converters can do the trick, but firstly, as I understand they are used to parse a string to a datatype, and secondly, when I've written one for an EString rule it didn't have any effect, though debugging shows it should be working.
Regards,
Vitaly
|
|
|
|
|
|
Re: Using ModifyListener in XtextEditor [message #723755 is a reply to message #723727] |
Fri, 09 September 2011 07:16  |
Eclipse User |
|
|
|
Thanks again. It seems I need an AutoEditStrategy then. But it's really hard to understand how it works. I am looking at the implementation of MultiLineTerminalsEditStrategy and cannot get a clue of what's going on. No comments, no description in javadoc. Is there any documentation on AutoEditStrategies?
My problem seems quite trivial - changing a specific character or set of characters to another character, but this must be context sensitive, not as a shortcut edit stragegy i.e. I only need this to get triggered within an EString rule, as well as to have some timing before substitution to check if next character entered contributes to a different shortcut.
Regards,
Vitaly
|
|
|
Powered by
FUDForum. Page generated in 0.04411 seconds