From 03e8c71ac007fa6e174fa81a0a2241e6d534d604 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Fri, 8 Nov 2024 15:04:01 +0100 Subject: [PATCH] add fuzziness to edge labels --- .../sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend index 3d280e6025..0d901a0a38 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/hooks/LabelShorteningHook.xtend @@ -20,11 +20,11 @@ import de.cau.cs.kieler.klighd.kgraph.KNode import de.cau.cs.kieler.klighd.krendering.ViewSynthesisShared import de.cau.cs.kieler.sccharts.Scope import de.cau.cs.kieler.sccharts.Transition -import de.cau.cs.kieler.sccharts.ui.synthesis.hooks.SynthesisActionHook import de.cau.cs.kieler.sccharts.ui.synthesis.GeneralSynthesisOptions import de.cau.cs.kieler.sccharts.ui.synthesis.labels.LabelFocusSelectionListener import de.cau.cs.kieler.sccharts.ui.synthesis.labels.LabelShorteningStrategies import org.eclipse.elk.core.labels.LabelManagementOptions +import org.eclipse.elk.core.options.CoreOptions import static extension de.cau.cs.kieler.klighd.syntheses.DiagramSyntheses.* import static extension de.cau.cs.kieler.klighd.util.ModelingUtil.* @@ -81,6 +81,9 @@ class LabelShorteningHook extends SynthesisActionHook { if (HIDE_LABELS.booleanValue) { edge.eContents.filter(KLabel).forEach[initiallyHide] } + edge.labels.forEach[ + it.setProperty(CoreOptions::SOFTWRAPPING_FUZZINESS, 0.3) + ] } override executeAction(KNode rootNode) {