diff --git a/build/de.cau.cs.kieler.klighd.repository/category.xml b/build/de.cau.cs.kieler.klighd.repository/category.xml
index 7d0c7f9d5..5216ede61 100644
--- a/build/de.cau.cs.kieler.klighd.repository/category.xml
+++ b/build/de.cau.cs.kieler.klighd.repository/category.xml
@@ -60,8 +60,6 @@
-
-
@@ -69,5 +67,4 @@
-
diff --git a/build/de.cau.cs.kieler.klighd.repository/pom.xml b/build/de.cau.cs.kieler.klighd.repository/pom.xml
index eb94937db..cfa0d42fc 100644
--- a/build/de.cau.cs.kieler.klighd.repository/pom.xml
+++ b/build/de.cau.cs.kieler.klighd.repository/pom.xml
@@ -63,8 +63,6 @@
https://xtext.github.io/download/updates/releases/2.1.1/>
https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/release/4.30.0
-
- https://rtsys.informatik.uni-kiel.de/~kieler/updatesite/sprotty/0.9.0/
siteTemplate
diff --git a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-elkNightly.target b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-elkNightly.target
index 3d08e692f..2a3c0eccd 100644
--- a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-elkNightly.target
+++ b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-elkNightly.target
@@ -43,9 +43,5 @@
-
-
-
-
\ No newline at end of file
diff --git a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo-elkNightly.target b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo-elkNightly.target
index 8f00f2b0c..fc4b1e392 100644
--- a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo-elkNightly.target
+++ b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo-elkNightly.target
@@ -47,9 +47,5 @@
-
-
-
-
\ No newline at end of file
diff --git a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo.target b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo.target
index d1f752741..8c9f1fff6 100644
--- a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo.target
+++ b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform-piccolo.target
@@ -47,9 +47,5 @@
-
-
-
-
\ No newline at end of file
diff --git a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform.target b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform.target
index 9ec8e1d19..19e50c619 100644
--- a/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform.target
+++ b/build/de.cau.cs.kieler.klighd.targetplatform/de.cau.cs.kieler.klighd.targetplatform.target
@@ -43,9 +43,5 @@
-
-
-
-
\ No newline at end of file
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/.classpath b/plugins/de.cau.cs.kieler.klighd.lsp/.classpath
index 7cd7b128b..59a498ec0 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/.classpath
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/.classpath
@@ -5,8 +5,28 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/.project b/plugins/de.cau.cs.kieler.klighd.lsp/.project
index 27cf23a80..918374c6f 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/.project
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/.project
@@ -15,16 +15,6 @@
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
org.eclipse.m2e.core.maven2Builder
@@ -35,6 +25,5 @@
org.eclipse.jdt.core.javanature
org.eclipse.xtext.ui.shared.xtextNature
org.eclipse.m2e.core.maven2Nature
- org.eclipse.pde.PluginNature
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.core.resources.prefs b/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.core.resources.prefs
index 7a5313928..505845e4f 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,4 @@
eclipse.preferences.version=1
encoding/=UTF-8
encoding/src=UTF-8
+encoding/xtend-gen=UTF-8
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.xtend.core.Xtend.prefs b/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.xtend.core.Xtend.prefs
index 56e3bbe88..2b65c6b65 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.xtend.core.Xtend.prefs
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/.settings/org.eclipse.xtend.core.Xtend.prefs
@@ -2,5 +2,7 @@ BuilderConfiguration.is_project_specific=true
eclipse.preferences.version=1
outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
+outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory=xtend-gen
outlet.DEFAULT_OUTPUT.sourceFolder.src.directory=xtend-gen
+outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory=xtend-gen
outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder=true
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/pom.xml b/plugins/de.cau.cs.kieler.klighd.lsp/pom.xml
index 01029cca8..2c75eb316 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/pom.xml
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/pom.xml
@@ -10,7 +10,6 @@
de.cau.cs.kieler.klighd.lsp
- eclipse-plugin
KIELER Lightweight Diagrams as Language Server
KIELER Lightweight Diagrams as Language Server
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 d67576498..5b9a9160d 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
@@ -3,7 +3,7 @@
*
* http://rtsys.informatik.uni-kiel.de/kieler
*
- * Copyright 2018-2022 by
+ * Copyright 2018-2024 by
* + Kiel University
* + Department of Computer Science
* + Real-Time and Embedded Systems Group
@@ -384,11 +384,9 @@ class KGraphDiagramServer extends LanguageAwareDiagramServer {
* FIXME Remove this if UpdateModelAction has a cause.
*/
override protected handle(RequestModelAction request) {
- if (model.type == 'NONE' && diagramLanguageServer !== null) {
- if (!request.requestId.nullOrEmpty)
- LOG.warn("Model requests are not supported by the Xtext diagram server.")
+ if (diagramLanguageServer !== null) {
copyOptions(request)
- diagramLanguageServer.diagramUpdater.updateDiagram(this)
+ diagramLanguageServer.diagramUpdater.updateDiagram(this, request)
} else {
super.handle(request)
}
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramUpdater.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramUpdater.xtend
index 9755d54f2..7c6905338 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramUpdater.xtend
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramUpdater.xtend
@@ -3,7 +3,7 @@
*
* http://rtsys.informatik.uni-kiel.de/kieler
*
- * Copyright 2019, 2020, 2021 by
+ * Copyright 2019-2024 by
* + Kiel University
* + Department of Computer Science
* + Real-Time and Embedded Systems Group
@@ -37,10 +37,12 @@ import java.util.Map
import java.util.concurrent.CompletableFuture
import org.eclipse.emf.common.util.URI
import org.eclipse.emf.ecore.EObject
+import org.eclipse.sprotty.Action
import org.eclipse.sprotty.IDiagramServer
import org.eclipse.sprotty.SGraph
import org.eclipse.sprotty.SModelElement
import org.eclipse.sprotty.xtext.ILanguageAwareDiagramServer
+import org.eclipse.sprotty.xtext.LanguageAwareDiagramServer
import org.eclipse.sprotty.xtext.ls.DiagramLanguageServer
import org.eclipse.sprotty.xtext.ls.DiagramUpdater
import org.eclipse.xtext.util.CancelIndicator
@@ -137,7 +139,19 @@ class KGraphDiagramUpdater extends DiagramUpdater {
}
override protected doUpdateDiagrams(String uri, List extends ILanguageAwareDiagramServer> diagramServers) {
- if (diagramServers.empty) {
+ diagramServers.forEach[updateDiagram(it as LanguageAwareDiagramServer, null)]
+ return CompletableFuture.completedFuture(null)
+ }
+
+ override updateDiagram(LanguageAwareDiagramServer server_, Action cause) {
+ if (!(server_ instanceof KGraphDiagramServer)) return super.updateDiagram(server_, cause)
+
+ val server = server_ as KGraphDiagramServer
+ val uri = server.sourceUri
+ if (uri.isNullOrEmpty) {
+ val exc = new RuntimeException("Missing property 'sourceUri'.")
+ server.rejectRemoteRequest(cause, exc)
+// LOG.error("Failed to update diagram.", exc)
return CompletableFuture.completedFuture(null)
}
return (languageServer as KGraphLanguageServerExtension).doRead(uri) [ resource, ci |
@@ -166,16 +180,13 @@ class KGraphDiagramUpdater extends DiagramUpdater {
new StringBuilder, [builder, error | builder.append("\n" + error)]).toString
model = new MessageModel("The model contains errors:\n" + errors)
}
- val model_ = model;
- (diagramServers as List).forEach [ KGraphDiagramServer server |
- // Only update an erroneous model if there was no diagram shown before.
- if (!hasErrors || server.currentRoot.type == "NONE") {
- synchronized (diagramState) {
- prepareModel(server, model_, uri)
- updateLayout(server)
- }
+ // Only update an erroneous model if there was no diagram shown before.
+ if (!hasErrors || server.currentRoot.type == "NONE") {
+ synchronized (diagramState) {
+ prepareModel(server, model, uri)
+ updateLayout(server)
}
- ]
+ }
return null as Void
]
}
diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphLanguageServerExtension.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphLanguageServerExtension.xtend
index 087b62b7b..4d707ad41 100644
--- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphLanguageServerExtension.xtend
+++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphLanguageServerExtension.xtend
@@ -134,8 +134,7 @@ class KGraphLanguageServerExtension extends SyncDiagramLanguageServer
override accept(ActionMessage message) {
if (message.action instanceof RequestModelAction) {
val action = message.action as RequestModelAction
- val diagramType = action.diagramType
- ?: action.options.get(DiagramOptions.OPTION_DIAGRAM_TYPE)
+ val diagramType = action.options.get(DiagramOptions.OPTION_DIAGRAM_TYPE)
val server = diagramServerManager.getDiagramServer(diagramType, message.clientId)
// If a diagram server is requested for the same client, but a different source file, then close the old server.
// If the server does not have options yet, the server has not been used yet and does not need to be relaunched.
diff --git a/pom.xml b/pom.xml
index 8a6fd02f4..37b93201a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,8 +56,8 @@
32.1.3-jre
7.0.0
3.32.0
- 0.21.1
- 0.9.0
+ 0.22.0
+ 1.1.1
0.1.0
3.124.200
2.7.3