Skip to content

Commit

Permalink
Merge pull request #844 from JetBrains/feature/more_elk_options
Browse files Browse the repository at this point in the history
editor.diagram: Expose more ELK options
  • Loading branch information
alexanderpann authored Jun 6, 2024
2 parents e691b16 + 2cebaa7 commit c2011b0
Show file tree
Hide file tree
Showing 46 changed files with 64,220 additions and 9,734 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ The format is *loosely* based on [Keep a Changelog](https://keepachangelog.com/e

## May 2024

### Added

- *de.itemis.mps.editor.diagram*: Support for 10 new layout algorithms was added. Most of the options of the ELK layouter (150 options) can be customized through style class items. All options can also be set in the inspector of the chosen layout algorithm in the diagram cell. There is now also a new option *connect boxes without dummy ports* to not create dummy ports anymore when connecting 2 boxes. This avoids merging of edges from the same ports (hyperedges).

### Fixed

- *de.itemis.mps.editor.celllayout.runtime*: A bug with overlapping cells when mixing indent and horizontal/vertical layouts was fixed.
Expand Down
18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,24 @@ dependencies {
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.mrtree:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.radial:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.force:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.disco:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.rectpacking:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.spore:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.alg.topdownpacking:$elkVersion") {
transitive = false
}
diagram_lib ("org.eclipse.elk:org.eclipse.elk.core:$elkVersion") {
transitive = false
}
Expand Down
2 changes: 2 additions & 0 deletions code/.mps/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@
<modulePath path="$PROJECT_DIR$/diagram/devkits/de.itemis.mps.editor.diagram.devkit.devkit" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.demo.activity/de.itemis.mps.editor.diagram.demo.activity.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.demo.callgraph/de.itemis.mps.editor.diagram.demo.callgraph.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.demo.elk/de.itemis.mps.editor.diagram.demo.elk.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.demoentities/de.itemis.mps.editor.diagram.demoentities.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.demolang/de.itemis.mps.editor.diagram.demolang.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.layout/de.itemis.mps.editor.diagram.layout.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram.styles/de.itemis.mps.editor.diagram.styles.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/de.itemis.mps.editor.diagram/de.itemis.mps.editor.diagram.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/languages/test.de.itemis.mps.editor.diagram.lang/test.de.itemis.mps.editor.diagram.lang.mpl" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/solutions/de.itemis.mps.editor.diagram.demo.activity.sandbox/de.itemis.mps.editor.diagram.demo.activity.sandbox.msd" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/solutions/de.itemis.mps.editor.diagram.demo.elk.sandbox/de.itemis.mps.editor.diagram.demo.elk.sandbox.msd" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/solutions/de.itemis.mps.editor.diagram.demoentities.sandbox/de.itemis.mps.editor.diagram.demoentities.sandbox.msd" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/solutions/de.itemis.mps.editor.diagram.runtime/de.itemis.mps.editor.diagram.runtime.msd" folder="diagram" />
<modulePath path="$PROJECT_DIR$/diagram/solutions/de.itemis.mps.editor.diagram.sandbox/de.itemis.mps.editor.diagram.sandbox.msd" folder="diagram" />
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</dependencies>
<languageVersions>
<language slang="l:3bdedd09-792a-4e15-a4db-83970df3ee86:de.itemis.mps.editor.collapsible" version="0" />
<language slang="l:fa13cc63-c476-4d46-9c96-d53670abe7bc:de.itemis.mps.editor.diagram" version="0" />
<language slang="l:fa13cc63-c476-4d46-9c96-d53670abe7bc:de.itemis.mps.editor.diagram" version="1" />
<language slang="l:21063c66-85ba-4e98-839b-036445b17ae2:de.itemis.mps.editor.layout" version="0" />
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<persistence version="9" />
<languages>
<use id="aee9cad2-acd4-4608-aef2-0004f6a1cdbd" name="jetbrains.mps.lang.actions" version="4" />
<use id="fa13cc63-c476-4d46-9c96-d53670abe7bc" name="de.itemis.mps.editor.diagram" version="0" />
<use id="fa13cc63-c476-4d46-9c96-d53670abe7bc" name="de.itemis.mps.editor.diagram" version="1" />
<use id="3bdedd09-792a-4e15-a4db-83970df3ee86" name="de.itemis.mps.editor.collapsible" version="0" />
<use id="18bc6592-03a6-4e29-a83a-7ff23bde13ba" name="jetbrains.mps.lang.editor" version="14" />
<devkit ref="fbc25dd2-5da4-483a-8b19-70928e1b62d7(jetbrains.mps.devkit.general-purpose)" />
Expand Down Expand Up @@ -328,11 +328,31 @@
<child id="7890587897031726225" name="query" index="2M4AHN" />
</concept>
<concept id="7890587897031711745" name="de.itemis.mps.editor.diagram.structure.Content_GenericEdgeQuery" flags="ng" index="2M4Efz" />
<concept id="5878290447138467534" name="de.itemis.mps.editor.diagram.structure.Padding" flags="ng" index="POkNa">
<property id="5878290447138468454" name="top" index="POl1y" />
<property id="5878290447138468820" name="right" index="POl7g" />
<property id="5878290447138469609" name="bottom" index="POljH" />
<property id="5878290447138469821" name="left" index="POlmT" />
</concept>
<concept id="5878290447138443303" name="de.itemis.mps.editor.diagram.structure.ContentAlignment" flags="ng" index="POr8z">
<property id="5878290447138443694" name="alignment" index="POreE" />
</concept>
<concept id="6237710625713942002" name="de.itemis.mps.editor.diagram.structure.Content_BLQuery" flags="ig" index="2ZMM4L" />
<concept id="6237710625713964946" name="de.itemis.mps.editor.diagram.structure.Parameter_Node" flags="ng" index="2ZN8Hh" />
<concept id="3662141892379115490" name="de.itemis.mps.editor.diagram.structure.Margin" flags="ng" index="36xZl7">
<property id="3662141892379115493" name="bottom" index="36xZl0" />
<property id="3662141892379115492" name="right" index="36xZl1" />
<property id="3662141892379115494" name="left" index="36xZl3" />
<property id="3662141892379115491" name="top" index="36xZl6" />
</concept>
<concept id="3662141892377043655" name="de.itemis.mps.editor.diagram.structure.ISupportTopdownPacking" flags="ng" index="36TQxy">
<property id="3662141892371757000" name="topdownHierarchicalNodeAspectRatio" index="31dVPH" />
<property id="3662141892371761113" name="topdownScaleFactor" index="31dWPW" />
<property id="3662141892374571168" name="topdownNodeType" index="36KE85" />
<property id="3662141892374569619" name="topdownHierarchicalNodeWidth" index="36KEwQ" />
</concept>
<concept id="8963411245957652387" name="de.itemis.mps.editor.diagram.structure.Content_GenericElementQuery_Query" flags="ig" index="37q72E" />
<concept id="8963411245958754161" name="de.itemis.mps.editor.diagram.structure.Content_GenericElementQuery_ParameterObject" flags="ng" index="37u81S" />
<concept id="2064429317493348219" name="de.itemis.mps.editor.diagram.structure.DiagramLayoutConfig" flags="ng" index="3pGojX" />
<concept id="6910723851735106293" name="de.itemis.mps.editor.diagram.structure.DiagramButtonConfig" flags="ng" index="3sA_1f">
<property id="2773448605512242576" name="hasShowPortsLabels" index="3g8l5v" />
<property id="6910723851735128113" name="hasResetViewButton" index="3sAwEb" />
Expand All @@ -352,6 +372,56 @@
<concept id="6987730699889040827" name="de.itemis.mps.editor.diagram.structure.LineWidth" flags="lg" index="3C0NmR">
<property id="6987730699889499559" name="value" index="3DY3mF" />
</concept>
<concept id="3333801137936756207" name="de.itemis.mps.editor.diagram.structure.LayeredLayoutConfig" flags="ng" index="3GLQun">
<property id="3662141892379183286" name="highDegreeNodeMaximumTreeHeight" index="36x08j" />
<property id="3662141892379184421" name="highDegreeNodeThreshold" index="36x0u0" />
<property id="3662141892379181918" name="hierarchicalSweepiness" index="36x0BV" />
<property id="3662141892379181279" name="greedySwitchCrossingminimizationHierarchical" index="36x0DU" />
<property id="3662141892379187702" name="improveCuts" index="36x1dj" />
<property id="3662141892379188269" name="improveWrappedEdges" index="36x1q8" />
<property id="3662141892379186382" name="horizontalSpacingBetweenLabelAndPort" index="36x1TF" />
<property id="3662141892379191931" name="labelSpacing" index="36x23u" />
<property id="3662141892379192633" name="layerBound" index="36x2us" />
<property id="3662141892379191100" name="labelNodeSpacing" index="36x2Qp" />
<property id="3662141892379194849" name="linearSegmentDeflectionDampening" index="36x3X4" />
<property id="3662141892379204315" name="maxNodePromotionIterations" index="36x51Y" />
<property id="3662141892379206070" name="mergeHierarchyCrossingEdges" index="36x6Gj" />
<property id="3662141892379207456" name="msdFreedom" index="36x6Q5" />
<property id="3662141892379211526" name="nodeNodeBetweenLayersSpacing" index="36x7Qz" />
<property id="3662141892379155187" name="crossingCounterPortInfluence" index="36x91m" />
<property id="3662141892379153202" name="correctionFactorForWrapping" index="36x9An" />
<property id="3662141892379154155" name="crossingCounterNodeInfluence" index="36x9Le" />
<property id="3662141892379162028" name="multiEdgeDistancePenalty" index="36xbW9" />
<property id="3662141892379167712" name="edgeNodeBetweenLayersSpacing" index="36xc55" />
<property id="3662141892379166982" name="edgeLabelSpacing" index="36xcez" />
<property id="3662141892379164867" name="edgeEdgeBetweenLayersSpacing" index="36xcDA" />
<property id="3662141892379171281" name="edgeSpacing" index="36xddO" />
<property id="3662141892379171857" name="edgeThickness" index="36xdqO" />
<property id="3662141892379168833" name="edgeNodeSpacing" index="36xdF$" />
<property id="3662141892379180082" name="greedySwitchCrossingminimization" index="36xfqn" />
<property id="3662141892379178639" name="greedySwitchActivationThreshold" index="36xfKE" />
<property id="3662141892379216113" name="nodeSelfLoopSpacing" index="36xo9k" />
<property id="3662141892379216986" name="nodeSpacing" index="36xorZ" />
<property id="3662141892379221784" name="randomizationSeed" index="36xpmX" />
<property id="3662141892379218932" name="portSpacing" index="36xp_h" />
<property id="3662141892379224606" name="slopedEdgeZoneWidth" index="36xq2V" />
<property id="3662141892379225514" name="sloppySplineLayerSpacingFactor" index="36xqsf" />
<property id="3662141892379223673" name="separateConnectedComponents" index="36xqNs" />
<property id="3662141892379228412" name="thoroughness" index="36xr9p" />
<property id="3662141892379230763" name="upperBoundOnWidthMinWidthLayerer" index="36xsye" />
<property id="3662141892379231963" name="upperLayerEstimationScalingFactorMinWidthLayerer" index="36xsLY" />
<property id="3662141892379238267" name="verticalSpacingBetweenLabelAndPort" index="36xtnu" />
<property id="3662141892379139136" name="additionalWrappedEdgesSpacing" index="36xPr_" />
<property id="3662141892379140237" name="aspectRatio" index="36xQCC" />
<property id="3662141892379147547" name="considerModelOrderStrategy" index="36xRuY" />
<property id="3662141892379145171" name="commentNodeSpacing" index="36xR_Q" />
<property id="3662141892379144303" name="commentCommentSpacing" index="36xRFa" />
<property id="3662141892379145832" name="componentsSpacing" index="36xRNd" />
<child id="3662141892379210077" name="nodeLabelPadding" index="36x7JS" />
<child id="3662141892379152132" name="contentAlignment" index="36x8mx" />
<child id="3662141892379217652" name="padding" index="36xohh" />
<child id="3662141892379113988" name="additionalPortSpace" index="36xZ2x" />
</concept>
<concept id="301931493264781535" name="de.itemis.mps.editor.diagram.structure.CellModel_DiagramContent" flags="ng" index="3IJ5R8">
<child id="301931493268065286" name="ingoingRedirect" index="3IzU4h" />
<child id="301931493268065521" name="outgoingRedirect" index="3IzU7A" />
Expand Down Expand Up @@ -1642,7 +1712,80 @@
<property role="3g8l5v" value="false" />
</node>
<node concept="3fe8g" id="1MAkSr4BiCN" role="35U2g">
<node concept="3pGojX" id="awq4$rgWNg" role="3pGojU" />
<node concept="3GLQun" id="1JVIYvy9lAX" role="3pGojU">
<property role="36xPr_" value="10.0" />
<property role="36xQCC" value="1.6" />
<property role="36xRFa" value="10.0" />
<property role="36xR_Q" value="10.0" />
<property role="36xRNd" value="20.0" />
<property role="36xRuY" value="3biyEnOlw4v/NONE" />
<property role="36x9An" value="1.0" />
<property role="36x9Le" value="0.0" />
<property role="36x91m" value="0.0" />
<property role="36xbW9" value="2.0" />
<property role="36xcDA" value="10.0" />
<property role="36xcez" value="2.0" />
<property role="36xc55" value="10.0" />
<property role="36xdF$" value="10.0" />
<property role="36xddO" value="10.0" />
<property role="36xdqO" value="1.0" />
<property role="36xfKE" value="40" />
<property role="36xfqn" value="3biyEnOlBXf/TWO_SIDED" />
<property role="36x0DU" value="3biyEnOlBXk/OFF" />
<property role="36x0BV" value="0.1" />
<property role="36x08j" value="5" />
<property role="36x0u0" value="16" />
<property role="36x1TF" value="1.0" />
<property role="36x1dj" value="true" />
<property role="36x1q8" value="true" />
<property role="36x2Qp" value="5.0" />
<property role="36x23u" value="0.0" />
<property role="36x2us" value="2147483647" />
<property role="36x3X4" value="0.3" />
<property role="36x51Y" value="0" />
<property role="36x6Gj" value="true" />
<property role="36x6Q5" value="1" />
<property role="36x7Qz" value="20.0" />
<property role="36xo9k" value="10.0" />
<property role="36xorZ" value="20.0" />
<property role="36xp_h" value="10.0" />
<property role="36xpmX" value="1" />
<property role="36xqNs" value="true" />
<property role="36xq2V" value="2.0" />
<property role="36xqsf" value="0.2" />
<property role="36xr9p" value="7" />
<property role="31dVPH" value="1.414" />
<property role="36KEwQ" value="150.0" />
<property role="36KE85" value="qwNnoEIHRM/HIERARCHICAL_NODE" />
<property role="31dWPW" value="1.0" />
<property role="36xsye" value="4" />
<property role="36xsLY" value="2" />
<property role="36xtnu" value="1.0" />
<node concept="36xZl7" id="1JVIYvy9lAY" role="36xZ2x">
<property role="36xZl6" value="0.0" />
<property role="36xZl1" value="0.0" />
<property role="36xZl0" value="0.0" />
<property role="36xZl3" value="0.0" />
</node>
<node concept="POr8z" id="1JVIYvy9lAZ" role="36x8mx">
<property role="POreE" value="56jSwh$g$O2/V_TOP" />
</node>
<node concept="POr8z" id="1JVIYvy9lB0" role="36x8mx">
<property role="POreE" value="56jSwh$g_03/H_LEFT" />
</node>
<node concept="POkNa" id="1JVIYvy9lB1" role="36x7JS">
<property role="POl1y" value="5.0" />
<property role="POl7g" value="5.0" />
<property role="POljH" value="5.0" />
<property role="POlmT" value="5.0" />
</node>
<node concept="POkNa" id="1JVIYvy9lB2" role="36xohh">
<property role="POl1y" value="12.0" />
<property role="POl7g" value="12.0" />
<property role="POljH" value="12.0" />
<property role="POlmT" value="12.0" />
</node>
</node>
</node>
</node>
<node concept="2w$q5c" id="5kFTseQTjoA" role="2whIAn">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency reexport="false">f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage)</dependency>
</dependencies>
<languageVersions>
<language slang="l:fa13cc63-c476-4d46-9c96-d53670abe7bc:de.itemis.mps.editor.diagram" version="0" />
<language slang="l:fa13cc63-c476-4d46-9c96-d53670abe7bc:de.itemis.mps.editor.diagram" version="1" />
<language slang="l:21063c66-85ba-4e98-839b-036445b17ae2:de.itemis.mps.editor.layout" version="0" />
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<model ref="r:78255adc-9537-4e17-ae05-003bea4bb6cc(de.itemis.mps.editor.diagram.demo.callgraph.editor)">
<persistence version="9" />
<languages>
<use id="fa13cc63-c476-4d46-9c96-d53670abe7bc" name="de.itemis.mps.editor.diagram" version="0" />
<use id="fa13cc63-c476-4d46-9c96-d53670abe7bc" name="de.itemis.mps.editor.diagram" version="1" />
<use id="18bc6592-03a6-4e29-a83a-7ff23bde13ba" name="jetbrains.mps.lang.editor" version="14" />
<devkit ref="fbc25dd2-5da4-483a-8b19-70928e1b62d7(jetbrains.mps.devkit.general-purpose)" />
</languages>
Expand Down
Loading

0 comments on commit c2011b0

Please sign in to comment.