Introducing MPS 2020.3

For several months we have been working on making MPS even more user-friendly and fixing the problems you reported to us. You can download the new MPS 2020.3 on our website or using the Toolbox application .







image







New generator macro



$CALL-SITE$. , SWITCH/CALL, . SWITCH/CALL . , template/switch Β«call site nodeΒ», , template/switch , .







reduce_Comment, Β« Β» reduce_MethodDeclaration:













, , call site node $CALL-SITE$ :













reduce_Expressions, ( ) ( , ). $CALL-SITE$ - , call site node:













The template and radio button declarations have a flag that is specifically toggled to indicate that the call site node should be used. It would be an error to use the $ CALL-SITE $ macro inside a template / switch that does not indicate the need to get $ CALL-SITE $. It is not necessary to provide an explicit CALL / SWITCH argument β€” the MPS generator can determine if the template / switch being called needs a call site, and evaluates the template, including macros, CALL / SWITCH before processing.







This functionality is useful in scenarios such as conditional casting, such as in expressions <strong>IF</strong> needCast (<strong>Type</strong>), ELSE







, or in transformations, when there are several sources of expression that can serve as input data, for example switch { <strong>case</strong> <strong>Double</strong> : <strong>Double</strong>.valueOf(expression); <strong>case</strong> <strong>Integer</strong> : <strong>Integer</strong>.valueOf(expression, 16); …}



. It is therefore impractical to have a dedicated switch / template for every case.



. Highlight Usages (Ctrl/Cmd+Shift+F7). , . , , . - Highlight Usages, , . .







MPS ( Highlight selected node).













switch- BaseLanguage



, switch case .













Project



Project , -. . Logical View.















- . , , , . Tests , β€” Java. , Java Language , -. , .







VCS



, . . .







Annotate cells:







:













Annotation, MPS , :













Diff



. : . . , :













, Diff :







. , Hide Unordered Moves.









MPS -. , MPS . Projects β€” , . Customization , , .















VCS



VCS , . Git, VCS :













, . Git β€” .







Commit and Push



β€” Commit Commit and Push… β€” Commit. , , Commit and Push.









. MPS , , .









. , . , . .







, . - .







!







MPS

The Drive to Develop








All Articles