Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Comment out some Code
Permanently deleted user
Created
Hi,
is there a possibility to comment out some line of code in Behaviour/Constraint/Class etc.? It seems that i may only create a *new* remark and write my comment after that.
Now you can only comment/uncomment a part of a StatementList (e.g. you can comment sequential statements inside one method, but can't comment MethodDeclaration itself). Try using ctrl+shift+/ when several statements are selected.
This is an ability of baseLanguage, so you can use it everywhere in statement lists.
Are you aware about ctrl-alt-T (“surround with”) keyboard shortcut? If you select one or several adjacent statements and hit ctrl-alt-T, MPS will offer you a few “surround with” choices – block comment among them (nicknamed as /**/). The ctrl-alt-T is kind of our standard for the “surround with” through all languages in MPS as well as in Intellij IDEA. BTW, if you are planning to add “surround with” to your implementation of MPS C# language, then it would be nice if you use the same shortcut. For reference, see Statement_KeyMap node in baseLanguage’s editor model. Best – Igor.
Mirko,
Now you can only comment/uncomment a part of a StatementList (e.g. you can comment sequential statements inside one method, but can't comment MethodDeclaration itself). Try using ctrl+shift+/ when several statements are selected.
This is an ability of baseLanguage, so you can use it everywhere in statement lists.
Regards,
Mihail
Hey, very cool... I'd been wondering if this was possible! Thanks, Mihail! :-) That is a handy trick.
Are you aware about ctrl-alt-T (“surround with”) keyboard shortcut? If you select one or several adjacent statements and hit ctrl-alt-T, MPS will offer you a few “surround with” choices – block comment among them (nicknamed as /**/).
The ctrl-alt-T is kind of our standard for the “surround with” through all languages in MPS as well as in Intellij IDEA.
BTW, if you are planning to add “surround with” to your implementation of MPS C# language, then it would be nice if you use the same shortcut.
For reference, see Statement_KeyMap node in baseLanguage’s editor model.
Best – Igor.
Hi Mihail and Igor,
thx for those hints! Both work fine.
MIrko