How to insert comments into generator templates Follow
I'm writing a generator for a language. In the template class I want to use comments. If there is is a new line with a <statement> that's no problem: Ctrl-Space lets select the // for a remark (comment). But if there is a statement already like int i = 0; the only thing I can do with Ctrl-Space is "final". Inserting the // by hand does not work - it vanishes.
How can I transfor the int i = 0; into a comment?
How can I insert multi line comments (multi line remarks)?
Please sign in to leave a comment.
There is no way currently to transforma statement into a commented line:(
I've submitted two issues: http://jetbrains.net/tracker/issue/MPS-3571, http://jetbrains.net/tracker/issue/MPS-3572
But, you can wrap statement or group of adjacent statements into a multiline comment:
- select whole statement (use ctrl-shift+up/down to select adjacent statements)
- press ctrl-alt+T (same as 'surround with' in IntelliJ IDEA)
- choose /**/ in menu
Ok, until line comment transformation is available I'll use multiple line comments. Thanks!