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?
2 comments
This works fine for me:
execute(node, editorContext)->void { 
  node.@comment = new initialized node<CommentAnnotation>(); 
  editorContext.selectWRTFocusPolicy(node.@comment); 
}
prettyPrint();
0
I suggest using node.select operation recently introduced in MPS:

http://www.jetbrains.com/mps/whatsnew/index.html -> New way of handling editor selection
0

Please sign in to leave a comment.