From 057645afde1d5a5a727ea214beeb718a6317ea68 Mon Sep 17 00:00:00 2001 From: Niklas Rentz Date: Wed, 18 Dec 2024 15:34:58 +0100 Subject: [PATCH] fixed requestModelAction handling for diagram colors --- .../cs/kieler/klighd/lsp/KGraphDiagramServer.xtend | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend index 5c893a337..14a9b0ec3 100644 --- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend +++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend @@ -255,16 +255,11 @@ class KGraphDiagramServer extends LanguageAwareDiagramServer { } /** - * Taken from {@code DefaultDiagramServer.handle(RequestModelAction)} to use this getModel. - * Needed for KeithUpdateModelAction - * - * FIXME Remove this if UpdateModelAction has a cause. + * additionally read the color preferences from the request model action. */ override protected handle(RequestModelAction request) { + super.handle(request) if (model.type == 'NONE' && diagramLanguageServer !== null) { - if (!request.requestId.nullOrEmpty) -// LOG.warn("Model requests are not supported by the Xtext diagram server.") - copyOptions(request) synchronized (diagramState) { // In the request model action there may be some further information for the client color preferences to // be applied here. @@ -275,9 +270,6 @@ class KGraphDiagramServer extends LanguageAwareDiagramServer { diagramState.colorPreferences = new ColorPreferences(foregroundColor, backgroundColor, highlightColor) } } - diagramLanguageServer.diagramUpdater.updateDiagram(this) - } else { - super.handle(request) } }