Skip to content

Commit

Permalink
Merge pull request #850 from JetBrains/bugfix/headlessexception_diagrams
Browse files Browse the repository at this point in the history
Make diagrams work in headless mode (e.g. for documentation generation)
  • Loading branch information
alexanderpann authored Jun 5, 2024
2 parents 5c4226e + 78a305a commit e691b16
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 30 deletions.
36 changes: 6 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project are 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 documented in reverse chronological order, grouped by calendar month.

## June 2024

### Fixed

- *de.itemis.mps.editor.diagram.runtime*: Diagrams can now be used in an headless environment (e.g. for rendering documentation).

## May 2024

### Fixed
Expand All @@ -21,15 +27,6 @@ The format is *loosely* based on [Keep a Changelog](https://keepachangelog.com/e
### Added

- A new language *de.itemis.mps.changelog* was added to describe *CHANGELOG.md* files. This file is generated with this language.
- com.mbeddr.mpsutil.projectview: Class reloading of project views now works.
- com.mbeddr.mpsutil.editor.querylist: Query lists now support model checking for non-dynamically generated nodes and `collapse by default` is generated correctly.
- com.mbeddr.mpsutil.editor.querylist: The element's concept is not automatically forced anymore but is now rather a suggestion.
- de.slisson.mps.reflection: To fix the compilatation issues, the language is now generated earlier in the generation plan.
- de.slisson.mps.richtext: The duplicate action that overwrites the MPS action was added back and now duplicating lines should work again.

### Added

- com.mbeddr.mpsutil.editor.querylist: the `insert new` and `delete element` blocks now have an `editorContext` parameter.

## March 2024

Expand All @@ -41,30 +38,9 @@ The format is *loosely* based on [Keep a Changelog](https://keepachangelog.com/e
### Fixed

- *com.mbeddr.mpsutil.editor.querylist*: Returning null in the query shows the empty cell again (regression).
- de.slisson.mps.richtext: Various small issues were fixed (e.g. NullPointerExceptions, usability problems).
- de.slisson.mps.editor.multiline: Selections are now correctly painted.
- com.mbeddr.mpsutil.editor.querylist: return null in the query shows the empty cell again (regression).

### Changed

- de.slisson.mps.richtext: Words are automatically insert as the default concept for IWord.
- de.slisson.mps.richtext: The faulty duplicate line action was removed.

### Removed

- com.mbeddr.mpsutil.projectview: The broken parameter `project` from the `Is Default` condition was removed. Use the variable `mpsProject` instead.

## February 2024

### Added

- com.mbeddr.mpsutil.blutil: A new ifInstanceOf statement was added that supports else if and else branches.

### Fixed

- de.itemis.mps.editor.diagram: Avoid unnecessary layouting of sub-diagrams.
- de.itemis.mps.editor.diagram: A layouting bug related to ports was fixed.

### Changed

- *com.mbeddr.mpsutil.editor.querylist*: Dynamic generated nodes (without a model) can now be used in query lists if read-only is set to true.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33680,6 +33680,58 @@
<ref role="2AI5Lk" to="wyt6:~Override" resolve="Override" />
</node>
</node>
<node concept="3clFb_" id="4Up3BNP1lHq" role="jymVt">
<property role="TrG5h" value="installDragGestureHandler" />
<node concept="3Tmbuc" id="4Up3BNP1lHr" role="1B3o_S" />
<node concept="3cqZAl" id="4Up3BNP1lHt" role="3clF45" />
<node concept="3clFbS" id="4Up3BNP1lHu" role="3clF47">
<node concept="3clFbJ" id="4Up3BNP1xGd" role="3cqZAp">
<node concept="3clFbS" id="4Up3BNP1xGf" role="3clFbx">
<node concept="3clFbF" id="4Up3BNP1lHx" role="3cqZAp">
<node concept="3nyPlj" id="4Up3BNP1lHw" role="3clFbG">
<ref role="37wK5l" to="qveq:~mxGraphHandler.installDragGestureHandler()" resolve="installDragGestureHandler" />
</node>
</node>
</node>
<node concept="3fqX7Q" id="4Up3BNP1FLl" role="3clFbw">
<node concept="2YIFZM" id="4Up3BNP1FLn" role="3fr31v">
<ref role="37wK5l" to="z60i:~GraphicsEnvironment.isHeadless()" resolve="isHeadless" />
<ref role="1Pybhc" to="z60i:~GraphicsEnvironment" resolve="GraphicsEnvironment" />
</node>
</node>
</node>
</node>
<node concept="2AHcQZ" id="4Up3BNP1lHv" role="2AJF6D">
<ref role="2AI5Lk" to="wyt6:~Override" />
</node>
</node>
<node concept="2tJIrI" id="4Up3BNP1pjr" role="jymVt" />
<node concept="2tJIrI" id="4Up3BNP1qFw" role="jymVt" />
<node concept="3clFb_" id="4Up3BNP1s$V" role="jymVt">
<property role="TrG5h" value="installDropTargetHandler" />
<node concept="3Tmbuc" id="4Up3BNP1s$W" role="1B3o_S" />
<node concept="3cqZAl" id="4Up3BNP1s$Y" role="3clF45" />
<node concept="3clFbS" id="4Up3BNP1s$Z" role="3clF47">
<node concept="3clFbJ" id="4Up3BNP1MkN" role="3cqZAp">
<node concept="3clFbS" id="4Up3BNP1MkP" role="3clFbx">
<node concept="3clFbF" id="4Up3BNP1s_2" role="3cqZAp">
<node concept="3nyPlj" id="4Up3BNP1s_1" role="3clFbG">
<ref role="37wK5l" to="qveq:~mxGraphHandler.installDropTargetHandler()" resolve="installDropTargetHandler" />
</node>
</node>
</node>
<node concept="3fqX7Q" id="4Up3BNP1NYU" role="3clFbw">
<node concept="2YIFZM" id="4Up3BNP1QQm" role="3fr31v">
<ref role="37wK5l" to="z60i:~GraphicsEnvironment.isHeadless()" resolve="isHeadless" />
<ref role="1Pybhc" to="z60i:~GraphicsEnvironment" resolve="GraphicsEnvironment" />
</node>
</node>
</node>
</node>
<node concept="2AHcQZ" id="4Up3BNP1s_0" role="2AJF6D">
<ref role="2AI5Lk" to="wyt6:~Override" />
</node>
</node>
<node concept="2tJIrI" id="6GddiZH9cQ1" role="jymVt" />
<node concept="2tJIrI" id="6GddiZH9cQz" role="jymVt" />
<node concept="3clFb_" id="6GddiZH9d9F" role="jymVt">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<concept id="961540447472285554" name="de.itemis.mps.changelog.structure.ModuleReference" flags="ng" index="15Ami3">
<child id="961540447472292029" name="expression" index="15Aodc" />
</concept>
<concept id="961540447472579023" name="de.itemis.mps.changelog.structure.ModelReference" flags="ng" index="15Bu8Y">
<child id="961540447472579024" name="expression" index="15Bu8x" />
</concept>
<concept id="961540447472676435" name="de.itemis.mps.changelog.structure.NodeReference" flags="ng" index="15BRQy">
<child id="961540447472676436" name="expression" index="15BRQ_" />
</concept>
Expand All @@ -50,6 +53,13 @@
<property id="1863527487546097500" name="moduleId" index="1XweGW" />
<property id="1863527487545993577" name="moduleName" index="1XxBO9" />
</concept>
<concept id="361130699826193248" name="jetbrains.mps.lang.modelapi.structure.ModelPointer" flags="ng" index="1dCxOl">
<property id="1863527487546097494" name="modelId" index="1XweGQ" />
<child id="679099339649067980" name="name" index="1j$8Uc" />
</concept>
<concept id="679099339649053840" name="jetbrains.mps.lang.modelapi.structure.ModelName" flags="ng" index="1j_P7g">
<property id="679099339649053841" name="value" index="1j_P7h" />
</concept>
</language>
<language id="7866978e-a0f0-4cc7-81bc-4d213d9375e1" name="jetbrains.mps.lang.smodel">
<concept id="7400021826774799413" name="jetbrains.mps.lang.smodel.structure.NodePointerExpression" flags="ng" index="2tJFMh">
Expand All @@ -58,6 +68,9 @@
<concept id="1678062499342629858" name="jetbrains.mps.lang.smodel.structure.ModuleRefExpression" flags="ng" index="37shsh">
<child id="1678062499342629861" name="moduleId" index="37shsm" />
</concept>
<concept id="1863527487546129879" name="jetbrains.mps.lang.smodel.structure.ModelPointerExpression" flags="ng" index="1Xw6AR">
<child id="1863527487546132519" name="modelRef" index="1XwpL7" />
</concept>
</language>
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
Expand Down Expand Up @@ -214,6 +227,72 @@
</node>
</node>
</node>
<node concept="15bmVD" id="4Up3BNPqrvi" role="15bmVC">
<node concept="15ShDW" id="4Up3BNPqrvf" role="15bq2Y">
<property role="15ShDY" value="Po4Z58IgAC/June" />
<property role="15ShDw" value="2024" />
</node>
<node concept="15bAme" id="4Up3BNPqrvg" role="15bAlL">
<node concept="2DRihI" id="4Up3BNPqrvh" role="15bAlk">
<node concept="2hgSXJ" id="4Up3BNPqunt" role="1PaTwD">
<node concept="1PaTwC" id="4Up3BNPqunu" role="2hiFM$">
<node concept="15Bu8Y" id="4Up3BNPqunv" role="1PaTwD">
<node concept="1Xw6AR" id="4Up3BNPqunw" role="15Bu8x">
<node concept="1dCxOl" id="4Up3BNPqunx" role="1XwpL7">
<property role="1XweGQ" value="r:2a70cba0-4dc5-4697-986d-5cba44622d22" />
<node concept="1j_P7g" id="4Up3BNPquny" role="1j$8Uc">
<property role="1j_P7h" value="de.itemis.mps.editor.diagram.runtime" />
</node>
</node>
</node>
</node>
<node concept="3oM_SD" id="4Up3BNPqunz" role="1PaTwD">
<property role="3oM_SC" value=":" />
</node>
</node>
</node>
<node concept="3oM_SD" id="4Up3BNPqunI" role="1PaTwD">
<property role="3oM_SC" value="Diagrams" />
</node>
<node concept="3oM_SD" id="4Up3BNPqunR" role="1PaTwD">
<property role="3oM_SC" value="can" />
</node>
<node concept="3oM_SD" id="4Up3BNPquo1" role="1PaTwD">
<property role="3oM_SC" value="now" />
</node>
<node concept="3oM_SD" id="4Up3BNPquoc" role="1PaTwD">
<property role="3oM_SC" value="be" />
</node>
<node concept="3oM_SD" id="4Up3BNPquoo" role="1PaTwD">
<property role="3oM_SC" value="used" />
</node>
<node concept="3oM_SD" id="4Up3BNPquo_" role="1PaTwD">
<property role="3oM_SC" value="in" />
</node>
<node concept="3oM_SD" id="4Up3BNPquoN" role="1PaTwD">
<property role="3oM_SC" value="an" />
</node>
<node concept="3oM_SD" id="4Up3BNPqup2" role="1PaTwD">
<property role="3oM_SC" value="headless" />
</node>
<node concept="3oM_SD" id="4Up3BNPqupi" role="1PaTwD">
<property role="3oM_SC" value="environment" />
</node>
<node concept="3oM_SD" id="4Up3BNPqupz" role="1PaTwD">
<property role="3oM_SC" value="(e.g." />
</node>
<node concept="3oM_SD" id="4Up3BNPqupP" role="1PaTwD">
<property role="3oM_SC" value="for" />
</node>
<node concept="3oM_SD" id="4Up3BNPquq8" role="1PaTwD">
<property role="3oM_SC" value="rendering" />
</node>
<node concept="3oM_SD" id="4Up3BNPquqs" role="1PaTwD">
<property role="3oM_SC" value="documentation)." />
</node>
</node>
</node>
</node>
<node concept="15bmVD" id="5m0DUSLO1QS" role="15bmVC">
<node concept="15ShDW" id="5m0DUSLO1QP" role="15bq2Y">
<property role="15ShDY" value="Po4Z58IgAy/May" />
Expand Down

0 comments on commit e691b16

Please sign in to comment.