Make and jump to new line in editor


I have a concept which looks like this. Both childs have 0..n cardinality and <constant> defined as empty cell.

[- {prop} %child1% %child2% ]

Now when the user finishes the input of prop string and then hits the enter key he is at the position %child1%. If the hits enter again, a new item of type child1 is created.

How can I pretend that behavior and jump to a new line instead of that behavior described? Also how can I let the user choose between child1 concept and child2 concept input? For now he has to move his cursor to the right to input child2.


Best regards


Comment actions Permalink


to catch the "enter/return" you need to add a new "cell action map" to the editor aspect, implement the INSERT action (and maybe INSERT_BEFORE). There you can specify behavior as you like it. Finally, you need to bind this action map to an editor, which will be the one for your concept above.

With regard to the second question, it's not clear to me what you mean with "choose", because moving the cursor means choosing?! Could you please give some details on what behavior you expect? Do you decide based on the property where to set the cursor?



Comment actions Permalink

Hey Ben!

The answer to my first question helped me. Thank you!

Regarding my second question let me elaborate and give a more concrete example. I have a concept "Person".

{name} %marriage partner 0..1% %insurance 0..1%

If a person has no marriage partner or insurance then it should only display "Chuck Norris"

If a person has some more details (e.g. insurance and or marriage partner) I want to let the user choose via CTRL+SPACE if he/she wants to enter a insurance or marriage partner concept.


Please sign in to leave a comment.