Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI/Language Server error handling on non-existent/erroneous models #212

Open
2 tasks
NiklasRentzCAU opened this issue Mar 17, 2025 · 0 comments
Open
2 tasks
Labels
enhancement New feature or request klighd-cli requires server change This change is linked to some change on the server side implementation in KLighD

Comments

@NiklasRentzCAU
Copy link
Member

There are a few usability issues with the current CLI/Language Server handling:

  • The CLI should show a persistent error message if the model that should be shown does not exist. Currently the view just shows a "No model in resource" diagram, but no error message indicating that the model just does not exist.
  • The CLI/Language Server should display a persistent error message if the model that should be shown is erroneous. For example, showing a OSGi Model with the OSGiViz Language Server in for a .osgi file that has syntax errors, a good error message should be shown that the model could not load and what the reason for that was. Currently only this non-speaking error message is printed:
Error during request: 
java.lang.NullPointerException: Cannot invoke "org.eclipse.sprotty.SModelRoot.getType()" because "server.currentRoot" is null
	at de.cau.cs.kieler.klighd.lsp.KGraphDiagramUpdater.lambda$updateDiagram$5(KGraphDiagramUpdater.java:212)
	at de.cau.cs.kieler.klighd.lsp.KGraphLanguageServerExtension.lambda$doRead$21(KGraphLanguageServerExtension.java:683)
	at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$1(ReadRequest.java:66)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

This issue might be tackled in multiple steps for each sub-issue

@NiklasRentzCAU NiklasRentzCAU added enhancement New feature or request klighd-cli requires server change This change is linked to some change on the server side implementation in KLighD labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request klighd-cli requires server change This change is linked to some change on the server side implementation in KLighD
Projects
None yet
Development

No branches or pull requests

1 participant