From 8eb53d0de18e76c32eb95919717a6fc69ea38d72 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Fri, 6 Sep 2024 20:12:10 +0200 Subject: [PATCH] mpsutil.margincell: use an anchestor cell when the attached cell can't be found --- CHANGELOG.md | 8 + .../com.mbeddr.mpsutil.review.readonly.mpl | 1 + .../languageModels/editor.mps | 31 ++++ .../languageModels/structure.mps | 25 +++ .../com/mbeddr/mpsutil/margincell/runtime.mps | 168 ++++++++++++++---- .../com/mbeddr/mpsutil/review/sandbox.mps | 49 +++++ 6 files changed, 243 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e14cc4628ef..765ca314bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is _loosely_ based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The project does _not_ follow Semantic Versioning and the changes are simply documented in reverse chronological order, grouped by calendar month. +# September 2024 + +## com.mbeddr.mpsutil.margincell + +### Fixed + +- When the attached cell can't be found (e.g. it is collapsed), the next suitable anchestor cell is now used to align the margin cell. + # August 2024 ## com.mbeddr.mpsutil.traceExplorer diff --git a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl index 557eade72ed..04f0c8a3ae0 100644 --- a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl +++ b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl @@ -20,6 +20,7 @@ + diff --git a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps index 71beae8fe8f..f269d8feea7 100644 --- a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps +++ b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps @@ -6,6 +6,7 @@ + @@ -13,10 +14,14 @@ + + + + @@ -40,9 +45,11 @@ + + @@ -81,6 +88,15 @@ + + + + + + + + + @@ -119,5 +135,20 @@ + + + + + + + + + + + + + + + diff --git a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps index 0a396ed3f27..5df587aaee6 100644 --- a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps +++ b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps @@ -15,9 +15,13 @@ + + + + @@ -52,5 +56,26 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps index 8e0a9f01ffd..c9c97a23370 100644 --- a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps +++ b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps @@ -28,6 +28,7 @@ + @@ -282,6 +283,11 @@ + + + + + @@ -291,9 +297,6 @@ - - - @@ -801,6 +804,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1141,8 +1171,17 @@ - - + + + + + + + + + + + @@ -1156,8 +1195,8 @@ - - + + @@ -1166,46 +1205,88 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + + @@ -3888,13 +3969,22 @@ - - - - + + + + + + + + + + + + + - - + + diff --git a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps index 43cbd847700..86bfb57d4cd 100644 --- a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps +++ b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps @@ -56,6 +56,10 @@ + + + + @@ -243,5 +247,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +