From 1595ede334b93c0ffd3bc91d58702b4cdcade386 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Fri, 15 Mar 2024 19:43:08 +0100 Subject: [PATCH 1/6] Mark MultilineUtil#escapeText and MultilineUtil#unescapeJavaIfAvailable as deprecated --- .../slisson/mps/editor/multiline/runtime.mps | 288 +++--------------- 1 file changed, 49 insertions(+), 239 deletions(-) diff --git a/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps b/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps index 8d5a94762..8905609cd 100644 --- a/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps +++ b/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps @@ -4,6 +4,7 @@ + @@ -28,6 +29,12 @@ + + + + + + @@ -134,7 +141,25 @@ + + + + + + + + + + + + + + + + + + @@ -462,34 +487,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -500,6 +497,18 @@ + + + + + + + + + + + + @@ -507,217 +516,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -730,6 +528,18 @@ + + + + + + + + + + + + From 00253bc9b2fa64ccb40a85f99dd08050c104118c Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Mon, 18 Mar 2024 09:19:25 +0100 Subject: [PATCH 2/6] Fail the build when tests fail --- build.gradle | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/build.gradle b/build.gradle index 909d8af4e..2f5ef842b 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ plugins { } import de.itemis.mps.gradle.* +import groovy.xml.XmlSlurper import java.time.LocalDateTime @@ -228,12 +229,42 @@ task build_tests(type: BuildLanguages, dependsOn: build_languages) { script scriptFile('tests/build.xml') } +task failOnTestError() { + description 'evaluate junit result and fail on error' + doLast { + + def juniXml = file('TESTS-TestSuites.xml') + if(juniXml.exists()){ + def junitResult = new XmlSlurper().parse(juniXml) + def failures = junitResult.'**'.findAll { it.name() == 'failure' } + def errors = junitResult.'**'.findAll { it.name() == 'error' } + + if (failures || errors) { + def amount = failures.size() + errors.size() + throw new GradleException(amount + " JUnit tests failed. Check the test report for details.") + } + } + } +} + task run_tests(type: TestLanguages, dependsOn: build_tests) { description "Will execute all tests from command line" script scriptFile('tests/build.xml') targets 'check' + doLast { + ant.taskdef(name: 'junitreport', + classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator', + classpath: configurations.junitAnt.asPath) + ant.junitreport { + fileset(dir: "$buildDir", includes: '**/TEST*.xml') + report(format: 'frames', todir: "$buildDir/junitreport") + } + ant.echo("JUnit report placed into $buildDir/junitreport/index.html") + } } +run_tests.configure { finalizedBy failOnTestError } + task install_nativelibs(type: Copy, dependsOn: build_languages) { from "$rootDir/artifacts/de.itemis.mps.extensions/" include "de.itemis.mps.nativelibs.loader/" From 8d8a23394f6720a5f558d7601f8bcfcd59a6cf5b Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Tue, 19 Mar 2024 20:23:00 +0100 Subject: [PATCH 3/6] grammarcells: remove duplicate editor cell models from the cc menu --- .../mbeddr/mpsutil/grammarcells/editor.mps | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps index 46e918777..a83938973 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps @@ -20,9 +20,6 @@ - - - @@ -81,9 +78,6 @@ - - - @@ -2403,26 +2397,6 @@ - - - - - - - - - - - - - - - - - - - - From 0b28b892e89f8e4343619f2bc0252557e8e820f3 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Tue, 19 Mar 2024 20:23:41 +0100 Subject: [PATCH 4/6] grammarcells: hide IncludeParentSideTransformations from the cc menu --- .../models/com/mbeddr/mpsutil/grammarcells/editor.mps | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps index a83938973..626ac8449 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps @@ -2532,5 +2532,10 @@ + + + + + From 32d19d2fc32d8e2e80279a2b516bea541259fbd7 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Tue, 19 Mar 2024 20:26:44 +0100 Subject: [PATCH 5/6] grammarcells: use a different color for the node substitute cell --- .../models/com/mbeddr/mpsutil/grammarcells/editor.mps | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps index 626ac8449..67251c9ac 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps @@ -1733,9 +1733,7 @@ - - - + From eb7716826114659c4e1df6797c1804b990198d16 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Tue, 19 Mar 2024 20:38:18 +0100 Subject: [PATCH 6/6] grammarcells: rename some side transformation cells --- .../generator/template/main@generator.mps | 26 +++++++-------- .../mbeddr/mpsutil/grammarcells/behavior.mps | 12 +++---- .../mpsutil/grammarcells/constraints.mps | 2 +- .../mbeddr/mpsutil/grammarcells/editor.mps | 16 +++++----- .../mbeddr/mpsutil/grammarcells/structure.mps | 32 +++++++++---------- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps index 6aa409bfb..d7e5f13ae 100755 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps @@ -546,7 +546,7 @@ - + @@ -563,7 +563,7 @@ - + @@ -8064,7 +8064,7 @@ - + @@ -8661,7 +8661,7 @@ - + @@ -8705,11 +8705,11 @@ - + - + @@ -16958,7 +16958,7 @@ - + @@ -17171,7 +17171,7 @@ - + @@ -18489,7 +18489,7 @@ - + @@ -18513,7 +18513,7 @@ - + @@ -26322,7 +26322,7 @@ - + @@ -27157,7 +27157,7 @@ - + @@ -29376,7 +29376,7 @@ - + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps index 3c369dff3..996a57bf8 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps @@ -2403,7 +2403,7 @@ - + @@ -2692,7 +2692,7 @@ - + @@ -2745,7 +2745,7 @@ - + @@ -2793,7 +2793,7 @@ - + @@ -2847,7 +2847,7 @@ - + @@ -4545,7 +4545,7 @@ - + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps index 1596a0e46..e3f44a3a7 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps @@ -124,7 +124,7 @@ - + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps index 67251c9ac..4548e0858 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps @@ -1630,7 +1630,7 @@ - + @@ -1678,7 +1678,7 @@ - + @@ -1765,7 +1765,7 @@ - + @@ -1780,7 +1780,7 @@ - + @@ -1855,7 +1855,7 @@ - + @@ -1876,7 +1876,7 @@ - + @@ -2424,7 +2424,7 @@ - + @@ -2438,7 +2438,7 @@ - + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps index 095fa05c5..9267ee206 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps @@ -587,8 +587,8 @@ - - + + @@ -689,7 +689,7 @@ - + @@ -703,21 +703,21 @@ - + - + - + @@ -731,19 +731,19 @@ - + - + - + @@ -758,8 +758,8 @@ - - + + @@ -779,21 +779,21 @@ - + - + - + @@ -1093,8 +1093,8 @@ - - + +