Setting focus in editor
I have an intention that adds documentation using attributes, like the comment example for the calculator found here: http://confluence.jetbrains.com/display/MPSD30/Documentation+comments.
By default the focus stays where the intention was called, I tried to use editorContext.select*(..), but am not able to get the cursor to move to the start of the documentation text. Doe anyone know how to do this?
By default the focus stays where the intention was called, I tried to use editorContext.select*(..), but am not able to get the cursor to move to the start of the documentation text. Doe anyone know how to do this?
Please sign in to leave a comment.
execute(node, editorContext)->void { node.@comment = new initialized node<CommentAnnotation>(); editorContext.selectWRTFocusPolicy(node.@comment); }http://www.jetbrains.com/mps/whatsnew/index.html -> New way of handling editor selection