Skip to content

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

@NiklasRentzCAU

Description

@NiklasRentzCAU

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestklighd-clirequires server changeThis change is linked to some change on the server side implementation in KLighD

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions