From 35284e1e9a643626fe9f954950ef60f9e1b9c270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Thu, 19 Dec 2019 00:49:58 +0100 Subject: [PATCH] Initial commit --- .gitignore | 2 + .mps/.gitignore | 2 + .mps/migration.xml | 7 + .mps/misc.xml | 6 + .mps/modules.xml | 9 + languages/dynamicc/dynamicc.mpl | 70 + .../classes_gen/dynamicc/Generator.class | Bin 0 -> 2560 bytes .../generator/classes_gen/dynamicc/trace.info | 9 + .../classes_gen/main/QueriesGenerated.class | Bin 0 -> 419 bytes .../generator/classes_gen/main/trace.info | 9 + .../source_gen.caches/dynamicc/dependencies | 18 + .../source_gen.caches/dynamicc/generated | 5 + .../source_gen.caches/main/dependencies | 8 + .../source_gen.caches/main/generated | 5 + .../source_gen/dynamicc/Generator.java | 40 + .../generator/source_gen/dynamicc/trace.info | 9 + .../source_gen/main/QueriesGenerated.java | 13 + .../generator/source_gen/main/trace.info | 9 + .../generator/template/main@generator.mps | 24 + .../dynamicc/models/dynamicc.behavior.mps | 12 + .../dynamicc/models/dynamicc.constraints.mps | 19 + languages/dynamicc/models/dynamicc.editor.mps | 625 ++ .../dynamicc/models/dynamicc.intentions.mps | 523 ++ .../dynamicc/models/dynamicc.structure.mps | 315 + .../dynamicc/models/dynamicc.textGen.mps | 837 +++ .../dynamicc/models/dynamicc.typesystem.mps | 11 + .../dynamicc/sandbox/dynamicc.sandbox.msd | 17 + .../sandbox/models/dynamicc.sandbox.mps | 181 + .../dynamicc/sandbox/dependencies | 3 + .../dynamicc/sandbox/generated | 5 + .../source_gen/dynamicc/sandbox/TestModule.c | 18 + .../source_gen/dynamicc/sandbox/Types.c | 7 + .../source_gen/dynamicc/sandbox/trace.info | 3 + .../dynamicc/behavior/dependencies | 3 + .../dynamicc/behavior/generated | 3 + .../dynamicc/constraints/dependencies | 11 + .../dynamicc/constraints/generated | 5 + .../source_gen.caches/dynamicc/dependencies | 24 + .../dynamicc/editor/dependencies | 666 ++ .../dynamicc/editor/generated | 5 + .../source_gen.caches/dynamicc/generated | 5 + .../dynamicc/intentions/dependencies | 209 + .../dynamicc/intentions/generated | 5 + .../dynamicc/structure/dependencies | 39 + .../dynamicc/structure/generated | 5 + .../dynamicc/textGen/dependencies | 154 + .../dynamicc/textGen/generated | 5 + .../dynamicc/typesystem/dependencies | 7 + .../dynamicc/typesystem/generated | 5 + .../source_gen/dynamicc/Language.java | 66 + .../source_gen/dynamicc/behavior/trace.info | 3 + .../ConstraintsAspectDescriptor.java | 19 + .../aspectcps-descriptorclasses.mps | 160 + .../dynamicc/constraints/checkpoints | 7 + .../dynamicc/constraints/trace.info | 9 + .../dynamicc/editor/Assignment_Editor.java | 14 + .../editor/Assignment_EditorBuilder_a.java | 215 + .../dynamicc/editor/CCodeBlock_Editor.java | 14 + .../editor/CCodeBlock_EditorBuilder_a.java | 106 + .../dynamicc/editor/CCode_StyleSheet.java | 61 + .../dynamicc/editor/Cast_Editor.java | 14 + .../dynamicc/editor/Cast_EditorBuilder_a.java | 238 + .../dynamicc/editor/Common_StyleSheet.java | 36 + .../editor/EditorAspectDescriptorImpl.java | 67 + .../editor/FunctionParameter_Editor.java | 14 + .../FunctionParameter_EditorBuilder_a.java | 219 + .../FunctionParameter_SubstituteMenu.java | 97 + .../dynamicc/editor/Function_Editor.java | 14 + .../editor/Function_EditorBuilder_a.java | 472 ++ .../editor/Int10LiteralConcept_Editor.java | 14 + .../Int10LiteralConcept_EditorBuilder_a.java | 87 + .../dynamicc/editor/Module_Editor.java | 14 + .../editor/Module_EditorBuilder_a.java | 214 + .../editor/NewlineStatement_Editor.java | 14 + .../NewlineStatement_EditorBuilder_a.java | 39 + .../editor/SingleLineComment_Editor.java | 14 + .../SingleLineComment_EditorBuilder_a.java | 103 + .../dynamicc/editor/Type_Editor.java | 14 + .../dynamicc/editor/Type_EditorBuilder_a.java | 313 + .../dynamicc/editor/Type_StyleSheet.java | 39 + .../editor/VariableAccess_Editor.java | 14 + .../VariableAccess_EditorBuilder_a.java | 177 + .../editor/VariableAccess_SubstituteMenu.java | 97 + .../dynamicc/editor/Variable_Editor.java | 14 + .../editor/Variable_EditorBuilder_a.java | 322 + .../dynamicc/editor/Variable_StyleSheet.java | 53 + .../source_gen/dynamicc/editor/trace.info | 2926 ++++++++ .../intentions/AddAssignment_Intention.java | 69 + .../intentions/AddReturnType_Intention.java | 69 + .../intentions/IntentionsDescriptor.java | 85 + .../intentions/MakeNonNullable_Intention.java | 69 + .../intentions/MakeNullable_Intention.java | 69 + .../intentions/MakeStrong_Intention.java | 69 + .../intentions/MakeWeak_Intention.java | 69 + .../intentions/NotUseTypeFromC_Intention.java | 69 + .../RemoveAssignment_Intention.java | 69 + .../RemoveReturnType_Intention.java | 69 + .../intentions/UseTypeFromC_Intention.java | 69 + .../source_gen/dynamicc/intentions/trace.info | 747 ++ .../ConceptPresentationAspectImpl.java | 146 + .../structure/LanguageConceptSwitch.java | 57 + .../structure/StructureAspectDescriptor.java | 265 + .../structure/aspectcps-descriptorclasses.mps | 5847 +++++++++++++++ .../source_gen/dynamicc/structure/checkpoints | 7 + .../source_gen/dynamicc/structure/trace.info | 601 ++ .../dynamicc/textGen/Assignment_TextGen.java | 64 + .../dynamicc/textGen/CCodeBlock_TextGen.java | 24 + .../dynamicc/textGen/Cast_TextGen.java | 34 + .../textGen/FunctionParameter_TextGen.java | 30 + .../dynamicc/textGen/Function_TextGen.java | 54 + .../dynamicc/textGen/Module_TextGen.java | 36 + .../textGen/NewlineStatement_TextGen.java | 15 + .../textGen/SingleLineComment_TextGen.java | 24 + .../textGen/TextGenAspectDescriptor.java | 73 + .../dynamicc/textGen/Type_TextGen.java | 36 + .../textGen/VariableAccess_TextGen.java | 28 + .../dynamicc/textGen/Variable_TextGen.java | 44 + .../textGen/aspectcps-descriptorclasses.mps | 6533 +++++++++++++++++ .../source_gen/dynamicc/textGen/checkpoints | 7 + .../source_gen/dynamicc/textGen/trace.info | 388 + .../dynamicc/source_gen/dynamicc/trace.info | 9 + .../typesystem/TypesystemDescriptor.java | 10 + .../aspectcps-descriptorclasses.mps | 80 + .../dynamicc/typesystem/checkpoints | 7 + .../source_gen/dynamicc/typesystem/trace.info | 9 + 125 files changed, 26235 insertions(+) create mode 100644 .gitignore create mode 100644 .mps/.gitignore create mode 100644 .mps/migration.xml create mode 100644 .mps/misc.xml create mode 100644 .mps/modules.xml create mode 100644 languages/dynamicc/dynamicc.mpl create mode 100644 languages/dynamicc/generator/classes_gen/dynamicc/Generator.class create mode 100644 languages/dynamicc/generator/classes_gen/dynamicc/trace.info create mode 100644 languages/dynamicc/generator/classes_gen/main/QueriesGenerated.class create mode 100644 languages/dynamicc/generator/classes_gen/main/trace.info create mode 100644 languages/dynamicc/generator/source_gen.caches/dynamicc/dependencies create mode 100644 languages/dynamicc/generator/source_gen.caches/dynamicc/generated create mode 100644 languages/dynamicc/generator/source_gen.caches/main/dependencies create mode 100644 languages/dynamicc/generator/source_gen.caches/main/generated create mode 100644 languages/dynamicc/generator/source_gen/dynamicc/Generator.java create mode 100644 languages/dynamicc/generator/source_gen/dynamicc/trace.info create mode 100644 languages/dynamicc/generator/source_gen/main/QueriesGenerated.java create mode 100644 languages/dynamicc/generator/source_gen/main/trace.info create mode 100644 languages/dynamicc/generator/template/main@generator.mps create mode 100644 languages/dynamicc/models/dynamicc.behavior.mps create mode 100644 languages/dynamicc/models/dynamicc.constraints.mps create mode 100644 languages/dynamicc/models/dynamicc.editor.mps create mode 100644 languages/dynamicc/models/dynamicc.intentions.mps create mode 100644 languages/dynamicc/models/dynamicc.structure.mps create mode 100644 languages/dynamicc/models/dynamicc.textGen.mps create mode 100644 languages/dynamicc/models/dynamicc.typesystem.mps create mode 100644 languages/dynamicc/sandbox/dynamicc.sandbox.msd create mode 100644 languages/dynamicc/sandbox/models/dynamicc.sandbox.mps create mode 100644 languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/dependencies create mode 100644 languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/generated create mode 100644 languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/TestModule.c create mode 100644 languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/Types.c create mode 100644 languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/trace.info create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/behavior/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/behavior/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/constraints/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/constraints/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/editor/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/editor/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/intentions/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/intentions/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/structure/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/structure/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/textGen/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/textGen/generated create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/typesystem/dependencies create mode 100644 languages/dynamicc/source_gen.caches/dynamicc/typesystem/generated create mode 100644 languages/dynamicc/source_gen/dynamicc/Language.java create mode 100644 languages/dynamicc/source_gen/dynamicc/behavior/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/constraints/ConstraintsAspectDescriptor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/constraints/aspectcps-descriptorclasses.mps create mode 100644 languages/dynamicc/source_gen/dynamicc/constraints/checkpoints create mode 100644 languages/dynamicc/source_gen/dynamicc/constraints/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Assignment_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Assignment_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/CCode_StyleSheet.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Cast_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Cast_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Common_StyleSheet.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/EditorAspectDescriptorImpl.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_SubstituteMenu.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Function_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Function_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Module_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Module_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Type_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Type_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Type_StyleSheet.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_SubstituteMenu.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Variable_Editor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Variable_EditorBuilder_a.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/Variable_StyleSheet.java create mode 100644 languages/dynamicc/source_gen/dynamicc/editor/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/AddAssignment_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/AddReturnType_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/IntentionsDescriptor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/MakeNonNullable_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/MakeNullable_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/MakeStrong_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/MakeWeak_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/NotUseTypeFromC_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/RemoveAssignment_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/RemoveReturnType_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/UseTypeFromC_Intention.java create mode 100644 languages/dynamicc/source_gen/dynamicc/intentions/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/structure/ConceptPresentationAspectImpl.java create mode 100644 languages/dynamicc/source_gen/dynamicc/structure/LanguageConceptSwitch.java create mode 100644 languages/dynamicc/source_gen/dynamicc/structure/StructureAspectDescriptor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/structure/aspectcps-descriptorclasses.mps create mode 100644 languages/dynamicc/source_gen/dynamicc/structure/checkpoints create mode 100644 languages/dynamicc/source_gen/dynamicc/structure/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/Assignment_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/CCodeBlock_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/Cast_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/FunctionParameter_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/Function_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/Module_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/NewlineStatement_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/SingleLineComment_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/TextGenAspectDescriptor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/Type_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/VariableAccess_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/Variable_TextGen.java create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/aspectcps-descriptorclasses.mps create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/checkpoints create mode 100644 languages/dynamicc/source_gen/dynamicc/textGen/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/trace.info create mode 100644 languages/dynamicc/source_gen/dynamicc/typesystem/TypesystemDescriptor.java create mode 100644 languages/dynamicc/source_gen/dynamicc/typesystem/aspectcps-descriptorclasses.mps create mode 100644 languages/dynamicc/source_gen/dynamicc/typesystem/checkpoints create mode 100644 languages/dynamicc/source_gen/dynamicc/typesystem/trace.info diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4306712 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Project exclude paths +/languages/dynamicc/classes_gen/ \ No newline at end of file diff --git a/.mps/.gitignore b/.mps/.gitignore new file mode 100644 index 0000000..5c98b42 --- /dev/null +++ b/.mps/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml \ No newline at end of file diff --git a/.mps/migration.xml b/.mps/migration.xml new file mode 100644 index 0000000..ab36f91 --- /dev/null +++ b/.mps/migration.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.mps/misc.xml b/.mps/misc.xml new file mode 100644 index 0000000..8e3bf35 --- /dev/null +++ b/.mps/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.mps/modules.xml b/.mps/modules.xml new file mode 100644 index 0000000..3926cbb --- /dev/null +++ b/.mps/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/languages/dynamicc/dynamicc.mpl b/languages/dynamicc/dynamicc.mpl new file mode 100644 index 0000000..326f109 --- /dev/null +++ b/languages/dynamicc/dynamicc.mpl @@ -0,0 +1,70 @@ + + + + + + + + + + + f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage) + 1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/generator/classes_gen/dynamicc/Generator.class b/languages/dynamicc/generator/classes_gen/dynamicc/Generator.class new file mode 100644 index 0000000000000000000000000000000000000000..6678bf0c199b0d0c98ef0b8f35f597fe9fa4c359 GIT binary patch literal 2560 zcmbtWTTdHD6#fPq)@&RCE~IIb2B%zVE@o|Waln*@&_LW6LNFyIRI0}7v9sxV*P30U z^4ee2z9gts+Q&-$QB}{ZZEnF4ZDeV7F6a8qIp6s2e}4M|Ko;L?=wgVKj~rgJOw-s9 zj*#4UrG_xW(ktPYB)1&TsMS5A+CDU7!||<}Fm^?)ZgXF3y5)u~@{TWLT?${6GYmb; zmSg!V3_m9d=k0hkw=8VK=1#T2tHLO>COe{PdA>Z#T~)prMF;VdRB{u04B<8MsUw8m zD7w+ZaHC*3VyjUr3AxKlwjdM=uF35^E-kfgZHE1qmd7wyco(7^Lw`GmcIXVLs|Mdr zmZ8sc8`2bQ7#NJJ+Gqj5(0g(>4DrjgPw}8stHN*I*^a0PDIAmXpHEB_Tv;{FUzS@J z4zF7V-5Fi6QM{l=Al%+*hLLv;Ezct8RvpLnxo^1+AvbctCOq>QF*9XjqTImrR7v}{}1_C#j@=)Jt%AfeCuMnos`BE+IIB3HENv*zF-)aOXci*R?Ma|Np6v@ znGPhU;W5MHgBD%IYr=o&mg8gI%$OIiH9S8~d>5y8uOXedLxdK=H*F*p)Z<%S(7QNvi7N$HH@?&H9QzE{Nz43klh=b65%&nh5dC)mi7@q)(x}mD7h(DVk;$p) z08g=>tACc4`uF-6=DTgSo(~30EhZ|%?&H6DANJkJOjS%e)Vu*H>hYk8F zsexnMirsyU`2JteLdV$ng*HPtppk;v){qa}s=z>WtXxK$iY=Eno09mLzF~}Fj82t< zRkET&?VXB^#}cnGc`=8(6yb1S@Mcr+B!^z4kR~$>8O*lgeMl>1P7l4sLSgC{_f?>0 zF&QQN#?IK&TlTtXe+6HW{#>9j-><9srL_t(5g-rTi9P9li_QH|Y^%5*jy)|NqS literal 0 HcmV?d00001 diff --git a/languages/dynamicc/generator/classes_gen/dynamicc/trace.info b/languages/dynamicc/generator/classes_gen/dynamicc/trace.info new file mode 100644 index 0000000..bc2e7af --- /dev/null +++ b/languages/dynamicc/generator/classes_gen/dynamicc/trace.info @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/dynamicc/generator/classes_gen/main/QueriesGenerated.class b/languages/dynamicc/generator/classes_gen/main/QueriesGenerated.class new file mode 100644 index 0000000000000000000000000000000000000000..8f80254b722f8cad02c6d152d7d6aba4305a3269 GIT binary patch literal 419 zcmZ`#O-sW-5Ph4bt;TA#QapI_Ru#;p;GrU@pcI1mMeo~o&?(Js-E0c|S)K$B{s4cJ zI7!8WD9e1$d+eK!&$o8~$JnkTP-v%`O?;b^W6G|`kkg*Vb%YAt3HhOuaTceuEPh-L zt&2IGP2*>QEK15$xm9!>?=O6*8a2ikE_e>X$_#F@fQ^5;K$3emmI-H0x^plJUVax~F%t+0ES8_y~A z&73n9_A_Iw*Pg8r^26jmrEUp}e-6{b9z>ZO5E7Lrs)?^l)kPo~P&)`;vGO8WfHm=v bL`YUeLmtG+Ev#ds+-a766I&7st`_hGkgsU@ literal 0 HcmV?d00001 diff --git a/languages/dynamicc/generator/classes_gen/main/trace.info b/languages/dynamicc/generator/classes_gen/main/trace.info new file mode 100644 index 0000000..733e8cc --- /dev/null +++ b/languages/dynamicc/generator/classes_gen/main/trace.info @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/dynamicc/generator/source_gen.caches/dynamicc/dependencies b/languages/dynamicc/generator/source_gen.caches/dynamicc/dependencies new file mode 100644 index 0000000..d38a75d --- /dev/null +++ b/languages/dynamicc/generator/source_gen.caches/dynamicc/dependencies @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/generator/source_gen.caches/dynamicc/generated b/languages/dynamicc/generator/source_gen.caches/dynamicc/generated new file mode 100644 index 0000000..afc44ff --- /dev/null +++ b/languages/dynamicc/generator/source_gen.caches/dynamicc/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/generator/source_gen.caches/main/dependencies b/languages/dynamicc/generator/source_gen.caches/main/dependencies new file mode 100644 index 0000000..e6a9c2c --- /dev/null +++ b/languages/dynamicc/generator/source_gen.caches/main/dependencies @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/languages/dynamicc/generator/source_gen.caches/main/generated b/languages/dynamicc/generator/source_gen.caches/main/generated new file mode 100644 index 0000000..e946047 --- /dev/null +++ b/languages/dynamicc/generator/source_gen.caches/main/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/generator/source_gen/dynamicc/Generator.java b/languages/dynamicc/generator/source_gen/dynamicc/Generator.java new file mode 100644 index 0000000..86b3533 --- /dev/null +++ b/languages/dynamicc/generator/source_gen/dynamicc/Generator.java @@ -0,0 +1,40 @@ +package dynamicc; + +/*Generated by MPS */ + +import jetbrains.mps.generator.runtime.TemplateModuleInterpreted2; +import jetbrains.mps.smodel.language.LanguageRegistry; +import jetbrains.mps.smodel.language.LanguageRuntime; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.module.SModuleReference; +import org.jetbrains.mps.openapi.persistence.PersistenceFacade; +import main.QueriesGenerated; +import java.util.Collection; +import org.jetbrains.mps.openapi.language.SLanguage; +import java.util.Arrays; + +public class Generator extends TemplateModuleInterpreted2 { + + public Generator(LanguageRegistry languageRegistry, LanguageRuntime sourceLanguage, jetbrains.mps.smodel.Generator generator) { + super(languageRegistry, sourceLanguage, generator); + } + + @NotNull + @Override + public SModuleReference getModuleReference() { + return PersistenceFacade.getInstance().createModuleReference("2f2aeeba-5f76-43cb-9b06-df117bcc8ea2(dynamicc#01)"); + } + + @Override + protected void fillTemplateModels(TemplateModuleInterpreted2.TemplateModels models) { + models.templates("r:d757e312-acb5-4f30-bea2-4336c46123a4", QueriesGenerated.class); + } + + + @Override + public Collection getTargetLanguages() { + SLanguage[] rv = new SLanguage[0]; + return Arrays.asList(rv); + } + +} diff --git a/languages/dynamicc/generator/source_gen/dynamicc/trace.info b/languages/dynamicc/generator/source_gen/dynamicc/trace.info new file mode 100644 index 0000000..bc2e7af --- /dev/null +++ b/languages/dynamicc/generator/source_gen/dynamicc/trace.info @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/dynamicc/generator/source_gen/main/QueriesGenerated.java b/languages/dynamicc/generator/source_gen/main/QueriesGenerated.java new file mode 100644 index 0000000..9477023 --- /dev/null +++ b/languages/dynamicc/generator/source_gen/main/QueriesGenerated.java @@ -0,0 +1,13 @@ +package main; + +/*Generated by MPS */ + +import jetbrains.mps.generator.runtime.Generated; +import jetbrains.mps.generator.impl.query.QueryProviderBase; + +@Generated +public class QueriesGenerated extends QueryProviderBase { + public QueriesGenerated() { + super(1); + } +} diff --git a/languages/dynamicc/generator/source_gen/main/trace.info b/languages/dynamicc/generator/source_gen/main/trace.info new file mode 100644 index 0000000..733e8cc --- /dev/null +++ b/languages/dynamicc/generator/source_gen/main/trace.info @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/dynamicc/generator/template/main@generator.mps b/languages/dynamicc/generator/template/main@generator.mps new file mode 100644 index 0000000..ca0553c --- /dev/null +++ b/languages/dynamicc/generator/template/main@generator.mps @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.behavior.mps b/languages/dynamicc/models/dynamicc.behavior.mps new file mode 100644 index 0000000..c98b951 --- /dev/null +++ b/languages/dynamicc/models/dynamicc.behavior.mps @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.constraints.mps b/languages/dynamicc/models/dynamicc.constraints.mps new file mode 100644 index 0000000..07578e1 --- /dev/null +++ b/languages/dynamicc/models/dynamicc.constraints.mps @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.editor.mps b/languages/dynamicc/models/dynamicc.editor.mps new file mode 100644 index 0000000..5ecf34d --- /dev/null +++ b/languages/dynamicc/models/dynamicc.editor.mps @@ -0,0 +1,625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.intentions.mps b/languages/dynamicc/models/dynamicc.intentions.mps new file mode 100644 index 0000000..602dc4a --- /dev/null +++ b/languages/dynamicc/models/dynamicc.intentions.mps @@ -0,0 +1,523 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.structure.mps b/languages/dynamicc/models/dynamicc.structure.mps new file mode 100644 index 0000000..21a229d --- /dev/null +++ b/languages/dynamicc/models/dynamicc.structure.mps @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.textGen.mps b/languages/dynamicc/models/dynamicc.textGen.mps new file mode 100644 index 0000000..a4733c1 --- /dev/null +++ b/languages/dynamicc/models/dynamicc.textGen.mps @@ -0,0 +1,837 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/models/dynamicc.typesystem.mps b/languages/dynamicc/models/dynamicc.typesystem.mps new file mode 100644 index 0000000..8152f5c --- /dev/null +++ b/languages/dynamicc/models/dynamicc.typesystem.mps @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/languages/dynamicc/sandbox/dynamicc.sandbox.msd b/languages/dynamicc/sandbox/dynamicc.sandbox.msd new file mode 100644 index 0000000..e4a9d98 --- /dev/null +++ b/languages/dynamicc/sandbox/dynamicc.sandbox.msd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/sandbox/models/dynamicc.sandbox.mps b/languages/dynamicc/sandbox/models/dynamicc.sandbox.mps new file mode 100644 index 0000000..a290789 --- /dev/null +++ b/languages/dynamicc/sandbox/models/dynamicc.sandbox.mps @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/dependencies b/languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/dependencies new file mode 100644 index 0000000..71ea00a --- /dev/null +++ b/languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/dependencies @@ -0,0 +1,3 @@ + + + diff --git a/languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/generated b/languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/generated new file mode 100644 index 0000000..4678068 --- /dev/null +++ b/languages/dynamicc/sandbox/source_gen.caches/dynamicc/sandbox/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/TestModule.c b/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/TestModule.c new file mode 100644 index 0000000..c17a5c7 --- /dev/null +++ b/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/TestModule.c @@ -0,0 +1,18 @@ +/*This is an example module*/ + +typedef byte8 uint8_t; +typedef byte16 uint16_t; +typedef string char*; + +byte16 test; +const byte8 test2 = test; + +byte16 testFunction(byte16 param1, byte16 param2) { +const byte8 a; +// this is unchecked inline C code + +a += 5; + +a = 4; +test = ((byte16) test2); +} diff --git a/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/Types.c b/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/Types.c new file mode 100644 index 0000000..8bca51e --- /dev/null +++ b/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/Types.c @@ -0,0 +1,7 @@ +/*a.b.types*/ + +// define types that are directly borrowed from C99 +typedef int8 int8_t; +typedef int16 int16_t; + +typedef uint8 uint8_t; diff --git a/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/trace.info b/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/trace.info new file mode 100644 index 0000000..08125b9 --- /dev/null +++ b/languages/dynamicc/sandbox/source_gen/dynamicc/sandbox/trace.info @@ -0,0 +1,3 @@ + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/behavior/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/behavior/dependencies new file mode 100644 index 0000000..71ea00a --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/behavior/dependencies @@ -0,0 +1,3 @@ + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/behavior/generated b/languages/dynamicc/source_gen.caches/dynamicc/behavior/generated new file mode 100644 index 0000000..6b6b36e --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/behavior/generated @@ -0,0 +1,3 @@ + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/constraints/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/constraints/dependencies new file mode 100644 index 0000000..290d4f6 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/constraints/dependencies @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/constraints/generated b/languages/dynamicc/source_gen.caches/dynamicc/constraints/generated new file mode 100644 index 0000000..cf34067 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/constraints/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/dependencies new file mode 100644 index 0000000..879c8e8 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/dependencies @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/editor/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/editor/dependencies new file mode 100644 index 0000000..9e3db4d --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/editor/dependencies @@ -0,0 +1,666 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/editor/generated b/languages/dynamicc/source_gen.caches/dynamicc/editor/generated new file mode 100644 index 0000000..81a8700 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/editor/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/generated b/languages/dynamicc/source_gen.caches/dynamicc/generated new file mode 100644 index 0000000..2d666af --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/intentions/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/intentions/dependencies new file mode 100644 index 0000000..34911ed --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/intentions/dependencies @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/intentions/generated b/languages/dynamicc/source_gen.caches/dynamicc/intentions/generated new file mode 100644 index 0000000..13672b2 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/intentions/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/structure/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/structure/dependencies new file mode 100644 index 0000000..41172c1 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/structure/dependencies @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/structure/generated b/languages/dynamicc/source_gen.caches/dynamicc/structure/generated new file mode 100644 index 0000000..29383e9 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/structure/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/textGen/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/textGen/dependencies new file mode 100644 index 0000000..21a360b --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/textGen/dependencies @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/textGen/generated b/languages/dynamicc/source_gen.caches/dynamicc/textGen/generated new file mode 100644 index 0000000..a7e3b59 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/textGen/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/typesystem/dependencies b/languages/dynamicc/source_gen.caches/dynamicc/typesystem/dependencies new file mode 100644 index 0000000..5cb3def --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/typesystem/dependencies @@ -0,0 +1,7 @@ + + + + + + + diff --git a/languages/dynamicc/source_gen.caches/dynamicc/typesystem/generated b/languages/dynamicc/source_gen.caches/dynamicc/typesystem/generated new file mode 100644 index 0000000..4fe12c6 --- /dev/null +++ b/languages/dynamicc/source_gen.caches/dynamicc/typesystem/generated @@ -0,0 +1,5 @@ + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/Language.java b/languages/dynamicc/source_gen/dynamicc/Language.java new file mode 100644 index 0000000..739cee6 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/Language.java @@ -0,0 +1,66 @@ +package dynamicc; + +/*Generated by MPS */ + +import jetbrains.mps.smodel.language.LanguageRuntime; +import jetbrains.mps.smodel.adapter.ids.SLanguageId; +import java.util.Collection; +import org.jetbrains.mps.openapi.language.SLanguage; +import jetbrains.mps.smodel.runtime.ILanguageAspect; +import jetbrains.mps.openapi.editor.descriptor.EditorAspectDescriptor; +import dynamicc.editor.EditorAspectDescriptorImpl; +import jetbrains.mps.openapi.intentions.IntentionAspectDescriptor; +import dynamicc.intentions.IntentionsDescriptor; +import jetbrains.mps.smodel.runtime.StructureAspectDescriptor; +import jetbrains.mps.smodel.runtime.ConceptPresentationAspect; +import dynamicc.structure.ConceptPresentationAspectImpl; +import jetbrains.mps.text.rt.TextGenAspectDescriptor; + +public class Language extends LanguageRuntime { + private final SLanguageId myId; + + public Language() { + myId = SLanguageId.deserialize("a6d9727f-4982-4bf8-abdd-083fea5126ab"); + } + + @Override + public String getNamespace() { + return "dynamicc"; + } + + @Override + public int getVersion() { + return 0; + } + + public SLanguageId getId() { + return myId; + } + + @Override + protected void fillExtendedLanguages(Collection extendedLanguages) { + } + + @Override + protected T createAspect(Class aspectClass) { + + + // AP: legacy part, must be migrated from switch: please use lang.descriptor mapping label + if (aspectClass == EditorAspectDescriptor.class) { + return aspectClass.cast(new EditorAspectDescriptorImpl()); + } + if (aspectClass == IntentionAspectDescriptor.class) { + return aspectClass.cast(new IntentionsDescriptor()); + } + if (aspectClass == StructureAspectDescriptor.class) { + return aspectClass.cast(new dynamicc.structure.StructureAspectDescriptor()); + } + if (aspectClass == ConceptPresentationAspect.class) { + return aspectClass.cast(new ConceptPresentationAspectImpl()); + } + if (aspectClass == TextGenAspectDescriptor.class) { + return aspectClass.cast(new dynamicc.textGen.TextGenAspectDescriptor()); + } + return null; + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/behavior/trace.info b/languages/dynamicc/source_gen/dynamicc/behavior/trace.info new file mode 100644 index 0000000..08125b9 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/behavior/trace.info @@ -0,0 +1,3 @@ + + + diff --git a/languages/dynamicc/source_gen/dynamicc/constraints/ConstraintsAspectDescriptor.java b/languages/dynamicc/source_gen/dynamicc/constraints/ConstraintsAspectDescriptor.java new file mode 100644 index 0000000..ad048ad --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/constraints/ConstraintsAspectDescriptor.java @@ -0,0 +1,19 @@ +package dynamicc.constraints; + +/*Generated by MPS */ + +import jetbrains.mps.smodel.runtime.BaseConstraintsAspectDescriptor; +import jetbrains.mps.smodel.runtime.ConstraintsDescriptor; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.smodel.runtime.base.BaseConstraintsDescriptor; + +public class ConstraintsAspectDescriptor extends BaseConstraintsAspectDescriptor { + public ConstraintsAspectDescriptor() { + } + + @Override + public ConstraintsDescriptor getConstraints(SAbstractConcept concept) { + SAbstractConcept cncpt = concept; + return new BaseConstraintsDescriptor(concept); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/constraints/aspectcps-descriptorclasses.mps b/languages/dynamicc/source_gen/dynamicc/constraints/aspectcps-descriptorclasses.mps new file mode 100644 index 0000000..8ec3f7b --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/constraints/aspectcps-descriptorclasses.mps @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/constraints/checkpoints b/languages/dynamicc/source_gen/dynamicc/constraints/checkpoints new file mode 100644 index 0000000..1c3d505 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/constraints/checkpoints @@ -0,0 +1,7 @@ + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/constraints/trace.info b/languages/dynamicc/source_gen/dynamicc/constraints/trace.info new file mode 100644 index 0000000..ac82c86 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/constraints/trace.info @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Assignment_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Assignment_Editor.java new file mode 100644 index 0000000..3e4fa86 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Assignment_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Assignment_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Assignment_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Assignment_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Assignment_EditorBuilder_a.java new file mode 100644 index 0000000..b790fd8 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Assignment_EditorBuilder_a.java @@ -0,0 +1,215 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler; +import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; +import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap; +import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Assignment_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Assignment_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_qrfxcf_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createRefNodeList_0()); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createRefNodeList_1()); + return editorCell; + } + private EditorCell createRefNodeList_0() { + AbstractCellListHandler handler = new variablesListHandler_qrfxcf_a0(myNode, getEditorContext()); + EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); + editorCell.setCellId("refNodeList_variables"); + editorCell.setSRole(handler.getElementSRole()); + return editorCell; + } + private static class variablesListHandler_qrfxcf_a0 extends RefNodeListHandler { + @NotNull + private SNode myNode; + + public variablesListHandler_qrfxcf_a0(SNode ownerNode, EditorContext context) { + super(context, false); + myNode = ownerNode; + } + + @NotNull + public SNode getNode() { + return myNode; + } + public SContainmentLink getSLink() { + return LINKS.variables$hrz_; + } + public SAbstractConcept getChildSConcept() { + return CONCEPTS.VariableAccess$Q8; + } + + public EditorCell createNodeCell(SNode elementNode) { + EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); + installElementCellActions(elementNode, elementCell, false); + return elementCell; + } + public EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(variablesListHandler_qrfxcf_a0.this.getNode(), LINKS.variables$hrz_)); + try { + EditorCell emptyCell = null; + emptyCell = super.createEmptyCell(); + installElementCellActions(null, emptyCell, true); + setCellContext(emptyCell); + return emptyCell; + } finally { + getCellFactory().popCellContext(); + } + } + public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) { + if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) { + elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET); + if (elementNode != null) { + elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ",")); + } + if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell))); + } + } + } + @Override + public EditorCell createSeparatorCell(SNode prevNode, SNode nextNode) { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), getNode(), ","); + editorCell.setSelectable(false); + Style style = new StyleImpl(); + style.set(StyleAttributes.LAYOUT_CONSTRAINT, ""); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + return editorCell; + } + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + return editorCell; + } + private EditorCell createRefNodeList_1() { + AbstractCellListHandler handler = new expressionListHandler_qrfxcf_c0(myNode, getEditorContext()); + EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); + editorCell.setCellId("refNodeList_expression"); + editorCell.setSRole(handler.getElementSRole()); + return editorCell; + } + private static class expressionListHandler_qrfxcf_c0 extends RefNodeListHandler { + @NotNull + private SNode myNode; + + public expressionListHandler_qrfxcf_c0(SNode ownerNode, EditorContext context) { + super(context, false); + myNode = ownerNode; + } + + @NotNull + public SNode getNode() { + return myNode; + } + public SContainmentLink getSLink() { + return LINKS.expression$jjgu; + } + public SAbstractConcept getChildSConcept() { + return CONCEPTS.Expression$BS; + } + + public EditorCell createNodeCell(SNode elementNode) { + EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); + installElementCellActions(elementNode, elementCell, false); + return elementCell; + } + public EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(expressionListHandler_qrfxcf_c0.this.getNode(), LINKS.expression$jjgu)); + try { + EditorCell emptyCell = null; + emptyCell = super.createEmptyCell(); + installElementCellActions(null, emptyCell, true); + setCellContext(emptyCell); + return emptyCell; + } finally { + getCellFactory().popCellContext(); + } + } + public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) { + if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) { + elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET); + if (elementNode != null) { + elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ",")); + } + if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell))); + } + } + } + @Override + public EditorCell createSeparatorCell(SNode prevNode, SNode nextNode) { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), getNode(), ","); + editorCell.setSelectable(false); + Style style = new StyleImpl(); + style.set(StyleAttributes.LAYOUT_CONSTRAINT, ""); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + return editorCell; + } + } + + private static final class LINKS { + /*package*/ static final SContainmentLink variables$hrz_ = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedd030L, 0x45b716564adf2d6fL, "variables"); + /*package*/ static final SContainmentLink expression$jjgu = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedd030L, 0x26ea02d22aedd033L, "expression"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept VariableAccess$Q8 = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, "dynamicc.structure.VariableAccess"); + /*package*/ static final SConcept Expression$BS = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L, "dynamicc.structure.Expression"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_Editor.java new file mode 100644 index 0000000..4851edb --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class CCodeBlock_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new CCodeBlock_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_EditorBuilder_a.java new file mode 100644 index 0000000..ede6f74 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/CCodeBlock_EditorBuilder_a.java @@ -0,0 +1,106 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import dynamicc.editor.CCode_StyleSheet.c_code_blockStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class CCodeBlock_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public CCodeBlock_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_xdyk7_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createProperty_0()); + return editorCell; + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.code_block$Mrpb; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_code_block"); + Style style = new StyleImpl(); + new c_code_blockStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + + private static final class PROPS { + /*package*/ static final SProperty code_block$Mrpb = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae8452fL, 0x26ea02d22ae84530L, "code_block"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/CCode_StyleSheet.java b/languages/dynamicc/source_gen/dynamicc/editor/CCode_StyleSheet.java new file mode 100644 index 0000000..6782ef4 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/CCode_StyleSheet.java @@ -0,0 +1,61 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.editor.runtime.style.AbstractStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.openapi.editor.style.StyleRegistry; +import jetbrains.mps.nodeEditor.MPSColors; +import jetbrains.mps.nodeEditor.MPSFonts; + +public class CCode_StyleSheet { + /** + * + * @deprecated Since MPS 3.5 use generated StyleClass + */ + @Deprecated + public static void apply_ctype(Style style, EditorCell editorCell) { + SNode node = (editorCell == null ? null : editorCell.getSNode()); + EditorContext editorContext = (editorCell == null ? null : editorCell.getContext()); + new ctypeStyleClass(editorContext, node).apply(style, editorCell); + } + /** + * + * @deprecated Since MPS 3.5 use generated StyleClass + */ + @Deprecated + public static void apply_c_code_block(Style style, EditorCell editorCell) { + SNode node = (editorCell == null ? null : editorCell.getSNode()); + EditorContext editorContext = (editorCell == null ? null : editorCell.getContext()); + new c_code_blockStyleClass(editorContext, node).apply(style, editorCell); + } + + public static class ctypeStyleClass extends AbstractStyleClass { + public ctypeStyleClass(EditorContext editorContext, SNode node) { + super(editorContext, node); + } + + @Override + public void apply(Style style, EditorCell editorCell) { + style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.yellow)); + style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD); + } + + } + public static class c_code_blockStyleClass extends AbstractStyleClass { + public c_code_blockStyleClass(EditorContext editorContext, SNode node) { + super(editorContext, node); + } + + @Override + public void apply(Style style, EditorCell editorCell) { + style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.yellow)); + style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN); + } + + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Cast_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Cast_Editor.java new file mode 100644 index 0000000..4d518e0 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Cast_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Cast_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Cast_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Cast_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Cast_EditorBuilder_a.java new file mode 100644 index 0000000..f41d6d6 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Cast_EditorBuilder_a.java @@ -0,0 +1,238 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart; +import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; +import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider; +import jetbrains.mps.util.Computable; +import jetbrains.mps.editor.runtime.impl.CellUtil; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import dynamicc.editor.Type_StyleSheet.TypeNameStyleClass; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Cast_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Cast_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_ba7vhy_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createRefNode_0()); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createRefCell_0()); + return editorCell; + } + private EditorCell createRefNode_0() { + SingleRoleCellProvider provider = new expressionSingleRoleHandler_ba7vhy_a0(myNode, LINKS.expression$nPT1, getEditorContext()); + return provider.createCell(); + } + private static class expressionSingleRoleHandler_ba7vhy_a0 extends SingleRoleCellProvider { + @NotNull + private SNode myNode; + + public expressionSingleRoleHandler_ba7vhy_a0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) { + super(containmentLink, context); + myNode = ownerNode; + } + + @Override + @NotNull + public SNode getNode() { + return myNode; + } + + protected EditorCell createChildCell(SNode child) { + EditorCell editorCell = getUpdateSession().updateChildNodeCell(child); + editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), LINKS.expression$nPT1, child)); + editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), LINKS.expression$nPT1, child)); + installCellInfo(child, editorCell, false); + return editorCell; + } + + + + private void installCellInfo(SNode child, EditorCell editorCell, boolean isEmpty) { + if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + editorCell.setSubstituteInfo((isEmpty ? new SEmptyContainmentSubstituteInfo(editorCell) : new SChildSubstituteInfo(editorCell))); + } + if (editorCell.getSRole() == null) { + editorCell.setSRole(LINKS.expression$nPT1); + } + } + @Override + protected EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), LINKS.expression$nPT1)); + try { + EditorCell editorCell = super.createEmptyCell(); + editorCell.setCellId("empty_expression"); + installCellInfo(null, editorCell, true); + setCellContext(editorCell); + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + protected String getNoTargetText() { + return ""; + } + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + return editorCell; + } + private EditorCell createRefCell_0() { + final SReferenceLink referenceLink = LINKS.type$LtG9; + SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) { + protected EditorCell createReferenceCell(final SNode targetNode) { + EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable() { + public EditorCell compute() { + return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell(); + } + }, targetNode, LINKS.type$LtG9); + CellUtil.setupIDeprecatableStyles(targetNode, cell); + setSemanticNodeToCells(cell, getNode()); + installDeleteActions_notnull(cell); + return cell; + } + }; + + provider.setNoTargetText(""); + EditorCell editorCell = provider.createCell(); + + if (editorCell.getSRole() == null) { + editorCell.setReferenceCell(true); + editorCell.setSRole(LINKS.type$LtG9); + } + editorCell.setSubstituteInfo(new SReferenceSubstituteInfo(editorCell, referenceLink)); + Iterable referenceAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.LinkAttribute$7j); + Iterable currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink); + } + }); + if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell); + } else + return editorCell; + } + /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + private SNode myReferencingNode; + + /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { + super(context); + myReferencingNode = referencingNode; + myNode = node; + } + + /*package*/ EditorCell createCell() { + return createProperty_0(); + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + new TypeNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + } + + private static final class LINKS { + /*package*/ static final SContainmentLink expression$nPT1 = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedb9e6L, 0x26ea02d22aedd9c8L, "expression"); + /*package*/ static final SReferenceLink type$LtG9 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedb9e6L, 0x26ea02d22aedb9e9L, "type"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept LinkAttribute$7j = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute"); + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Common_StyleSheet.java b/languages/dynamicc/source_gen/dynamicc/editor/Common_StyleSheet.java new file mode 100644 index 0000000..2c2a14d --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Common_StyleSheet.java @@ -0,0 +1,36 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.editor.runtime.style.AbstractStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.nodeEditor.MPSFonts; + +public class Common_StyleSheet { + /** + * + * @deprecated Since MPS 3.5 use generated StyleClass + */ + @Deprecated + public static void apply_Text(Style style, EditorCell editorCell) { + SNode node = (editorCell == null ? null : editorCell.getSNode()); + EditorContext editorContext = (editorCell == null ? null : editorCell.getContext()); + new TextStyleClass(editorContext, node).apply(style, editorCell); + } + + public static class TextStyleClass extends AbstractStyleClass { + public TextStyleClass(EditorContext editorContext, SNode node) { + super(editorContext, node); + } + + @Override + public void apply(Style style, EditorCell editorCell) { + style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN); + } + + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/EditorAspectDescriptorImpl.java b/languages/dynamicc/source_gen/dynamicc/editor/EditorAspectDescriptorImpl.java new file mode 100644 index 0000000..08d77e5 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/EditorAspectDescriptorImpl.java @@ -0,0 +1,67 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.EditorAspectDescriptorBase; +import org.jetbrains.annotations.NotNull; +import java.util.Collection; +import jetbrains.mps.openapi.editor.descriptor.ConceptEditor; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import java.util.Collections; +import jetbrains.mps.openapi.editor.descriptor.SubstituteMenu; +import jetbrains.mps.lang.smodel.ConceptSwitchIndex; +import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder; +import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; + +public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase { + @NotNull + public Collection getDeclaredEditors(SAbstractConcept concept) { + SAbstractConcept cncpt = ((SAbstractConcept) concept); + switch (conceptIndex.index(cncpt)) { + case 0: + return Collections.singletonList(new Assignment_Editor()); + case 1: + return Collections.singletonList(new CCodeBlock_Editor()); + case 2: + return Collections.singletonList(new Cast_Editor()); + case 3: + return Collections.singletonList(new Function_Editor()); + case 4: + return Collections.singletonList(new FunctionParameter_Editor()); + case 5: + return Collections.singletonList(new Int10LiteralConcept_Editor()); + case 6: + return Collections.singletonList(new Module_Editor()); + case 7: + return Collections.singletonList(new NewlineStatement_Editor()); + case 8: + return Collections.singletonList(new SingleLineComment_Editor()); + case 9: + return Collections.singletonList(new Type_Editor()); + case 10: + return Collections.singletonList(new Variable_Editor()); + case 11: + return Collections.singletonList(new VariableAccess_Editor()); + default: + } + return Collections.emptyList(); + } + + + @NotNull + @Override + public Collection getDeclaredDefaultSubstituteMenus(SAbstractConcept concept) { + SAbstractConcept cncpt = concept; + switch (conceptIndex1.index(cncpt)) { + case 0: + return Collections.singletonList(new FunctionParameter_SubstituteMenu()); + case 1: + return Collections.singletonList(new VariableAccess_SubstituteMenu()); + default: + } + return Collections.emptyList(); + } + + private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedd030L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae8452fL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedb9e6L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503eaL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x45b716564ae56561L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c342652L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22af0da98L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L)).seal(); + private static final ConceptSwitchIndex conceptIndex1 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503eaL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L)).seal(); +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_Editor.java new file mode 100644 index 0000000..e549cfb --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class FunctionParameter_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new FunctionParameter_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_EditorBuilder_a.java new file mode 100644 index 0000000..d493d93 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_EditorBuilder_a.java @@ -0,0 +1,219 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import dynamicc.editor.Variable_StyleSheet.VariableNameStyleClass; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; +import dynamicc.editor.Common_StyleSheet.TextStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider; +import jetbrains.mps.util.Computable; +import jetbrains.mps.editor.runtime.impl.CellUtil; +import jetbrains.mps.nodeEditor.cells.EditorCell_Error; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfoSmartReferenceDecorator; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo; +import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor; +import dynamicc.editor.Type_StyleSheet.TypeNameStyleClass; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class FunctionParameter_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public FunctionParameter_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_r9vhx9_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createProperty_0()); + editorCell.addEditorCell(createConstant_0()); + editorCell.addEditorCell(createRefCell_0()); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + new VariableNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createConstant_0() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); + editorCell.setCellId("Constant_r9vhx9_b0"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createRefCell_0() { + final SReferenceLink referenceLink = LINKS.type$YYfM; + SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) { + protected EditorCell createReferenceCell(final SNode targetNode) { + EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable() { + public EditorCell compute() { + return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell(); + } + }, targetNode, LINKS.type$YYfM); + CellUtil.setupIDeprecatableStyles(targetNode, cell); + setSemanticNodeToCells(cell, getNode()); + installDeleteActions_notnull_smartReference(cell); + return cell; + } + @Override + protected EditorCell createErrorCell(String error) { + EditorCell_Error cell = new EditorCell_Error(getEditorContext(), getNode(), error, true); + cell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(getNode(), CellAction_DeleteNode.DeleteDirection.FORWARD)); + cell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(getNode(), CellAction_DeleteNode.DeleteDirection.BACKWARD)); + return cell; + } + }; + + provider.setNoTargetText(""); + EditorCell editorCell = provider.createCell(); + + if (editorCell.getSRole() == null) { + editorCell.setReferenceCell(true); + editorCell.setSRole(LINKS.type$YYfM); + } + editorCell.setSubstituteInfo(new SReferenceSubstituteInfoSmartReferenceDecorator(new SReferenceSubstituteInfo(editorCell, referenceLink))); + Iterable referenceAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.LinkAttribute$7j); + Iterable currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink); + } + }); + if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell); + } else + return editorCell; + } + /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + private SNode myReferencingNode; + + /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { + super(context); + myReferencingNode = referencingNode; + myNode = node; + } + + /*package*/ EditorCell createCell() { + return createProperty_1(); + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + private EditorCell createProperty_1() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name1"); + Style style = new StyleImpl(); + new TypeNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + /*package*/ static final SConcept LinkAttribute$7j = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink type$YYfM = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c345a7cL, "type"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_SubstituteMenu.java b/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_SubstituteMenu.java new file mode 100644 index 0000000..ff2f522 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/FunctionParameter_SubstituteMenu.java @@ -0,0 +1,97 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.menus.substitute.SubstituteMenuBase; +import org.jetbrains.annotations.NotNull; +import java.util.List; +import jetbrains.mps.lang.editor.menus.MenuPart; +import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuItem; +import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuContext; +import java.util.ArrayList; +import jetbrains.mps.lang.editor.menus.substitute.ConstraintsFilteringSubstituteMenuPartDecorator; +import jetbrains.mps.lang.editor.menus.EditorMenuDescriptorBase; +import jetbrains.mps.smodel.SNodePointer; +import jetbrains.mps.lang.editor.menus.substitute.ReferenceScopeSubstituteMenuPart; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.lang.editor.menus.ConceptMenusPart; +import java.util.Collection; +import jetbrains.mps.smodel.ConceptDescendantsCache; +import jetbrains.mps.lang.editor.menus.substitute.DefaultSubstituteMenuLookup; +import jetbrains.mps.smodel.language.LanguageRegistry; +import org.jetbrains.mps.openapi.language.SConcept; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SReferenceLink; + +public class FunctionParameter_SubstituteMenu extends SubstituteMenuBase { + @NotNull + @Override + protected List> getParts(final SubstituteMenuContext _context) { + List> result = new ArrayList>(); + result.add(new ConstraintsFilteringSubstituteMenuPartDecorator(new SMP_ReferenceScope_w5syfn_a(), CONCEPTS.FunctionParameter$AW)); + result.add(new SMP_Subconcepts_w5syfn_b()); + return result; + } + + @NotNull + @Override + public List createMenuItems(@NotNull SubstituteMenuContext context) { + context.getEditorMenuTrace().pushTraceInfo(); + context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("default substitute menu for FunctionParameter. Generated from implicit smart reference attribute.", new SNodePointer("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)", "2804056819677594602"))); + try { + return super.createMenuItems(context); + } finally { + context.getEditorMenuTrace().popTraceInfo(); + } + } + + + public class SMP_ReferenceScope_w5syfn_a extends ReferenceScopeSubstituteMenuPart { + + public SMP_ReferenceScope_w5syfn_a() { + // that cast is needed for prevent the users from https://youtrack.jetbrains.com/issue/MPS-29051 + super((SAbstractConcept) CONCEPTS.FunctionParameter$AW, LINKS.type$YYfM); + } + @NotNull + @Override + public List createItems(SubstituteMenuContext context) { + context.getEditorMenuTrace().pushTraceInfo(); + context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("reference scope substitute menu part", null)); + try { + return super.createItems(context); + } finally { + context.getEditorMenuTrace().popTraceInfo(); + } + } + + } + public class SMP_Subconcepts_w5syfn_b extends ConceptMenusPart { + protected Collection getConcepts(final SubstituteMenuContext _context) { + return ConceptDescendantsCache.getInstance().getDirectDescendants(CONCEPTS.FunctionParameter$AW); + } + @NotNull + @Override + public List createItems(SubstituteMenuContext context) { + context.getEditorMenuTrace().pushTraceInfo(); + context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct subconcepts of " + "FunctionParameter", null)); + try { + return super.createItems(context); + } finally { + context.getEditorMenuTrace().popTraceInfo(); + } + } + + @Override + protected Collection createItemsForConcept(SubstituteMenuContext context, SAbstractConcept concept) { + return context.createItems(new DefaultSubstituteMenuLookup(LanguageRegistry.getInstance(context.getEditorContext().getRepository()), concept)); + } + } + + private static final class CONCEPTS { + /*package*/ static final SConcept FunctionParameter$AW = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503eaL, "dynamicc.structure.FunctionParameter"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink type$YYfM = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c345a7cL, "type"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Function_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Function_Editor.java new file mode 100644 index 0000000..efd2d9b --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Function_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Function_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Function_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Function_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Function_EditorBuilder_a.java new file mode 100644 index 0000000..c34ec79 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Function_EditorBuilder_a.java @@ -0,0 +1,472 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.nodeEditor.BlockCells; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Horizontal; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import dynamicc.editor.Common_StyleSheet.TextStyleClass; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; +import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler; +import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; +import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap; +import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider; +import jetbrains.mps.util.Computable; +import jetbrains.mps.editor.runtime.impl.CellUtil; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo; +import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor; +import dynamicc.editor.Type_StyleSheet.TypeNameStyleClass; +import jetbrains.mps.nodeEditor.MPSFonts; +import jetbrains.mps.nodeEditor.cells.EditorCell_Indent; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Function_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Function_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); + editorCell.setCellId("Collection_y1p9lm_a"); + editorCell.setBig(true); + setCellContext(editorCell); + Style style = new StyleImpl(); + style.set(StyleAttributes.SELECTABLE, false); + editorCell.getStyle().putAll(style); + editorCell.addEditorCell(createCollection_1()); + editorCell.addEditorCell(createCollection_4()); + if (nodeCondition_y1p9lm_a2a()) { + editorCell.addEditorCell(createConstant_4()); + } + return editorCell; + } + private boolean nodeCondition_y1p9lm_a2a() { + return BlockCells.useBraces(); + } + private EditorCell createCollection_1() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); + editorCell.setCellId("Collection_y1p9lm_a0"); + Style style = new StyleImpl(); + style.set(StyleAttributes.SELECTABLE, false); + editorCell.getStyle().putAll(style); + editorCell.addEditorCell(createCollection_2()); + if (nodeCondition_y1p9lm_a1a0()) { + editorCell.addEditorCell(createConstant_3()); + } + return editorCell; + } + private boolean nodeCondition_y1p9lm_a1a0() { + return BlockCells.useBraces(); + } + private EditorCell createCollection_2() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_y1p9lm_a0a"); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createProperty_0()); + editorCell.addEditorCell(createConstant_0()); + editorCell.addEditorCell(createRefNodeList_0()); + editorCell.addEditorCell(createConstant_1()); + if (nodeCondition_y1p9lm_a5a0a()) { + editorCell.addEditorCell(createCollection_3()); + } + return editorCell; + } + private boolean nodeCondition_y1p9lm_a5a0a() { + return SPropertyOperations.getBoolean(myNode, PROPS.hasReturnType$GLJn); + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createConstant_0() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "("); + editorCell.setCellId("Constant_y1p9lm_c0a0"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + style.set(StyleAttributes.PUNCTUATION_RIGHT, true); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createRefNodeList_0() { + AbstractCellListHandler handler = new parametersListHandler_y1p9lm_d0a0(myNode, getEditorContext()); + EditorCell_Collection editorCell = handler.createCells(new CellLayout_Indent(), false); + editorCell.setCellId("refNodeList_parameters"); + editorCell.setSRole(handler.getElementSRole()); + return editorCell; + } + private static class parametersListHandler_y1p9lm_d0a0 extends RefNodeListHandler { + @NotNull + private SNode myNode; + + public parametersListHandler_y1p9lm_d0a0(SNode ownerNode, EditorContext context) { + super(context, false); + myNode = ownerNode; + } + + @NotNull + public SNode getNode() { + return myNode; + } + public SContainmentLink getSLink() { + return LINKS.parameters$DodW; + } + public SAbstractConcept getChildSConcept() { + return CONCEPTS.FunctionParameter$AW; + } + + public EditorCell createNodeCell(SNode elementNode) { + EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); + installElementCellActions(elementNode, elementCell, false); + return elementCell; + } + public EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(parametersListHandler_y1p9lm_d0a0.this.getNode(), LINKS.parameters$DodW)); + try { + EditorCell emptyCell = null; + emptyCell = super.createEmptyCell(); + installElementCellActions(null, emptyCell, true); + setCellContext(emptyCell); + return emptyCell; + } finally { + getCellFactory().popCellContext(); + } + } + public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) { + if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) { + elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET); + if (elementNode != null) { + elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ",")); + } + if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell))); + } + } + } + @Override + public EditorCell createSeparatorCell(SNode prevNode, SNode nextNode) { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), getNode(), ","); + editorCell.setSelectable(false); + Style style = new StyleImpl(); + style.set(StyleAttributes.LAYOUT_CONSTRAINT, ""); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + return editorCell; + } + } + private EditorCell createConstant_1() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ")"); + editorCell.setCellId("Constant_y1p9lm_e0a0"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createCollection_3() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_y1p9lm_f0a0"); + Style style = new StyleImpl(); + style.set(StyleAttributes.SELECTABLE, false); + editorCell.getStyle().putAll(style); + editorCell.addEditorCell(createConstant_2()); + editorCell.addEditorCell(createRefCell_0()); + return editorCell; + } + private EditorCell createConstant_2() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); + editorCell.setCellId("Constant_y1p9lm_a5a0a"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createRefCell_0() { + final SReferenceLink referenceLink = LINKS.returnType$OMq5; + SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) { + protected EditorCell createReferenceCell(final SNode targetNode) { + EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable() { + public EditorCell compute() { + return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell(); + } + }, targetNode, LINKS.returnType$OMq5); + CellUtil.setupIDeprecatableStyles(targetNode, cell); + setSemanticNodeToCells(cell, getNode()); + installDeleteActions_nullable_reference(cell); + return cell; + } + }; + + provider.setNoTargetText(""); + EditorCell editorCell = provider.createCell(); + + if (editorCell.getSRole() == null) { + editorCell.setReferenceCell(true); + editorCell.setSRole(LINKS.returnType$OMq5); + } + editorCell.setSubstituteInfo(new SReferenceSubstituteInfo(editorCell, referenceLink)); + Iterable referenceAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.LinkAttribute$7j); + Iterable currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink); + } + }); + if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell); + } else + return editorCell; + } + /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + private SNode myReferencingNode; + + /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { + super(context); + myReferencingNode = referencingNode; + myNode = node; + } + + /*package*/ EditorCell createCell() { + return createProperty_1(); + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + private EditorCell createProperty_1() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name1"); + Style style = new StyleImpl(); + new TypeNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + } + private EditorCell createConstant_3() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "{"); + editorCell.setCellId("Constant_y1p9lm_b0a"); + Style style = new StyleImpl(); + style.set(StyleAttributes.MATCHING_LABEL, "brace"); + style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, true); + style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createCollection_4() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Horizontal()); + editorCell.setCellId("Collection_y1p9lm_b0"); + Style style = new StyleImpl(); + style.set(StyleAttributes.SELECTABLE, false); + editorCell.getStyle().putAll(style); + editorCell.addEditorCell(createIndentCell_0()); + editorCell.addEditorCell(createRefNodeList_1()); + return editorCell; + } + private EditorCell createIndentCell_0() { + EditorCell_Indent editorCell = new EditorCell_Indent(getEditorContext(), myNode); + return editorCell; + } + private EditorCell createRefNodeList_1() { + AbstractCellListHandler handler = new statementsListHandler_y1p9lm_b1a(myNode, getEditorContext()); + EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false); + editorCell.setCellId("refNodeList_statements"); + editorCell.setSRole(handler.getElementSRole()); + return editorCell; + } + private static class statementsListHandler_y1p9lm_b1a extends RefNodeListHandler { + @NotNull + private SNode myNode; + + public statementsListHandler_y1p9lm_b1a(SNode ownerNode, EditorContext context) { + super(context, false); + myNode = ownerNode; + } + + @NotNull + public SNode getNode() { + return myNode; + } + public SContainmentLink getSLink() { + return LINKS.statements$DocY; + } + public SAbstractConcept getChildSConcept() { + return CONCEPTS.Statement$k3; + } + + public EditorCell createNodeCell(SNode elementNode) { + EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); + installElementCellActions(elementNode, elementCell, false); + return elementCell; + } + public EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(statementsListHandler_y1p9lm_b1a.this.getNode(), LINKS.statements$DocY)); + try { + EditorCell emptyCell = null; + emptyCell = super.createEmptyCell(); + installElementCellActions(null, emptyCell, true); + setCellContext(emptyCell); + return emptyCell; + } finally { + getCellFactory().popCellContext(); + } + } + public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) { + if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) { + elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET); + if (elementNode != null) { + elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + } + if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell))); + } + } + } + } + private EditorCell createConstant_4() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}"); + editorCell.setCellId("Constant_y1p9lm_c0"); + Style style = new StyleImpl(); + style.set(StyleAttributes.MATCHING_LABEL, "brace"); + style.set(StyleAttributes.INDENT_LAYOUT_NO_WRAP, true); + style.set(StyleAttributes.FONT_STYLE, MPSFonts.PLAIN); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + + private static final class PROPS { + /*package*/ static final SProperty hasReturnType$GLJn = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae5074dL, "hasReturnType"); + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + /*package*/ static final SConcept FunctionParameter$AW = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503eaL, "dynamicc.structure.FunctionParameter"); + /*package*/ static final SConcept LinkAttribute$7j = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute"); + /*package*/ static final SConcept Statement$k3 = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL, "dynamicc.structure.Statement"); + } + + private static final class LINKS { + /*package*/ static final SContainmentLink parameters$DodW = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae503e3L, "parameters"); + /*package*/ static final SReferenceLink returnType$OMq5 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae5f4d2L, "returnType"); + /*package*/ static final SContainmentLink statements$DocY = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae503e1L, "statements"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_Editor.java new file mode 100644 index 0000000..2fcb532 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Int10LiteralConcept_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Int10LiteralConcept_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_EditorBuilder_a.java new file mode 100644 index 0000000..3dca044 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Int10LiteralConcept_EditorBuilder_a.java @@ -0,0 +1,87 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.NumericLiteralStyleClass; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Int10LiteralConcept_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Int10LiteralConcept_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createProperty_0(); + } + + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.literal$n0d0; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_literal"); + editorCell.setBig(true); + setCellContext(editorCell); + Style style = new StyleImpl(); + new NumericLiteralStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + + private static final class PROPS { + /*package*/ static final SProperty literal$n0d0 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x45b716564ae56561L, 0x45b716564ae56562L, "literal"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Module_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Module_Editor.java new file mode 100644 index 0000000..6feebee --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Module_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Module_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Module_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Module_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Module_EditorBuilder_a.java new file mode 100644 index 0000000..7d891f3 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Module_EditorBuilder_a.java @@ -0,0 +1,214 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Vertical; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.nodeEditor.MPSFonts; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.openapi.editor.style.StyleRegistry; +import jetbrains.mps.nodeEditor.MPSColors; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; +import jetbrains.mps.nodeEditor.cellProviders.AbstractCellListHandler; +import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; +import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Module_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Module_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Vertical()); + editorCell.setCellId("Collection_iuuvkg_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createProperty_0()); + editorCell.addEditorCell(createProperty_1()); + editorCell.addEditorCell(createConstant_0()); + editorCell.addEditorCell(createRefNodeList_0()); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + style.set(StyleAttributes.FONT_FAMILY, "Arial"); + style.set(StyleAttributes.FONT_SIZE, 32); + style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createProperty_1() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.module$HXDb; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_module"); + Style style = new StyleImpl(); + style.set(StyleAttributes.FONT_FAMILY, "Arial"); + style.set(StyleAttributes.FONT_SIZE, 12); + style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.gray)); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createConstant_0() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); + editorCell.setCellId("Constant_iuuvkg_c0"); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createRefNodeList_0() { + AbstractCellListHandler handler = new statementsListHandler_iuuvkg_d0(myNode, getEditorContext()); + EditorCell_Collection editorCell = handler.createCells(new CellLayout_Vertical(), false); + editorCell.setCellId("refNodeList_statements"); + editorCell.setSRole(handler.getElementSRole()); + return editorCell; + } + private static class statementsListHandler_iuuvkg_d0 extends RefNodeListHandler { + @NotNull + private SNode myNode; + + public statementsListHandler_iuuvkg_d0(SNode ownerNode, EditorContext context) { + super(context, false); + myNode = ownerNode; + } + + @NotNull + public SNode getNode() { + return myNode; + } + public SContainmentLink getSLink() { + return LINKS.statements$HXV6; + } + public SAbstractConcept getChildSConcept() { + return CONCEPTS.Statement$k3; + } + + public EditorCell createNodeCell(SNode elementNode) { + EditorCell elementCell = getUpdateSession().updateChildNodeCell(elementNode); + installElementCellActions(elementNode, elementCell, false); + return elementCell; + } + public EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(statementsListHandler_iuuvkg_d0.this.getNode(), LINKS.statements$HXV6)); + try { + EditorCell emptyCell = null; + emptyCell = super.createEmptyCell(); + installElementCellActions(null, emptyCell, true); + setCellContext(emptyCell); + return emptyCell; + } finally { + getCellFactory().popCellContext(); + } + } + public void installElementCellActions(SNode elementNode, EditorCell elementCell, boolean isEmptyCell) { + if (elementCell.getUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET) == null) { + elementCell.putUserObject(AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET, AbstractCellListHandler.ELEMENT_CELL_ACTIONS_SET); + if (elementNode != null) { + elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD)); + elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD)); + } + if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell))); + } + } + } + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + /*package*/ static final SProperty module$HXDb = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL, 0x3a6fd2de0c312b29L, "module"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + /*package*/ static final SConcept Statement$k3 = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL, "dynamicc.structure.Statement"); + } + + private static final class LINKS { + /*package*/ static final SContainmentLink statements$HXV6 = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL, 0x3a6fd2de0c312b39L, "statements"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_Editor.java new file mode 100644 index 0000000..33cd350 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class NewlineStatement_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new NewlineStatement_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_EditorBuilder_a.java new file mode 100644 index 0000000..8d5185b --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/NewlineStatement_EditorBuilder_a.java @@ -0,0 +1,39 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; + +/*package*/ class NewlineStatement_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public NewlineStatement_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createConstant_0(); + } + + private EditorCell createConstant_0() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ""); + editorCell.setCellId("Constant_3uehh4_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.setDefaultText(""); + return editorCell; + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_Editor.java new file mode 100644 index 0000000..bd00c2f --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class SingleLineComment_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new SingleLineComment_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_EditorBuilder_a.java new file mode 100644 index 0000000..11ba564 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/SingleLineComment_EditorBuilder_a.java @@ -0,0 +1,103 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.CommentStyleClass; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class SingleLineComment_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public SingleLineComment_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_5ng77o_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createProperty_0()); + return editorCell; + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + Style style = new StyleImpl(); + new CommentStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.comment$tyN0; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_comment"); + Style style = new StyleImpl(); + new CommentStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + + private static final class PROPS { + /*package*/ static final SProperty comment$tyN0 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22af0da98L, 0x26ea02d22af0da99L, "comment"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Type_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Type_Editor.java new file mode 100644 index 0000000..6b4697e --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Type_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Type_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Type_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Type_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Type_EditorBuilder_a.java new file mode 100644 index 0000000..e0c455b --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Type_EditorBuilder_a.java @@ -0,0 +1,313 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import dynamicc.editor.Type_StyleSheet.TypeNameStyleClass; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import dynamicc.editor.CCode_StyleSheet.ctypeStyleClass; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider; +import jetbrains.mps.util.Computable; +import jetbrains.mps.editor.runtime.impl.CellUtil; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo; +import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Type_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Type_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_a1nfgp_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createAlternation_0()); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createProperty_0()); + editorCell.addEditorCell(createConstant_2()); + editorCell.addEditorCell(createAlternation_1()); + return editorCell; + } + private EditorCell createAlternation_0() { + boolean alternationCondition = true; + alternationCondition = nodeCondition_a1nfgp_a0a(); + EditorCell editorCell = null; + if (alternationCondition) { + editorCell = createConstant_0(); + } else { + editorCell = createConstant_1(); + } + return editorCell; + } + private boolean nodeCondition_a1nfgp_a0a() { + return SPropertyOperations.getBoolean(myNode, PROPS.strong$_PED); + } + private EditorCell createConstant_0() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "strong"); + editorCell.setCellId("Constant_a1nfgp_a0a"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createConstant_1() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "weak"); + editorCell.setCellId("Constant_a1nfgp_a0a_0"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + new TypeNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createConstant_2() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "from"); + editorCell.setCellId("Constant_a1nfgp_d0"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createAlternation_1() { + boolean alternationCondition = true; + alternationCondition = nodeCondition_a1nfgp_a4a(); + EditorCell editorCell = null; + if (alternationCondition) { + editorCell = createCollection_1(); + } else { + editorCell = createRefCell_0(); + } + return editorCell; + } + private boolean nodeCondition_a1nfgp_a4a() { + return SPropertyOperations.getBoolean(myNode, PROPS.is_c_type$8cPw); + } + private EditorCell createCollection_1() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_a1nfgp_a4a"); + Style style = new StyleImpl(); + style.set(StyleAttributes.SELECTABLE, false); + editorCell.getStyle().putAll(style); + editorCell.addEditorCell(createConstant_3()); + editorCell.addEditorCell(createProperty_1()); + return editorCell; + } + private EditorCell createConstant_3() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "ctype"); + editorCell.setCellId("Constant_a1nfgp_a0e0"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createProperty_1() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.c_type$EO9Y; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, true), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_c_type"); + Style style = new StyleImpl(); + new ctypeStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createRefCell_0() { + final SReferenceLink referenceLink = LINKS.parent$_PFB; + SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) { + protected EditorCell createReferenceCell(final SNode targetNode) { + EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable() { + public EditorCell compute() { + return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell(); + } + }, targetNode, LINKS.parent$_PFB); + CellUtil.setupIDeprecatableStyles(targetNode, cell); + setSemanticNodeToCells(cell, getNode()); + installDeleteActions_nullable_reference(cell); + return cell; + } + }; + + provider.setNoTargetText(""); + EditorCell editorCell = provider.createCell(); + + if (editorCell.getSRole() == null) { + editorCell.setReferenceCell(true); + editorCell.setSRole(LINKS.parent$_PFB); + } + editorCell.setSubstituteInfo(new SReferenceSubstituteInfo(editorCell, referenceLink)); + Iterable referenceAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.LinkAttribute$7j); + Iterable currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink); + } + }); + if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell); + } else + return editorCell; + } + /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + private SNode myReferencingNode; + + /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { + super(context); + myReferencingNode = referencingNode; + myNode = node; + } + + /*package*/ EditorCell createCell() { + return createProperty_2(); + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + private EditorCell createProperty_2() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, true), myNode); + editorCell.setDefaultText("unit"); + editorCell.setCellId("property_name1"); + Style style = new StyleImpl(); + new TypeNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + } + + private static final class PROPS { + /*package*/ static final SProperty strong$_PED = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x3a6fd2de0c335c36L, "strong"); + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + /*package*/ static final SProperty is_c_type$8cPw = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x26ea02d22ade0a1eL, "is_c_type"); + /*package*/ static final SProperty c_type$EO9Y = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x26ea02d22addb9f2L, "c_type"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + /*package*/ static final SConcept LinkAttribute$7j = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink parent$_PFB = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x3a6fd2de0c335c38L, "parent"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Type_StyleSheet.java b/languages/dynamicc/source_gen/dynamicc/editor/Type_StyleSheet.java new file mode 100644 index 0000000..d7eefce --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Type_StyleSheet.java @@ -0,0 +1,39 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.editor.runtime.style.AbstractStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.openapi.editor.style.StyleRegistry; +import jetbrains.mps.nodeEditor.MPSColors; +import jetbrains.mps.nodeEditor.MPSFonts; + +public class Type_StyleSheet { + /** + * + * @deprecated Since MPS 3.5 use generated StyleClass + */ + @Deprecated + public static void apply_TypeName(Style style, EditorCell editorCell) { + SNode node = (editorCell == null ? null : editorCell.getSNode()); + EditorContext editorContext = (editorCell == null ? null : editorCell.getContext()); + new TypeNameStyleClass(editorContext, node).apply(style, editorCell); + } + + public static class TypeNameStyleClass extends AbstractStyleClass { + public TypeNameStyleClass(EditorContext editorContext, SNode node) { + super(editorContext, node); + } + + @Override + public void apply(Style style, EditorCell editorCell) { + style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.cyan)); + style.set(StyleAttributes.FONT_STYLE, MPSFonts.BOLD); + } + + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_Editor.java new file mode 100644 index 0000000..1594eee --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class VariableAccess_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new VariableAccess_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_EditorBuilder_a.java new file mode 100644 index 0000000..563cc74 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_EditorBuilder_a.java @@ -0,0 +1,177 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider; +import jetbrains.mps.util.Computable; +import jetbrains.mps.editor.runtime.impl.CellUtil; +import jetbrains.mps.nodeEditor.cells.EditorCell_Error; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfoSmartReferenceDecorator; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import dynamicc.editor.Variable_StyleSheet.VariableNameStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class VariableAccess_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public VariableAccess_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_o6rpi_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createRefCell_0()); + return editorCell; + } + private EditorCell createRefCell_0() { + final SReferenceLink referenceLink = LINKS.variable$5yW0; + SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) { + protected EditorCell createReferenceCell(final SNode targetNode) { + EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable() { + public EditorCell compute() { + return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell(); + } + }, targetNode, LINKS.variable$5yW0); + CellUtil.setupIDeprecatableStyles(targetNode, cell); + setSemanticNodeToCells(cell, getNode()); + installDeleteActions_notnull_smartReference(cell); + return cell; + } + @Override + protected EditorCell createErrorCell(String error) { + EditorCell_Error cell = new EditorCell_Error(getEditorContext(), getNode(), error, true); + cell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(getNode(), CellAction_DeleteNode.DeleteDirection.FORWARD)); + cell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(getNode(), CellAction_DeleteNode.DeleteDirection.BACKWARD)); + return cell; + } + }; + + provider.setNoTargetText(""); + EditorCell editorCell = provider.createCell(); + + if (editorCell.getSRole() == null) { + editorCell.setReferenceCell(true); + editorCell.setSRole(LINKS.variable$5yW0); + } + editorCell.setSubstituteInfo(new SReferenceSubstituteInfoSmartReferenceDecorator(new SReferenceSubstituteInfo(editorCell, referenceLink))); + Iterable referenceAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.LinkAttribute$7j); + Iterable currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink); + } + }); + if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell); + } else + return editorCell; + } + /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + private SNode myReferencingNode; + + /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { + super(context); + myReferencingNode = referencingNode; + myNode = node; + } + + /*package*/ EditorCell createCell() { + return createProperty_0(); + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + new VariableNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.AUTO_DELETABLE, true); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + } + + private static final class LINKS { + /*package*/ static final SReferenceLink variable$5yW0 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, 0x26ea02d22aef02d5L, "variable"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept LinkAttribute$7j = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute"); + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_SubstituteMenu.java b/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_SubstituteMenu.java new file mode 100644 index 0000000..ab22ca8 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/VariableAccess_SubstituteMenu.java @@ -0,0 +1,97 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.menus.substitute.SubstituteMenuBase; +import org.jetbrains.annotations.NotNull; +import java.util.List; +import jetbrains.mps.lang.editor.menus.MenuPart; +import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuItem; +import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuContext; +import java.util.ArrayList; +import jetbrains.mps.lang.editor.menus.substitute.ConstraintsFilteringSubstituteMenuPartDecorator; +import jetbrains.mps.lang.editor.menus.EditorMenuDescriptorBase; +import jetbrains.mps.smodel.SNodePointer; +import jetbrains.mps.lang.editor.menus.substitute.ReferenceScopeSubstituteMenuPart; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.lang.editor.menus.ConceptMenusPart; +import java.util.Collection; +import jetbrains.mps.smodel.ConceptDescendantsCache; +import jetbrains.mps.lang.editor.menus.substitute.DefaultSubstituteMenuLookup; +import jetbrains.mps.smodel.language.LanguageRegistry; +import org.jetbrains.mps.openapi.language.SConcept; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SReferenceLink; + +public class VariableAccess_SubstituteMenu extends SubstituteMenuBase { + @NotNull + @Override + protected List> getParts(final SubstituteMenuContext _context) { + List> result = new ArrayList>(); + result.add(new ConstraintsFilteringSubstituteMenuPartDecorator(new SMP_ReferenceScope_pws7q4_a(), CONCEPTS.VariableAccess$Q8)); + result.add(new SMP_Subconcepts_pws7q4_b()); + return result; + } + + @NotNull + @Override + public List createMenuItems(@NotNull SubstituteMenuContext context) { + context.getEditorMenuTrace().pushTraceInfo(); + context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("default substitute menu for VariableAccess. Generated from implicit smart reference attribute.", new SNodePointer("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)", "2804056819678249684"))); + try { + return super.createMenuItems(context); + } finally { + context.getEditorMenuTrace().popTraceInfo(); + } + } + + + public class SMP_ReferenceScope_pws7q4_a extends ReferenceScopeSubstituteMenuPart { + + public SMP_ReferenceScope_pws7q4_a() { + // that cast is needed for prevent the users from https://youtrack.jetbrains.com/issue/MPS-29051 + super((SAbstractConcept) CONCEPTS.VariableAccess$Q8, LINKS.variable$5yW0); + } + @NotNull + @Override + public List createItems(SubstituteMenuContext context) { + context.getEditorMenuTrace().pushTraceInfo(); + context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("reference scope substitute menu part", null)); + try { + return super.createItems(context); + } finally { + context.getEditorMenuTrace().popTraceInfo(); + } + } + + } + public class SMP_Subconcepts_pws7q4_b extends ConceptMenusPart { + protected Collection getConcepts(final SubstituteMenuContext _context) { + return ConceptDescendantsCache.getInstance().getDirectDescendants(CONCEPTS.VariableAccess$Q8); + } + @NotNull + @Override + public List createItems(SubstituteMenuContext context) { + context.getEditorMenuTrace().pushTraceInfo(); + context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct subconcepts of " + "VariableAccess", null)); + try { + return super.createItems(context); + } finally { + context.getEditorMenuTrace().popTraceInfo(); + } + } + + @Override + protected Collection createItemsForConcept(SubstituteMenuContext context, SAbstractConcept concept) { + return context.createItems(new DefaultSubstituteMenuLookup(LanguageRegistry.getInstance(context.getEditorContext().getRepository()), concept)); + } + } + + private static final class CONCEPTS { + /*package*/ static final SConcept VariableAccess$Q8 = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, "dynamicc.structure.VariableAccess"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink variable$5yW0 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, 0x26ea02d22aef02d5L, "variable"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Variable_Editor.java b/languages/dynamicc/source_gen/dynamicc/editor/Variable_Editor.java new file mode 100644 index 0000000..cf55214 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Variable_Editor.java @@ -0,0 +1,14 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.nodeEditor.DefaultNodeEditor; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.openapi.editor.EditorContext; +import org.jetbrains.mps.openapi.model.SNode; + +public class Variable_Editor extends DefaultNodeEditor { + public EditorCell createEditorCell(EditorContext editorContext, SNode node) { + return new Variable_EditorBuilder_a(editorContext, node).createCell(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Variable_EditorBuilder_a.java b/languages/dynamicc/source_gen/dynamicc/editor/Variable_EditorBuilder_a.java new file mode 100644 index 0000000..9f8863c --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Variable_EditorBuilder_a.java @@ -0,0 +1,322 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.editor.runtime.descriptor.AbstractEditorBuilder; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import jetbrains.mps.nodeEditor.cells.EditorCell_Collection; +import jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.editor.runtime.style.StyleImpl; +import jetbrains.mps.baseLanguage.editor.BaseLanguageStyle_StyleSheet.KeyWordStyleClass; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo; +import jetbrains.mps.nodeEditor.cells.EditorCell_Property; +import jetbrains.mps.nodeEditor.cells.SPropertyAccessor; +import dynamicc.editor.Variable_StyleSheet.VariableNameStyleClass; +import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; +import jetbrains.mps.internal.collections.runtime.Sequence; +import jetbrains.mps.internal.collections.runtime.IWhereFilter; +import java.util.Objects; +import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor; +import jetbrains.mps.nodeEditor.EditorManager; +import jetbrains.mps.openapi.editor.update.AttributeKind; +import jetbrains.mps.nodeEditor.cells.EditorCell_Constant; +import dynamicc.editor.Common_StyleSheet.TextStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.lang.editor.cellProviders.SReferenceCellProvider; +import jetbrains.mps.util.Computable; +import jetbrains.mps.editor.runtime.impl.CellUtil; +import jetbrains.mps.nodeEditor.cellMenu.SReferenceSubstituteInfo; +import jetbrains.mps.lang.core.behavior.LinkAttribute__BehaviorDescriptor; +import dynamicc.editor.Type_StyleSheet.TypeNameStyleClass; +import jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import jetbrains.mps.openapi.editor.cells.CellActionType; +import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart; +import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo; +import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo; +import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SConcept; + +/*package*/ class Variable_EditorBuilder_a extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + + public Variable_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) { + super(context); + myNode = node; + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + /*package*/ EditorCell createCell() { + return createCollection_0(); + } + + private EditorCell createCollection_0() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_pfjbyg_a"); + editorCell.setBig(true); + setCellContext(editorCell); + editorCell.addEditorCell(createComponent_0()); + editorCell.addEditorCell(createProperty_0()); + editorCell.addEditorCell(createConstant_0()); + editorCell.addEditorCell(createRefCell_0()); + if (nodeCondition_pfjbyg_a4a()) { + editorCell.addEditorCell(createConstant_1()); + } + if (nodeCondition_pfjbyg_a5a()) { + editorCell.addEditorCell(createCollection_1()); + } + return editorCell; + } + private boolean nodeCondition_pfjbyg_a4a() { + return SPropertyOperations.getBoolean(myNode, PROPS.optional$_PtY); + } + private boolean nodeCondition_pfjbyg_a5a() { + return SPropertyOperations.getBoolean(myNode, PROPS.showAssignment$Lo_7); + } + private EditorCell createComponent_0() { + EditorCell editorCell = getCellFactory().createEditorComponentCell(myNode, "jetbrains.mps.lang.core.editor.alias"); + Style style = new StyleImpl(); + new KeyWordStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + return editorCell; + } + private EditorCell createProperty_0() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name"); + Style style = new StyleImpl(); + new VariableNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + private EditorCell createConstant_0() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":"); + editorCell.setCellId("Constant_pfjbyg_c0"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createRefCell_0() { + final SReferenceLink referenceLink = LINKS.type$YYfM; + SReferenceCellProvider provider = new SReferenceCellProvider(getNode(), referenceLink, getEditorContext()) { + protected EditorCell createReferenceCell(final SNode targetNode) { + EditorCell cell = getUpdateSession().updateReferencedNodeCell(new Computable() { + public EditorCell compute() { + return new Inline_Builder0(getEditorContext(), getNode(), targetNode).createCell(); + } + }, targetNode, LINKS.type$YYfM); + CellUtil.setupIDeprecatableStyles(targetNode, cell); + setSemanticNodeToCells(cell, getNode()); + installDeleteActions_notnull(cell); + return cell; + } + }; + + provider.setNoTargetText(""); + EditorCell editorCell = provider.createCell(); + + if (editorCell.getSRole() == null) { + editorCell.setReferenceCell(true); + editorCell.setSRole(LINKS.type$YYfM); + } + editorCell.setSubstituteInfo(new SReferenceSubstituteInfo(editorCell, referenceLink)); + Iterable referenceAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.LinkAttribute$7j); + Iterable currentReferenceAttributes = Sequence.fromIterable(referenceAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(LinkAttribute__BehaviorDescriptor.getLink_id1avfQ4BEFo6.invoke(it), referenceLink); + } + }); + if (Sequence.fromIterable(currentReferenceAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentReferenceAttributes).first(), AttributeKind.REFERENCE, editorCell); + } else + return editorCell; + } + /*package*/ static class Inline_Builder0 extends AbstractEditorBuilder { + @NotNull + private SNode myNode; + private SNode myReferencingNode; + + /*package*/ Inline_Builder0(@NotNull EditorContext context, SNode referencingNode, @NotNull SNode node) { + super(context); + myReferencingNode = referencingNode; + myNode = node; + } + + /*package*/ EditorCell createCell() { + return createProperty_1(); + } + + @NotNull + @Override + public SNode getNode() { + return myNode; + } + + private EditorCell createProperty_1() { + getCellFactory().pushCellContext(); + try { + final SProperty property = PROPS.name$tAp1; + getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property)); + EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, true, false), myNode); + editorCell.setDefaultText(""); + editorCell.setCellId("property_name1"); + Style style = new StyleImpl(); + new TypeNameStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + editorCell.getStyle().putAll(style); + editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property)); + setCellContext(editorCell); + Iterable propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), CONCEPTS.PropertyAttribute$jT); + Iterable currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter() { + public boolean accept(SNode it) { + return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property); + } + }); + if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) { + EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext()); + return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell); + } else + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + } + private EditorCell createConstant_1() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "?"); + editorCell.setCellId("Constant_pfjbyg_e0"); + Style style = new StyleImpl(); + new TextStyleClass(getEditorContext(), getNode()).apply(style, editorCell); + style.set(StyleAttributes.PUNCTUATION_LEFT, true); + editorCell.getStyle().putAll(style); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createCollection_1() { + EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent()); + editorCell.setCellId("Collection_pfjbyg_f0"); + Style style = new StyleImpl(); + style.set(StyleAttributes.SELECTABLE, false); + editorCell.getStyle().putAll(style); + editorCell.addEditorCell(createConstant_2()); + editorCell.addEditorCell(createRefNode_0()); + return editorCell; + } + private EditorCell createConstant_2() { + EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "="); + editorCell.setCellId("Constant_pfjbyg_a5a"); + editorCell.setDefaultText(""); + return editorCell; + } + private EditorCell createRefNode_0() { + SingleRoleCellProvider provider = new assignmentSingleRoleHandler_pfjbyg_b5a(myNode, LINKS.assignment$vZlr, getEditorContext()); + return provider.createCell(); + } + private static class assignmentSingleRoleHandler_pfjbyg_b5a extends SingleRoleCellProvider { + @NotNull + private SNode myNode; + + public assignmentSingleRoleHandler_pfjbyg_b5a(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) { + super(containmentLink, context); + myNode = ownerNode; + } + + @Override + @NotNull + public SNode getNode() { + return myNode; + } + + protected EditorCell createChildCell(SNode child) { + EditorCell editorCell = getUpdateSession().updateChildNodeCell(child); + editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), LINKS.assignment$vZlr, child)); + editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), LINKS.assignment$vZlr, child)); + installCellInfo(child, editorCell, false); + return editorCell; + } + + + + private void installCellInfo(SNode child, EditorCell editorCell, boolean isEmpty) { + if (editorCell.getSubstituteInfo() == null || editorCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) { + editorCell.setSubstituteInfo((isEmpty ? new SEmptyContainmentSubstituteInfo(editorCell) : new SChildSubstituteInfo(editorCell))); + } + if (editorCell.getSRole() == null) { + editorCell.setSRole(LINKS.assignment$vZlr); + } + } + @Override + protected EditorCell createEmptyCell() { + getCellFactory().pushCellContext(); + getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), LINKS.assignment$vZlr)); + try { + EditorCell editorCell = super.createEmptyCell(); + editorCell.setCellId("empty_assignment"); + installCellInfo(null, editorCell, true); + setCellContext(editorCell); + return editorCell; + } finally { + getCellFactory().popCellContext(); + } + } + protected String getNoTargetText() { + return ""; + } + } + + private static final class PROPS { + /*package*/ static final SProperty optional$_PtY = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c335c31L, "optional"); + /*package*/ static final SProperty showAssignment$Lo_7 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x26ea02d22aede35aL, "showAssignment"); + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept PropertyAttribute$jT = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"); + /*package*/ static final SConcept LinkAttribute$7j = MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da51L, "jetbrains.mps.lang.core.structure.LinkAttribute"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink type$YYfM = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c345a7cL, "type"); + /*package*/ static final SContainmentLink assignment$vZlr = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x26ea02d22aedd089L, "assignment"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/Variable_StyleSheet.java b/languages/dynamicc/source_gen/dynamicc/editor/Variable_StyleSheet.java new file mode 100644 index 0000000..ef7e3ad --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/Variable_StyleSheet.java @@ -0,0 +1,53 @@ +package dynamicc.editor; + +/*Generated by MPS */ + +import jetbrains.mps.openapi.editor.style.Style; +import jetbrains.mps.openapi.editor.cells.EditorCell; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.editor.runtime.style.AbstractStyleClass; +import jetbrains.mps.editor.runtime.style.StyleAttributes; +import jetbrains.mps.openapi.editor.style.StyleRegistry; +import jetbrains.mps.nodeEditor.MPSColors; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import org.jetbrains.mps.openapi.language.SConcept; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public class Variable_StyleSheet { + /** + * + * @deprecated Since MPS 3.5 use generated StyleClass + */ + @Deprecated + public static void apply_VariableName(Style style, EditorCell editorCell) { + SNode node = (editorCell == null ? null : editorCell.getSNode()); + EditorContext editorContext = (editorCell == null ? null : editorCell.getContext()); + new VariableNameStyleClass(editorContext, node).apply(style, editorCell); + } + + public static class VariableNameStyleClass extends AbstractStyleClass { + public VariableNameStyleClass(EditorContext editorContext, SNode node) { + super(editorContext, node); + } + + @Override + public void apply(Style style, EditorCell editorCell) { + style.set(StyleAttributes.TEXT_COLOR, StyleRegistry.getInstance().getSimpleColor(MPSColors.magenta)); + style.set(StyleAttributes.UNDERLINED, _StyleParameter_QueryFunction_pptb9q_a1a()); + } + + private boolean _StyleParameter_QueryFunction_pptb9q_a1a() { + if (SConceptOperations.isExactly(SNodeOperations.asSConcept(SNodeOperations.getConcept(getNode())), CONCEPTS.ValVariable$HQ)) { + return false; + } + + return true; + } + } + + private static final class CONCEPTS { + /*package*/ static final SConcept ValVariable$HQ = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c36cfdaL, "dynamicc.structure.ValVariable"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/editor/trace.info b/languages/dynamicc/source_gen/dynamicc/editor/trace.info new file mode 100644 index 0000000..1fa7ea4 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/editor/trace.info @@ -0,0 +1,2926 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/AddAssignment_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/AddAssignment_Intention.java new file mode 100644 index 0000000..8d8aa68 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/AddAssignment_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class AddAssignment_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public AddAssignment_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "2804056819678177847")); + } + @Override + public String getPresentation() { + return "AddAssignment"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return !(SPropertyOperations.getBoolean(node, PROPS.showAssignment$Lo_7)); + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Add Assignment"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.showAssignment$Lo_7, true); + } + @Override + public IntentionDescriptor getDescriptor() { + return AddAssignment_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty showAssignment$Lo_7 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x26ea02d22aede35aL, "showAssignment"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/AddReturnType_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/AddReturnType_Intention.java new file mode 100644 index 0000000..7774474 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/AddReturnType_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class AddReturnType_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public AddReturnType_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "2804056819677597846")); + } + @Override + public String getPresentation() { + return "AddReturnType"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return !(SPropertyOperations.getBoolean(node, PROPS.hasReturnType$GLJn)); + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Add Return Type"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.hasReturnType$GLJn, true); + } + @Override + public IntentionDescriptor getDescriptor() { + return AddReturnType_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty hasReturnType$GLJn = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae5074dL, "hasReturnType"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/IntentionsDescriptor.java b/languages/dynamicc/source_gen/dynamicc/intentions/IntentionsDescriptor.java new file mode 100644 index 0000000..47dd714 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/IntentionsDescriptor.java @@ -0,0 +1,85 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionAspectDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Map; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import java.util.HashMap; +import org.jetbrains.annotations.Nullable; +import java.util.Collection; +import org.jetbrains.annotations.NotNull; +import java.util.Arrays; +import jetbrains.mps.lang.smodel.ConceptSwitchIndex; +import jetbrains.mps.lang.smodel.ConceptSwitchIndexBuilder; +import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; + +public final class IntentionsDescriptor extends AbstractIntentionAspectDescriptor { + private static final IntentionFactory[] EMPTY_ARRAY = new IntentionFactory[0]; + private Map myCached = new HashMap(); + + public IntentionsDescriptor() { + } + + @Nullable + public Collection getIntentions(@NotNull SAbstractConcept concept) { + if (myCached.containsKey(concept)) { + return Arrays.asList(myCached.get(concept)); + } + + IntentionFactory[] intentions = EMPTY_ARRAY; + SAbstractConcept cncpt = concept; + switch (conceptIndex.index(cncpt)) { + case 0: + if (true) { + // concept + intentions = new IntentionFactory[2]; + intentions[0] = new AddReturnType_Intention(); + intentions[1] = new RemoveReturnType_Intention(); + } + break; + case 1: + if (true) { + // concept + intentions = new IntentionFactory[4]; + intentions[0] = new MakeStrong_Intention(); + intentions[1] = new MakeWeak_Intention(); + intentions[2] = new UseTypeFromC_Intention(); + intentions[3] = new NotUseTypeFromC_Intention(); + } + break; + case 2: + if (true) { + // concept + intentions = new IntentionFactory[4]; + intentions[0] = new MakeNullable_Intention(); + intentions[1] = new MakeNonNullable_Intention(); + intentions[2] = new AddAssignment_Intention(); + intentions[3] = new RemoveAssignment_Intention(); + } + break; + default: + } + myCached.put(concept, intentions); + return Arrays.asList(intentions); + } + + @NotNull + @Override + public Collection getAllIntentions() { + IntentionFactory[] rv = new IntentionFactory[10]; + rv[0] = new MakeStrong_Intention(); + rv[1] = new MakeWeak_Intention(); + rv[2] = new MakeNullable_Intention(); + rv[3] = new MakeNonNullable_Intention(); + rv[4] = new UseTypeFromC_Intention(); + rv[5] = new NotUseTypeFromC_Intention(); + rv[6] = new AddReturnType_Intention(); + rv[7] = new RemoveReturnType_Intention(); + rv[8] = new AddAssignment_Intention(); + rv[9] = new RemoveAssignment_Intention(); + return Arrays.asList(rv); + } + private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L), MetaIdFactory.conceptId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL)).seal(); +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/MakeNonNullable_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/MakeNonNullable_Intention.java new file mode 100644 index 0000000..16c0e6d --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/MakeNonNullable_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class MakeNonNullable_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public MakeNonNullable_Intention() { + super(Kind.NORMAL, true, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "4210816027744130391")); + } + @Override + public String getPresentation() { + return "MakeNonNullable"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.optional$_PtY) == true; + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Make Non-Nullable"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.optional$_PtY, false); + } + @Override + public IntentionDescriptor getDescriptor() { + return MakeNonNullable_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty optional$_PtY = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c335c31L, "optional"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/MakeNullable_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/MakeNullable_Intention.java new file mode 100644 index 0000000..edcfad0 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/MakeNullable_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class MakeNullable_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public MakeNullable_Intention() { + super(Kind.NORMAL, true, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "4210816027744121724")); + } + @Override + public String getPresentation() { + return "MakeNullable"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.optional$_PtY) == false; + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Make Nullable"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.optional$_PtY, true); + } + @Override + public IntentionDescriptor getDescriptor() { + return MakeNullable_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty optional$_PtY = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c335c31L, "optional"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/MakeStrong_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/MakeStrong_Intention.java new file mode 100644 index 0000000..083a42d --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/MakeStrong_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class MakeStrong_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public MakeStrong_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "4210816027743971744")); + } + @Override + public String getPresentation() { + return "MakeStrong"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.strong$_PED) == false; + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Make Strong"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.strong$_PED, true); + } + @Override + public IntentionDescriptor getDescriptor() { + return MakeStrong_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty strong$_PED = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x3a6fd2de0c335c36L, "strong"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/MakeWeak_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/MakeWeak_Intention.java new file mode 100644 index 0000000..a36daa0 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/MakeWeak_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class MakeWeak_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public MakeWeak_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "4210816027743977227")); + } + @Override + public String getPresentation() { + return "MakeWeak"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.strong$_PED) == true; + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Make Weak"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.strong$_PED, false); + } + @Override + public IntentionDescriptor getDescriptor() { + return MakeWeak_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty strong$_PED = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x3a6fd2de0c335c36L, "strong"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/NotUseTypeFromC_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/NotUseTypeFromC_Intention.java new file mode 100644 index 0000000..ae3194e --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/NotUseTypeFromC_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class NotUseTypeFromC_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public NotUseTypeFromC_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "2804056819677428735")); + } + @Override + public String getPresentation() { + return "NotUseTypeFromC"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.is_c_type$8cPw); + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Don't Use Type from C"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.is_c_type$8cPw, false); + } + @Override + public IntentionDescriptor getDescriptor() { + return NotUseTypeFromC_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty is_c_type$8cPw = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x26ea02d22ade0a1eL, "is_c_type"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/RemoveAssignment_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/RemoveAssignment_Intention.java new file mode 100644 index 0000000..51e7f6a --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/RemoveAssignment_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class RemoveAssignment_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public RemoveAssignment_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "2804056819678183605")); + } + @Override + public String getPresentation() { + return "RemoveAssignment"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.showAssignment$Lo_7); + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Remove Assignment"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.showAssignment$Lo_7, false); + } + @Override + public IntentionDescriptor getDescriptor() { + return RemoveAssignment_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty showAssignment$Lo_7 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x26ea02d22aede35aL, "showAssignment"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/RemoveReturnType_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/RemoveReturnType_Intention.java new file mode 100644 index 0000000..ed2de0d --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/RemoveReturnType_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class RemoveReturnType_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public RemoveReturnType_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "2804056819677603068")); + } + @Override + public String getPresentation() { + return "RemoveReturnType"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return SPropertyOperations.getBoolean(node, PROPS.hasReturnType$GLJn); + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Remove Return Type"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.hasReturnType$GLJn, false); + } + @Override + public IntentionDescriptor getDescriptor() { + return RemoveReturnType_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty hasReturnType$GLJn = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae5074dL, "hasReturnType"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/UseTypeFromC_Intention.java b/languages/dynamicc/source_gen/dynamicc/intentions/UseTypeFromC_Intention.java new file mode 100644 index 0000000..a0a0c4d --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/UseTypeFromC_Intention.java @@ -0,0 +1,69 @@ +package dynamicc.intentions; + +/*Generated by MPS */ + +import jetbrains.mps.intentions.AbstractIntentionDescriptor; +import jetbrains.mps.openapi.intentions.IntentionFactory; +import java.util.Collection; +import jetbrains.mps.openapi.intentions.IntentionExecutable; +import jetbrains.mps.openapi.intentions.Kind; +import jetbrains.mps.smodel.SNodePointer; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.openapi.editor.EditorContext; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import java.util.Collections; +import jetbrains.mps.intentions.AbstractIntentionExecutable; +import jetbrains.mps.openapi.intentions.IntentionDescriptor; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public final class UseTypeFromC_Intention extends AbstractIntentionDescriptor implements IntentionFactory { + private Collection myCachedExecutable; + public UseTypeFromC_Intention() { + super(Kind.NORMAL, false, new SNodePointer("r:b14ad5f6-81de-4f61-953c-64e0ee8829d9(dynamicc.intentions)", "2804056819677422329")); + } + @Override + public String getPresentation() { + return "UseTypeFromC"; + } + @Override + public boolean isApplicable(final SNode node, final EditorContext editorContext) { + if (!(isApplicableToNode(node, editorContext))) { + return false; + } + return true; + } + private boolean isApplicableToNode(final SNode node, final EditorContext editorContext) { + return !(SPropertyOperations.getBoolean(node, PROPS.is_c_type$8cPw)); + } + @Override + public boolean isSurroundWith() { + return false; + } + public Collection instances(final SNode node, final EditorContext context) { + if (myCachedExecutable == null) { + myCachedExecutable = Collections.singletonList(new IntentionImplementation()); + } + return myCachedExecutable; + } + /*package*/ final class IntentionImplementation extends AbstractIntentionExecutable { + public IntentionImplementation() { + } + @Override + public String getDescription(final SNode node, final EditorContext editorContext) { + return "Use Type from C"; + } + @Override + public void execute(final SNode node, final EditorContext editorContext) { + SPropertyOperations.assign(node, PROPS.is_c_type$8cPw, true); + } + @Override + public IntentionDescriptor getDescriptor() { + return UseTypeFromC_Intention.this; + } + } + + private static final class PROPS { + /*package*/ static final SProperty is_c_type$8cPw = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x26ea02d22ade0a1eL, "is_c_type"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/intentions/trace.info b/languages/dynamicc/source_gen/dynamicc/intentions/trace.info new file mode 100644 index 0000000..6539924 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/intentions/trace.info @@ -0,0 +1,747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/structure/ConceptPresentationAspectImpl.java b/languages/dynamicc/source_gen/dynamicc/structure/ConceptPresentationAspectImpl.java new file mode 100644 index 0000000..ce6157b --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/structure/ConceptPresentationAspectImpl.java @@ -0,0 +1,146 @@ +package dynamicc.structure; + +/*Generated by MPS */ + +import jetbrains.mps.smodel.runtime.ConceptPresentationAspectBase; +import jetbrains.mps.smodel.runtime.ConceptPresentation; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.smodel.runtime.ConceptPresentationBuilder; + +public class ConceptPresentationAspectImpl extends ConceptPresentationAspectBase { + private ConceptPresentation props_Assignment; + private ConceptPresentation props_CCodeBlock; + private ConceptPresentation props_Cast; + private ConceptPresentation props_Expression; + private ConceptPresentation props_Function; + private ConceptPresentation props_FunctionParameter; + private ConceptPresentation props_Int10LiteralConcept; + private ConceptPresentation props_Module; + private ConceptPresentation props_NewlineStatement; + private ConceptPresentation props_SingleLineComment; + private ConceptPresentation props_Statement; + private ConceptPresentation props_Type; + private ConceptPresentation props_ValVariable; + private ConceptPresentation props_VarVariable; + private ConceptPresentation props_Variable; + private ConceptPresentation props_VariableAccess; + + @Override + @Nullable + public ConceptPresentation getDescriptor(SAbstractConcept c) { + StructureAspectDescriptor structureDescriptor = (StructureAspectDescriptor) myLanguageRuntime.getAspect(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.class); + switch (structureDescriptor.internalIndex(c)) { + case LanguageConceptSwitch.Assignment: + if (props_Assignment == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.rawPresentation("="); + props_Assignment = cpb.create(); + } + return props_Assignment; + case LanguageConceptSwitch.CCodeBlock: + if (props_CCodeBlock == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.rawPresentation("$"); + props_CCodeBlock = cpb.create(); + } + return props_CCodeBlock; + case LanguageConceptSwitch.Cast: + if (props_Cast == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.rawPresentation("as"); + props_Cast = cpb.create(); + } + return props_Cast; + case LanguageConceptSwitch.Expression: + if (props_Expression == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + props_Expression = cpb.create(); + } + return props_Expression; + case LanguageConceptSwitch.Function: + if (props_Function == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByName(); + props_Function = cpb.create(); + } + return props_Function; + case LanguageConceptSwitch.FunctionParameter: + if (props_FunctionParameter == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByName(); + props_FunctionParameter = cpb.create(); + } + return props_FunctionParameter; + case LanguageConceptSwitch.Int10LiteralConcept: + if (props_Int10LiteralConcept == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.rawPresentation("Int10LiteralConcept"); + props_Int10LiteralConcept = cpb.create(); + } + return props_Int10LiteralConcept; + case LanguageConceptSwitch.Module: + if (props_Module == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByName(); + props_Module = cpb.create(); + } + return props_Module; + case LanguageConceptSwitch.NewlineStatement: + if (props_NewlineStatement == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.rawPresentation("NewlineStatement"); + props_NewlineStatement = cpb.create(); + } + return props_NewlineStatement; + case LanguageConceptSwitch.SingleLineComment: + if (props_SingleLineComment == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.rawPresentation("//"); + props_SingleLineComment = cpb.create(); + } + return props_SingleLineComment; + case LanguageConceptSwitch.Statement: + if (props_Statement == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + props_Statement = cpb.create(); + } + return props_Statement; + case LanguageConceptSwitch.Type: + if (props_Type == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByName(); + props_Type = cpb.create(); + } + return props_Type; + case LanguageConceptSwitch.ValVariable: + if (props_ValVariable == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByName(); + props_ValVariable = cpb.create(); + } + return props_ValVariable; + case LanguageConceptSwitch.VarVariable: + if (props_VarVariable == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByName(); + props_VarVariable = cpb.create(); + } + return props_VarVariable; + case LanguageConceptSwitch.Variable: + if (props_Variable == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + props_Variable = cpb.create(); + } + return props_Variable; + case LanguageConceptSwitch.VariableAccess: + if (props_VariableAccess == null) { + ConceptPresentationBuilder cpb = new ConceptPresentationBuilder(); + cpb.presentationByReference(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, 0x26ea02d22aef02d5L, "variable", "", ""); + props_VariableAccess = cpb.create(); + } + return props_VariableAccess; + } + return null; + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/structure/LanguageConceptSwitch.java b/languages/dynamicc/source_gen/dynamicc/structure/LanguageConceptSwitch.java new file mode 100644 index 0000000..35b26fa --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/structure/LanguageConceptSwitch.java @@ -0,0 +1,57 @@ +package dynamicc.structure; + +/*Generated by MPS */ + +import jetbrains.mps.lang.smodel.LanguageConceptIndex; +import jetbrains.mps.lang.smodel.LanguageConceptIndexBuilder; +import jetbrains.mps.smodel.adapter.ids.SConceptId; +import org.jetbrains.mps.openapi.language.SAbstractConcept; + +public final class LanguageConceptSwitch { + private final LanguageConceptIndex myIndex; + public static final int Assignment = 0; + public static final int CCodeBlock = 1; + public static final int Cast = 2; + public static final int Expression = 3; + public static final int Function = 4; + public static final int FunctionParameter = 5; + public static final int Int10LiteralConcept = 6; + public static final int Module = 7; + public static final int NewlineStatement = 8; + public static final int SingleLineComment = 9; + public static final int Statement = 10; + public static final int Type = 11; + public static final int ValVariable = 12; + public static final int VarVariable = 13; + public static final int Variable = 14; + public static final int VariableAccess = 15; + + public LanguageConceptSwitch() { + LanguageConceptIndexBuilder builder = new LanguageConceptIndexBuilder(0xa6d9727f49824bf8L, 0xabdd083fea5126abL); + builder.put(0x26ea02d22aedd030L, Assignment); + builder.put(0x26ea02d22ae8452fL, CCodeBlock); + builder.put(0x26ea02d22aedb9e6L, Cast); + builder.put(0x3a6fd2de0c382b34L, Expression); + builder.put(0x26ea02d22ae503deL, Function); + builder.put(0x26ea02d22ae503eaL, FunctionParameter); + builder.put(0x45b716564ae56561L, Int10LiteralConcept); + builder.put(0x3a6fd2de0c312b1dL, Module); + builder.put(0x3a6fd2de0c342652L, NewlineStatement); + builder.put(0x26ea02d22af0da98L, SingleLineComment); + builder.put(0x3a6fd2de0c312b1bL, Statement); + builder.put(0x3a6fd2de0c335c33L, Type); + builder.put(0x3a6fd2de0c36cfdaL, ValVariable); + builder.put(0x3a6fd2de0c345a7bL, VarVariable); + builder.put(0x3a6fd2de0c335c2eL, Variable); + builder.put(0x26ea02d22aef02d4L, VariableAccess); + myIndex = builder.seal(); + } + + /*package*/ int index(SConceptId cid) { + return myIndex.index(cid); + } + + public int index(SAbstractConcept concept) { + return myIndex.index(concept); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/structure/StructureAspectDescriptor.java b/languages/dynamicc/source_gen/dynamicc/structure/StructureAspectDescriptor.java new file mode 100644 index 0000000..f8cc082 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/structure/StructureAspectDescriptor.java @@ -0,0 +1,265 @@ +package dynamicc.structure; + +/*Generated by MPS */ + +import jetbrains.mps.smodel.runtime.BaseStructureAspectDescriptor; +import jetbrains.mps.smodel.runtime.ConceptDescriptor; +import jetbrains.mps.smodel.runtime.ConstrainedStringDatatypeDescriptor; +import jetbrains.mps.smodel.runtime.ConstrainedStringDatatypeDescriptorImpl; +import java.util.Collection; +import java.util.Arrays; +import org.jetbrains.annotations.Nullable; +import jetbrains.mps.smodel.adapter.ids.SConceptId; +import jetbrains.mps.smodel.runtime.DataTypeDescriptor; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.smodel.runtime.impl.ConceptDescriptorBuilder2; +import jetbrains.mps.smodel.adapter.ids.PrimitiveTypeId; +import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; + +public class StructureAspectDescriptor extends BaseStructureAspectDescriptor { + /*package*/ final ConceptDescriptor myConceptAssignment = createDescriptorForAssignment(); + /*package*/ final ConceptDescriptor myConceptCCodeBlock = createDescriptorForCCodeBlock(); + /*package*/ final ConceptDescriptor myConceptCast = createDescriptorForCast(); + /*package*/ final ConceptDescriptor myConceptExpression = createDescriptorForExpression(); + /*package*/ final ConceptDescriptor myConceptFunction = createDescriptorForFunction(); + /*package*/ final ConceptDescriptor myConceptFunctionParameter = createDescriptorForFunctionParameter(); + /*package*/ final ConceptDescriptor myConceptInt10LiteralConcept = createDescriptorForInt10LiteralConcept(); + /*package*/ final ConceptDescriptor myConceptModule = createDescriptorForModule(); + /*package*/ final ConceptDescriptor myConceptNewlineStatement = createDescriptorForNewlineStatement(); + /*package*/ final ConceptDescriptor myConceptSingleLineComment = createDescriptorForSingleLineComment(); + /*package*/ final ConceptDescriptor myConceptStatement = createDescriptorForStatement(); + /*package*/ final ConceptDescriptor myConceptType = createDescriptorForType(); + /*package*/ final ConceptDescriptor myConceptValVariable = createDescriptorForValVariable(); + /*package*/ final ConceptDescriptor myConceptVarVariable = createDescriptorForVarVariable(); + /*package*/ final ConceptDescriptor myConceptVariable = createDescriptorForVariable(); + /*package*/ final ConceptDescriptor myConceptVariableAccess = createDescriptorForVariableAccess(); + /*package*/ final ConstrainedStringDatatypeDescriptor myCSDatatypeInt10Literal = new ConstrainedStringDatatypeDescriptorImpl(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x45b716564ae56560L, "Int10Literal", "r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/5023508469234623840", "\d"); + private final LanguageConceptSwitch myIndexSwitch; + + public StructureAspectDescriptor() { + myIndexSwitch = new LanguageConceptSwitch(); + } + + + @Override + public void reportDependencies(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.Dependencies deps) { + deps.extendedLanguage(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, "jetbrains.mps.lang.core"); + } + + @Override + public Collection getDescriptors() { + return Arrays.asList(myConceptAssignment, myConceptCCodeBlock, myConceptCast, myConceptExpression, myConceptFunction, myConceptFunctionParameter, myConceptInt10LiteralConcept, myConceptModule, myConceptNewlineStatement, myConceptSingleLineComment, myConceptStatement, myConceptType, myConceptValVariable, myConceptVarVariable, myConceptVariable, myConceptVariableAccess); + } + + @Override + @Nullable + public ConceptDescriptor getDescriptor(SConceptId id) { + switch (myIndexSwitch.index(id)) { + case LanguageConceptSwitch.Assignment: + return myConceptAssignment; + case LanguageConceptSwitch.CCodeBlock: + return myConceptCCodeBlock; + case LanguageConceptSwitch.Cast: + return myConceptCast; + case LanguageConceptSwitch.Expression: + return myConceptExpression; + case LanguageConceptSwitch.Function: + return myConceptFunction; + case LanguageConceptSwitch.FunctionParameter: + return myConceptFunctionParameter; + case LanguageConceptSwitch.Int10LiteralConcept: + return myConceptInt10LiteralConcept; + case LanguageConceptSwitch.Module: + return myConceptModule; + case LanguageConceptSwitch.NewlineStatement: + return myConceptNewlineStatement; + case LanguageConceptSwitch.SingleLineComment: + return myConceptSingleLineComment; + case LanguageConceptSwitch.Statement: + return myConceptStatement; + case LanguageConceptSwitch.Type: + return myConceptType; + case LanguageConceptSwitch.ValVariable: + return myConceptValVariable; + case LanguageConceptSwitch.VarVariable: + return myConceptVarVariable; + case LanguageConceptSwitch.Variable: + return myConceptVariable; + case LanguageConceptSwitch.VariableAccess: + return myConceptVariableAccess; + default: + return null; + } + } + + @Override + public Collection getDataTypeDescriptors() { + return Arrays.asList(myCSDatatypeInt10Literal); + } + + /*package*/ int internalIndex(SAbstractConcept c) { + return myIndexSwitch.index(c); + } + + private static ConceptDescriptor createDescriptorForAssignment() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Assignment", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedd030L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819678171184"); + b.version(2); + b.aggregate("expression", 0x26ea02d22aedd033L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L).optional(false).ordered(true).multiple(true).origin("2804056819678171187").done(); + b.aggregate("variables", 0x45b716564adf2d6fL).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L).optional(false).ordered(true).multiple(true).origin("5023508469234216303").done(); + b.alias("="); + return b.create(); + } + private static ConceptDescriptor createDescriptorForCCodeBlock() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "CCodeBlock", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae8452fL); + b.class_(false, false, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819677807919"); + b.version(2); + b.property("code_block", 0x26ea02d22ae84530L).type(PrimitiveTypeId.STRING).origin("2804056819677807920").done(); + b.alias("$"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForCast() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Cast", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedb9e6L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Expression", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819678165478"); + b.version(2); + b.associate("type", 0x26ea02d22aedb9e9L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L).optional(false).origin("2804056819678165481").done(); + b.aggregate("expression", 0x26ea02d22aedd9c8L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L).optional(false).ordered(true).multiple(false).origin("2804056819678173640").done(); + b.alias("as"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForExpression() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Expression", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L); + b.class_(false, true, false); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027744283444"); + b.version(2); + return b.create(); + } + private static ConceptDescriptor createDescriptorForFunction() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Function", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL); + b.class_(false, false, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819677594590"); + b.version(2); + b.property("hasReturnType", 0x26ea02d22ae5074dL).type(PrimitiveTypeId.BOOLEAN).origin("2804056819677595469").done(); + b.associate("returnType", 0x26ea02d22ae5f4d2L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L).optional(true).origin("2804056819677656274").done(); + b.aggregate("parameters", 0x26ea02d22ae503e3L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503eaL).optional(true).ordered(true).multiple(true).origin("2804056819677594595").done(); + b.aggregate("statements", 0x26ea02d22ae503e1L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL).optional(true).ordered(true).multiple(true).origin("2804056819677594593").done(); + b.alias("fun"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForFunctionParameter() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "FunctionParameter", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503eaL); + b.class_(false, false, false); + b.super_("dynamicc.structure.Variable", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL); + b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819677594602"); + b.version(2); + return b.create(); + } + private static ConceptDescriptor createDescriptorForInt10LiteralConcept() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Int10LiteralConcept", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x45b716564ae56561L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Expression", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/5023508469234623841"); + b.version(2); + b.property("literal", 0x45b716564ae56562L).type(MetaIdFactory.dataTypeId(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x45b716564ae56560L)).origin("5023508469234623842").done(); + return b.create(); + } + private static ConceptDescriptor createDescriptorForModule() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Module", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL); + b.class_(false, false, true); + b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027743824669"); + b.version(2); + b.property("module", 0x3a6fd2de0c312b29L).type(PrimitiveTypeId.STRING).origin("4210816027743824681").done(); + b.aggregate("statements", 0x3a6fd2de0c312b39L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL).optional(true).ordered(true).multiple(true).origin("4210816027743824697").done(); + return b.create(); + } + private static ConceptDescriptor createDescriptorForNewlineStatement() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "NewlineStatement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c342652L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027744020050"); + b.version(2); + return b.create(); + } + private static ConceptDescriptor createDescriptorForSingleLineComment() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "SingleLineComment", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22af0da98L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819678370456"); + b.version(2); + b.property("comment", 0x26ea02d22af0da99L).type(PrimitiveTypeId.STRING).origin("2804056819678370457").done(); + b.alias("//"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForStatement() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.class_(false, true, false); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027743824667"); + b.version(2); + return b.create(); + } + private static ConceptDescriptor createDescriptorForType() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Type", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027743968307"); + b.version(2); + b.property("strong", 0x3a6fd2de0c335c36L).type(PrimitiveTypeId.BOOLEAN).origin("4210816027743968310").done(); + b.property("c_type", 0x26ea02d22addb9f2L).type(PrimitiveTypeId.STRING).origin("2804056819677116914").done(); + b.property("is_c_type", 0x26ea02d22ade0a1eL).type(PrimitiveTypeId.BOOLEAN).origin("2804056819677137438").done(); + b.associate("parent", 0x3a6fd2de0c335c38L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L).optional(true).origin("4210816027743968312").done(); + b.alias("type"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForValVariable() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "ValVariable", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c36cfdaL); + b.class_(false, false, false); + b.super_("dynamicc.structure.Variable", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027744194522"); + b.version(2); + b.alias("val"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForVarVariable() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "VarVariable", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c345a7bL); + b.class_(false, false, false); + b.super_("dynamicc.structure.Variable", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027744033403"); + b.version(2); + b.alias("var"); + return b.create(); + } + private static ConceptDescriptor createDescriptorForVariable() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "Variable", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL); + b.class_(false, true, false); + b.super_("dynamicc.structure.Statement", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1bL); + b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/4210816027743968302"); + b.version(2); + b.property("optional", 0x3a6fd2de0c335c31L).type(PrimitiveTypeId.BOOLEAN).origin("4210816027743968305").done(); + b.property("showType", 0x3a6fd2de0c36d378L).type(PrimitiveTypeId.BOOLEAN).origin("4210816027744195448").done(); + b.property("showAssignment", 0x26ea02d22aede35aL).type(PrimitiveTypeId.BOOLEAN).origin("2804056819678176090").done(); + b.associate("type", 0x3a6fd2de0c345a7cL).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L).optional(false).origin("4210816027744033404").done(); + b.aggregate("assignment", 0x26ea02d22aedd089L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L).optional(true).ordered(true).multiple(false).origin("2804056819678171273").done(); + return b.create(); + } + private static ConceptDescriptor createDescriptorForVariableAccess() { + ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("dynamicc", "VariableAccess", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L); + b.class_(false, false, false); + b.super_("dynamicc.structure.Expression", 0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c382b34L); + b.origin("r:0137df68-fadf-4334-b96f-dbc443ca6ded(dynamicc.structure)/2804056819678249684"); + b.version(2); + b.associate("variable", 0x26ea02d22aef02d5L).target(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL).optional(false).origin("2804056819678249685").done(); + return b.create(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/structure/aspectcps-descriptorclasses.mps b/languages/dynamicc/source_gen/dynamicc/structure/aspectcps-descriptorclasses.mps new file mode 100644 index 0000000..f0909b8 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/structure/aspectcps-descriptorclasses.mps @@ -0,0 +1,5847 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/structure/checkpoints b/languages/dynamicc/source_gen/dynamicc/structure/checkpoints new file mode 100644 index 0000000..1c3d505 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/structure/checkpoints @@ -0,0 +1,7 @@ + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/structure/trace.info b/languages/dynamicc/source_gen/dynamicc/structure/trace.info new file mode 100644 index 0000000..1c77d74 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/structure/trace.info @@ -0,0 +1,601 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/Assignment_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/Assignment_TextGen.java new file mode 100644 index 0000000..1d340a0 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/Assignment_TextGen.java @@ -0,0 +1,64 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.internal.collections.runtime.ListSequence; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import org.jetbrains.mps.openapi.language.SProperty; + +public class Assignment_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + if (ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).count() > 1) { + tgs.append("while(0) {"); + tgs.newLine(); + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).getElement(0), LINKS.variable$5yW0), LINKS.type$YYfM), PROPS.name$tAp1)); + tgs.append(" __assignment_temp["); + tgs.append(String.valueOf(ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).count())); + tgs.append("];"); + tgs.newLine(); + for (int i = 0; i < ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).count(); i++) { + tgs.append("__assignment_temp["); + tgs.append(String.valueOf(i)); + tgs.append("] = "); + tgs.appendNode(ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.expression$jjgu)).getElement(i)); + tgs.append(";"); + tgs.newLine(); + } + for (int i = 0; i < ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).count(); i++) { + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).getElement(i), LINKS.variable$5yW0), PROPS.name$tAp1)); + tgs.append(" = __assignment_temp["); + tgs.append(String.valueOf(i)); + tgs.append("];"); + tgs.newLine(); + } + tgs.append("}"); + tgs.newLine(); + } else { + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.variables$hrz_)).getElement(0), LINKS.variable$5yW0), PROPS.name$tAp1)); + tgs.append(" = "); + tgs.appendNode(ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.expression$jjgu)).getElement(0)); + tgs.append(";"); + tgs.newLine(); + } + } + + private static final class LINKS { + /*package*/ static final SContainmentLink variables$hrz_ = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedd030L, 0x45b716564adf2d6fL, "variables"); + /*package*/ static final SReferenceLink variable$5yW0 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, 0x26ea02d22aef02d5L, "variable"); + /*package*/ static final SReferenceLink type$YYfM = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c345a7cL, "type"); + /*package*/ static final SContainmentLink expression$jjgu = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedd030L, 0x26ea02d22aedd033L, "expression"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/CCodeBlock_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/CCodeBlock_TextGen.java new file mode 100644 index 0000000..d20d7f6 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/CCodeBlock_TextGen.java @@ -0,0 +1,24 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public class CCodeBlock_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.newLine(); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.code_block$Mrpb)); + tgs.newLine(); + } + + private static final class PROPS { + /*package*/ static final SProperty code_block$Mrpb = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae8452fL, 0x26ea02d22ae84530L, "code_block"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/Cast_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/Cast_TextGen.java new file mode 100644 index 0000000..3667998 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/Cast_TextGen.java @@ -0,0 +1,34 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import org.jetbrains.mps.openapi.language.SProperty; + +public class Cast_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append("(("); + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.type$LtG9), PROPS.name$tAp1)); + tgs.append(") "); + tgs.appendNode(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.expression$nPT1)); + tgs.append(")"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink type$LtG9 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedb9e6L, 0x26ea02d22aedb9e9L, "type"); + /*package*/ static final SContainmentLink expression$nPT1 = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aedb9e6L, 0x26ea02d22aedd9c8L, "expression"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/FunctionParameter_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/FunctionParameter_TextGen.java new file mode 100644 index 0000000..c6ce86f --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/FunctionParameter_TextGen.java @@ -0,0 +1,30 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SProperty; + +public class FunctionParameter_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.type$YYfM), PROPS.name$tAp1)); + tgs.append(" "); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.name$tAp1)); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink type$YYfM = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c345a7cL, "type"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/Function_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/Function_TextGen.java new file mode 100644 index 0000000..bc674c4 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/Function_TextGen.java @@ -0,0 +1,54 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.internal.collections.runtime.Sequence; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import org.jetbrains.mps.openapi.language.SProperty; + +public class Function_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append((SPropertyOperations.getBoolean(ctx.getPrimaryInput(), PROPS.hasReturnType$GLJn) ? SPropertyOperations.getString(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.returnType$OMq5), PROPS.name$tAp1) : "void")); + tgs.append(" "); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.name$tAp1)); + tgs.append("("); + { + Iterable collection = SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.parameters$DodW); + final SNode lastItem = Sequence.fromIterable(collection).last(); + for (SNode item : collection) { + tgs.appendNode(item); + if (item != lastItem) { + tgs.append(", "); + } + } + } + tgs.append(") {"); + tgs.newLine(); + for (SNode item : SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.statements$DocY)) { + tgs.appendNode(item); + } + tgs.append("}"); + tgs.newLine(); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink returnType$OMq5 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae5f4d2L, "returnType"); + /*package*/ static final SContainmentLink parameters$DodW = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae503e3L, "parameters"); + /*package*/ static final SContainmentLink statements$DocY = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae503e1L, "statements"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + /*package*/ static final SProperty hasReturnType$GLJn = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22ae503deL, 0x26ea02d22ae5074dL, "hasReturnType"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/Module_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/Module_TextGen.java new file mode 100644 index 0000000..bb4f9c8 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/Module_TextGen.java @@ -0,0 +1,36 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import org.jetbrains.mps.openapi.model.SNode; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SContainmentLink; + +public class Module_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append("/*"); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.module$HXDb)); + tgs.append("*/"); + tgs.newLine(); + tgs.newLine(); + for (SNode item : SLinkOperations.getChildren(ctx.getPrimaryInput(), LINKS.statements$HXV6)) { + tgs.appendNode(item); + } + } + + private static final class PROPS { + /*package*/ static final SProperty module$HXDb = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL, 0x3a6fd2de0c312b29L, "module"); + } + + private static final class LINKS { + /*package*/ static final SContainmentLink statements$HXV6 = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL, 0x3a6fd2de0c312b39L, "statements"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/NewlineStatement_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/NewlineStatement_TextGen.java new file mode 100644 index 0000000..4ec955e --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/NewlineStatement_TextGen.java @@ -0,0 +1,15 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; + +public class NewlineStatement_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.newLine(); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/SingleLineComment_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/SingleLineComment_TextGen.java new file mode 100644 index 0000000..93e205a --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/SingleLineComment_TextGen.java @@ -0,0 +1,24 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public class SingleLineComment_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append("// "); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.comment$tyN0)); + tgs.newLine(); + } + + private static final class PROPS { + /*package*/ static final SProperty comment$tyN0 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22af0da98L, 0x26ea02d22af0da99L, "comment"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/TextGenAspectDescriptor.java b/languages/dynamicc/source_gen/dynamicc/textGen/TextGenAspectDescriptor.java new file mode 100644 index 0000000..bc9238b --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/TextGenAspectDescriptor.java @@ -0,0 +1,73 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenAspectBase; +import dynamicc.structure.LanguageConceptSwitch; +import org.jetbrains.annotations.Nullable; +import jetbrains.mps.text.rt.TextGenDescriptor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.mps.openapi.language.SAbstractConcept; +import jetbrains.mps.text.rt.TextGenModelOutline; +import org.jetbrains.mps.openapi.model.SNode; +import org.jetbrains.mps.openapi.language.SConcept; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; + +public class TextGenAspectDescriptor extends TextGenAspectBase { + private final LanguageConceptSwitch myIndex = new LanguageConceptSwitch(); + + public TextGenAspectDescriptor() { + } + + @Nullable + @Override + public TextGenDescriptor getDescriptor(@NotNull SAbstractConcept concept) { + switch (myIndex.index(concept)) { + case LanguageConceptSwitch.Assignment: + return new Assignment_TextGen(); + case LanguageConceptSwitch.CCodeBlock: + return new CCodeBlock_TextGen(); + case LanguageConceptSwitch.Cast: + return new Cast_TextGen(); + case LanguageConceptSwitch.Function: + return new Function_TextGen(); + case LanguageConceptSwitch.FunctionParameter: + return new FunctionParameter_TextGen(); + case LanguageConceptSwitch.Module: + return new Module_TextGen(); + case LanguageConceptSwitch.NewlineStatement: + return new NewlineStatement_TextGen(); + case LanguageConceptSwitch.SingleLineComment: + return new SingleLineComment_TextGen(); + case LanguageConceptSwitch.Type: + return new Type_TextGen(); + case LanguageConceptSwitch.Variable: + return new Variable_TextGen(); + case LanguageConceptSwitch.VariableAccess: + return new VariableAccess_TextGen(); + } + return null; + } + + @Override + public void breakdownToUnits(@NotNull TextGenModelOutline outline) { + for (SNode root : outline.getModel().getRootNodes()) { + if (root.getConcept().equals(CONCEPTS.Module$l1)) { + String fname = getFileName_Module(root); + String ext = getFileExtension_Module(root); + outline.registerTextUnit((ext == null ? fname : (fname + '.' + ext)), root); + continue; + } + } + } + private static String getFileName_Module(SNode node) { + return node.getName(); + } + private static String getFileExtension_Module(SNode node) { + return "c"; + } + + private static final class CONCEPTS { + /*package*/ static final SConcept Module$l1 = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c312b1dL, "dynamicc.structure.Module"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/Type_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/Type_TextGen.java new file mode 100644 index 0000000..6a1242a --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/Type_TextGen.java @@ -0,0 +1,36 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.language.SProperty; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SReferenceLink; + +public class Type_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append("typedef"); + tgs.append(" "); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.name$tAp1)); + tgs.append(" "); + tgs.append((SPropertyOperations.getBoolean(ctx.getPrimaryInput(), PROPS.is_c_type$8cPw) ? SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.c_type$EO9Y) : SPropertyOperations.getString(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.parent$_PFB), PROPS.name$tAp1))); + tgs.append(";"); + tgs.newLine(); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + /*package*/ static final SProperty c_type$EO9Y = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x26ea02d22addb9f2L, "c_type"); + /*package*/ static final SProperty is_c_type$8cPw = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x26ea02d22ade0a1eL, "is_c_type"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink parent$_PFB = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c33L, 0x3a6fd2de0c335c38L, "parent"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/VariableAccess_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/VariableAccess_TextGen.java new file mode 100644 index 0000000..1b6996e --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/VariableAccess_TextGen.java @@ -0,0 +1,28 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SProperty; + +public class VariableAccess_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.variable$5yW0), PROPS.name$tAp1)); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink variable$5yW0 = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x26ea02d22aef02d4L, 0x26ea02d22aef02d5L, "variable"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/Variable_TextGen.java b/languages/dynamicc/source_gen/dynamicc/textGen/Variable_TextGen.java new file mode 100644 index 0000000..fcf1ee4 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/Variable_TextGen.java @@ -0,0 +1,44 @@ +package dynamicc.textGen; + +/*Generated by MPS */ + +import jetbrains.mps.text.rt.TextGenDescriptorBase; +import jetbrains.mps.text.rt.TextGenContext; +import jetbrains.mps.text.impl.TextGenSupport; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; +import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; +import org.jetbrains.mps.openapi.language.SConcept; +import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; +import org.jetbrains.mps.openapi.language.SReferenceLink; +import org.jetbrains.mps.openapi.language.SContainmentLink; +import org.jetbrains.mps.openapi.language.SProperty; + +public class Variable_TextGen extends TextGenDescriptorBase { + @Override + public void generateText(final TextGenContext ctx) { + final TextGenSupport tgs = new TextGenSupport(ctx); + tgs.append((SConceptOperations.isExactly(SNodeOperations.asSConcept(SNodeOperations.getConcept(ctx.getPrimaryInput())), CONCEPTS.ValVariable$HQ) ? "const " : "")); + tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.type$YYfM), PROPS.name$tAp1)); + tgs.append(" "); + tgs.append(SPropertyOperations.getString(ctx.getPrimaryInput(), PROPS.name$tAp1)); + tgs.append((SPropertyOperations.getBoolean(ctx.getPrimaryInput(), PROPS.showAssignment$Lo_7) ? " = " + SLinkOperations.getTarget(ctx.getPrimaryInput(), LINKS.assignment$vZlr) : "")); + tgs.append(";"); + tgs.newLine(); + } + + private static final class CONCEPTS { + /*package*/ static final SConcept ValVariable$HQ = MetaAdapterFactory.getConcept(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c36cfdaL, "dynamicc.structure.ValVariable"); + } + + private static final class LINKS { + /*package*/ static final SReferenceLink type$YYfM = MetaAdapterFactory.getReferenceLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x3a6fd2de0c345a7cL, "type"); + /*package*/ static final SContainmentLink assignment$vZlr = MetaAdapterFactory.getContainmentLink(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x26ea02d22aedd089L, "assignment"); + } + + private static final class PROPS { + /*package*/ static final SProperty name$tAp1 = MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"); + /*package*/ static final SProperty showAssignment$Lo_7 = MetaAdapterFactory.getProperty(0xa6d9727f49824bf8L, 0xabdd083fea5126abL, 0x3a6fd2de0c335c2eL, 0x26ea02d22aede35aL, "showAssignment"); + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/aspectcps-descriptorclasses.mps b/languages/dynamicc/source_gen/dynamicc/textGen/aspectcps-descriptorclasses.mps new file mode 100644 index 0000000..a69ff70 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/aspectcps-descriptorclasses.mps @@ -0,0 +1,6533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/checkpoints b/languages/dynamicc/source_gen/dynamicc/textGen/checkpoints new file mode 100644 index 0000000..1c3d505 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/checkpoints @@ -0,0 +1,7 @@ + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/textGen/trace.info b/languages/dynamicc/source_gen/dynamicc/textGen/trace.info new file mode 100644 index 0000000..272959e --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/textGen/trace.info @@ -0,0 +1,388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/trace.info b/languages/dynamicc/source_gen/dynamicc/trace.info new file mode 100644 index 0000000..a17db0c --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/trace.info @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/typesystem/TypesystemDescriptor.java b/languages/dynamicc/source_gen/dynamicc/typesystem/TypesystemDescriptor.java new file mode 100644 index 0000000..f1bc26f --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/typesystem/TypesystemDescriptor.java @@ -0,0 +1,10 @@ +package dynamicc.typesystem; + +/*Generated by MPS */ + +import jetbrains.mps.lang.typesystem.runtime.BaseHelginsDescriptor; + +public class TypesystemDescriptor extends BaseHelginsDescriptor { + public TypesystemDescriptor() { + } +} diff --git a/languages/dynamicc/source_gen/dynamicc/typesystem/aspectcps-descriptorclasses.mps b/languages/dynamicc/source_gen/dynamicc/typesystem/aspectcps-descriptorclasses.mps new file mode 100644 index 0000000..6532445 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/typesystem/aspectcps-descriptorclasses.mps @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/typesystem/checkpoints b/languages/dynamicc/source_gen/dynamicc/typesystem/checkpoints new file mode 100644 index 0000000..1c3d505 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/typesystem/checkpoints @@ -0,0 +1,7 @@ + + + + + + + diff --git a/languages/dynamicc/source_gen/dynamicc/typesystem/trace.info b/languages/dynamicc/source_gen/dynamicc/typesystem/trace.info new file mode 100644 index 0000000..97b73b4 --- /dev/null +++ b/languages/dynamicc/source_gen/dynamicc/typesystem/trace.info @@ -0,0 +1,9 @@ + + + + + + + + +