Eclipse has a feature where it automatically inserts things. (eg. closing curly braces after pressing ENTER on an opening curly brace)
This is found in Preferences > Java > Typing.
I would like to add a similar feature in a Plugin of mine that automatically closes DO-Blocks with an END statement and moves the cursor to inside the DO-Block.
I have already looked through the documentation of Eclipse but I can not seem to find a way to trigger an action on ENTER and with a context.
Is there a simple way to do this?