Multiline and free form text

Hi folks!

Disclaim: I've met MPS some time ago, so my question is definitely stupid.

I'm trying to create a DSL for a questionnaire content creation. The resulting language should be about so:

question 
    How are you?
    tip 
        The tip here is a quite simple. You should be honest! 
        We are not asking you because we want to be polite. 
        We REALLY want to know how are you.
    answers
        answer 
            I'm good!
        answer [setFlag yesterday]
            I'm good, but!
            tip
 Was yesterday better? 
 Choose this one!
        answer [setValue language=de]
            Was? Ich spreche nur Deutsch.

question [requiresFlag yesterday] And what was there?
    tip 
        Bla, bla, bla, et cetera and so on
    answers
        answer 
            Beer!
        answer
            Weather!

question [requiresValue language=de] Aber wir sprechen nicht! Tschüß!
    answers
        answer [setValue language=en]
            Ok, I'll learn English!
        answer [action accomplish]
            Tschüß!


I have no idea how to make a support of multiline and free form text. What I've done up to this moment - HELL! For example, as soon as I've finished typing the first line of the text, I should press ENTER and CTRL+SPACE then ENTER before I'll be able to type the second line. It is not really comfortable. Another issues are related to copy-paste: pasting the multiline block of text to the language editor and copying of the several lines of text from the editor.
Is it possible to make the editor be more user-friendly, or I'm expecting too much?

Thanks,
Ivan Eryshov.
0
1 comment
Hi!

For now you can handle Enter key on "low level" - by adding keymap to the corresponding cell (see inspector of this cell) in MPS editor definition. This keymap should handle Enter key and create appropriate model element.

Later (in MPS 2.0) this possibility will be moved to action map section.
0

Please sign in to leave a comment.