Skip to content

Commit

Permalink
[LSP API] IJPL-157188: display LSP server error output (STDERR) if it…
Browse files Browse the repository at this point in the history
… has terminated unexpectedly

GitOrigin-RevId: e4654bb05530f918618851fdea425fd585f7148d
  • Loading branch information
alexander-doroshko authored and intellij-monorepo-bot committed Jun 25, 2024
1 parent 7ef4280 commit 71127c7
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ class GodotLspServerWidgetItem(lspServer: LspServer,
LspServerState.ShutdownUnexpectedly -> GodotPluginBundle.message("language.services.widget.item.shutdown.unexpectedly", serverLabel)
}

override fun createWidgetInlineActions(): List<AnAction> {
val actions = super.createWidgetInlineActions().toMutableList()

if (widgetActionLocation == LanguageServicePopupSection.ForCurrentFile
&& lspServer.state in arrayOf(LspServerState.ShutdownNormally, LspServerState.ShutdownUnexpectedly)) {
override fun createAdditionalInlineActions(): List<AnAction> {
if (widgetActionLocation == LanguageServicePopupSection.ForCurrentFile &&
lspServer.state in arrayOf(LspServerState.ShutdownNormally, LspServerState.ShutdownUnexpectedly)
) {
val discoverer = GodotProjectDiscoverer.getInstance(lspServer.project)
if (discoverer.lspConnectionMode.value == LanguageServerConnectionMode.ConnectRunningEditor)
actions.add(0, StartGodotEditorActionInWidget(lspServer))
return listOf(StartGodotEditorActionInWidget(lspServer))
}

return actions
return super.createAdditionalInlineActions()
}

private class StartGodotEditorActionInWidget(
Expand Down

0 comments on commit 71127c7

Please sign in to comment.