From 971cf5834e942e217393083151bfd1c2b87bda25 Mon Sep 17 00:00:00 2001 From: Soeren Domroes Date: Tue, 8 Nov 2022 17:18:15 +0100 Subject: [PATCH 1/2] graphs.klighd: Added interactive graph visitor to elkgraph synthesis. --- plugins/de.cau.cs.kieler.graphs.klighd/META-INF/MANIFEST.MF | 3 ++- .../graphs/klighd/syntheses/ElkGraphDiagramSynthesis.xtend | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/de.cau.cs.kieler.graphs.klighd/META-INF/MANIFEST.MF b/plugins/de.cau.cs.kieler.graphs.klighd/META-INF/MANIFEST.MF index 78b296697..37eee8eea 100644 --- a/plugins/de.cau.cs.kieler.graphs.klighd/META-INF/MANIFEST.MF +++ b/plugins/de.cau.cs.kieler.graphs.klighd/META-INF/MANIFEST.MF @@ -17,7 +17,8 @@ Require-Bundle: org.eclipse.xtext;bundle-version="2.3.0", org.eclipse.elk.core, org.eclipse.elk.core.service, org.eclipse.elk.alg.layered, - org.eclipse.elk.alg.rectpacking + org.eclipse.elk.alg.rectpacking, + org.eclipse.elk.alg.mrtree Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Export-Package: de.cau.cs.kieler.graphs.klighd.syntheses diff --git a/plugins/de.cau.cs.kieler.graphs.klighd/src/de/cau/cs/kieler/graphs/klighd/syntheses/ElkGraphDiagramSynthesis.xtend b/plugins/de.cau.cs.kieler.graphs.klighd/src/de/cau/cs/kieler/graphs/klighd/syntheses/ElkGraphDiagramSynthesis.xtend index 18993ef6a..c183ec8be 100644 --- a/plugins/de.cau.cs.kieler.graphs.klighd/src/de/cau/cs/kieler/graphs/klighd/syntheses/ElkGraphDiagramSynthesis.xtend +++ b/plugins/de.cau.cs.kieler.graphs.klighd/src/de/cau/cs/kieler/graphs/klighd/syntheses/ElkGraphDiagramSynthesis.xtend @@ -34,6 +34,7 @@ import de.cau.cs.kieler.klighd.labels.decoration.RectangleDecorator import java.awt.Color import java.util.List import org.eclipse.elk.alg.layered.InteractiveLayeredGraphVisitor +import org.eclipse.elk.alg.mrtree.InteractiveMrTreeGraphVisitor import org.eclipse.elk.alg.rectpacking.InteractiveRectPackingGraphVisitor import org.eclipse.elk.core.options.CoreOptions import org.eclipse.elk.core.service.util.CompoundGraphElementVisitor @@ -303,7 +304,8 @@ class ElkGraphDiagramSynthesis extends AbstractStyledDiagramSynthesis { if (viewModel.getProperty(CoreOptions.INTERACTIVE_LAYOUT)) { additionalLayoutRuns.add(new CompoundGraphElementVisitor( new InteractiveRectPackingGraphVisitor(), - new InteractiveLayeredGraphVisitor())); + new InteractiveLayeredGraphVisitor(), + new InteractiveMrTreeGraphVisitor())); } return additionalLayoutRuns; } From 5a8c7ffba0288119cf7036f5cec88942ccb89cbc Mon Sep 17 00:00:00 2001 From: Soeren Domroes Date: Fri, 11 Nov 2022 16:00:03 +0100 Subject: [PATCH 2/2] Added MrTree to supported ls extensions. --- .../pragmatics/language/server/PragmaticsLsCreator.xtend | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.pragmatics.language.server/src/de/cau/cs/kieler/pragmatics/language/server/PragmaticsLsCreator.xtend b/plugins/de.cau.cs.kieler.pragmatics.language.server/src/de/cau/cs/kieler/pragmatics/language/server/PragmaticsLsCreator.xtend index 0abf809d7..8c9bf9d92 100644 --- a/plugins/de.cau.cs.kieler.pragmatics.language.server/src/de/cau/cs/kieler/pragmatics/language/server/PragmaticsLsCreator.xtend +++ b/plugins/de.cau.cs.kieler.pragmatics.language.server/src/de/cau/cs/kieler/pragmatics/language/server/PragmaticsLsCreator.xtend @@ -14,6 +14,7 @@ package de.cau.cs.kieler.pragmatics.language.server import de.cau.cs.kieler.klighd.lsp.KGraphLanguageClient import de.cau.cs.kieler.klighd.lsp.interactive.layered.LayeredInteractiveLanguageServerExtension +import de.cau.cs.kieler.klighd.lsp.interactive.mrtree.MrTreeInteractiveLanguageServerExtension import de.cau.cs.kieler.klighd.lsp.interactive.rectpacking.RectpackingInteractiveLanguageServerExtension import de.cau.cs.kieler.klighd.lsp.launch.AbstractLsCreator @@ -29,11 +30,14 @@ class PragmaticsLsCreator extends AbstractLsCreator { RectpackingInteractiveLanguageServerExtension rectPack + MrTreeInteractiveLanguageServerExtension mrTree + override getLanguageServerExtensions() { constraints = injector.getInstance(LayeredInteractiveLanguageServerExtension) rectPack = injector.getInstance(RectpackingInteractiveLanguageServerExtension) + mrTree = injector.getInstance(MrTreeInteractiveLanguageServerExtension) val iLanguageServerExtensions = newArrayList( - injector.getInstance(PragmaticsRegistrationLanguageServerExtension), constraints, rectPack + injector.getInstance(PragmaticsRegistrationLanguageServerExtension), constraints, rectPack, mrTree ) return iLanguageServerExtensions }