From 53fde7469e96e86e3b1ba1bb75b4ef0f073601e4 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Thu, 24 Jul 2025 16:45:44 +0200 Subject: [PATCH 1/5] switch to semantic filter tags --- .../ui/synthesis/styles/ControlflowRegionStyles.xtend | 5 +++-- .../cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend index 5522cca762..0112700f57 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend @@ -29,6 +29,7 @@ import de.cau.cs.kieler.klighd.krendering.extensions.KNodeExtensions import de.cau.cs.kieler.klighd.krendering.extensions.KPolylineExtensions import de.cau.cs.kieler.klighd.krendering.extensions.KRenderingExtensions import de.cau.cs.kieler.klighd.util.KlighdProperties +import de.cau.cs.kieler.klighd.util.KlighdTags import de.cau.cs.kieler.sccharts.ControlflowRegion import de.cau.cs.kieler.sccharts.extensions.TextFormat import java.util.List @@ -172,14 +173,14 @@ class ControlflowRegionStyles { selectionTextUnderline = Underline.NONE // prevents default selection style val size = estimateTextSize; setPointPlacementData(LEFT, absLeftOffset, 0, TOP, 1, 0, H_LEFT, V_TOP, 0, 0, size.width + 5, size.height) - setProperty(KlighdProperties.IS_NODE_TITLE, true) + getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); ] } else { container.addKeywordLabel(label, 0) => [ foreground = REGION_LABEL.color fontSize = 10 setPointPlacementData(LEFT, absLeftOffset, 0, TOP, 1, 0, H_LEFT, V_TOP, 0, 0, 0, 0) - setProperty(KlighdProperties.IS_NODE_TITLE, true) + getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); (children.last as KContainerRendering) => [ // Just for spacing at the end val grid = it?.getChildPlacement() if (grid instanceof KGridPlacement) { diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend index 8855cc614f..7fe2a83cda 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend @@ -54,6 +54,7 @@ import static de.cau.cs.kieler.sccharts.ui.synthesis.styles.ColorStore.Color.* import static extension de.cau.cs.kieler.klighd.syntheses.DiagramSyntheses.* import static extension org.eclipse.emf.ecore.util.EcoreUtil.* +import de.cau.cs.kieler.klighd.util.KlighdTags /** * Styles for {@link State}. @@ -240,7 +241,7 @@ class StateStyles { fontSize = stateLabelTextSize suppressSelectability selectionTextUnderline = Underline.NONE // prevents default selection style -// setProperty(KlighdProperties.IS_NODE_TITLE, true) +// getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); ] } @@ -259,7 +260,7 @@ class StateStyles { ] children.head => [ - setProperty(KlighdProperties.IS_NODE_TITLE, true) + getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); setPointPlacementData(createKPosition(LEFT, 0, 0.5f, TOP, 0, 0), H_CENTRAL, V_TOP, 0, 0, 0, 0); ] ] From 9d2d5edfe6e002b6283f2c7d8b1e84b4a4475c75 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Fri, 25 Jul 2025 08:37:25 +0200 Subject: [PATCH 2/5] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend index 0112700f57..0cf0594ce3 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend @@ -173,7 +173,7 @@ class ControlflowRegionStyles { selectionTextUnderline = Underline.NONE // prevents default selection style val size = estimateTextSize; setPointPlacementData(LEFT, absLeftOffset, 0, TOP, 1, 0, H_LEFT, V_TOP, 0, 0, size.width + 5, size.height) - getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); + getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE) ] } else { container.addKeywordLabel(label, 0) => [ From 262d1e7aec8d9b6a110f1f014767f5597d138279 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Fri, 25 Jul 2025 08:37:34 +0200 Subject: [PATCH 3/5] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend index 0cf0594ce3..087ea6137b 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/ControlflowRegionStyles.xtend @@ -180,7 +180,7 @@ class ControlflowRegionStyles { foreground = REGION_LABEL.color fontSize = 10 setPointPlacementData(LEFT, absLeftOffset, 0, TOP, 1, 0, H_LEFT, V_TOP, 0, 0, 0, 0) - getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); + getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE) (children.last as KContainerRendering) => [ // Just for spacing at the end val grid = it?.getChildPlacement() if (grid instanceof KGridPlacement) { From e1cda158f67b6ed83ec966af3faa76de2543a31f Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Fri, 25 Jul 2025 08:38:27 +0200 Subject: [PATCH 4/5] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend index 7fe2a83cda..da1c23c71b 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend @@ -241,7 +241,7 @@ class StateStyles { fontSize = stateLabelTextSize suppressSelectability selectionTextUnderline = Underline.NONE // prevents default selection style -// getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); +// getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE) ] } From 59800acfc055cf90b5f882fead698709842062b4 Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Fri, 25 Jul 2025 08:38:36 +0200 Subject: [PATCH 5/5] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend index da1c23c71b..bcbd8c2f22 100644 --- a/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend +++ b/plugins/de.cau.cs.kieler.sccharts.ui/src/de/cau/cs/kieler/sccharts/ui/synthesis/styles/StateStyles.xtend @@ -260,7 +260,7 @@ class StateStyles { ] children.head => [ - getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE); + getProperty(KlighdProperties.SEMANTIC_FILTER_TAGS).add(KlighdTags.IS_NODE_TITLE) setPointPlacementData(createKPosition(LEFT, 0, 0.5f, TOP, 0, 0), H_CENTRAL, V_TOP, 0, 0, 0, 0); ] ]