Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Language server is not loading resource and doing build with lsp4j 0.15(Language server is not loading resource and doing build with lsp4j 0.15)
Language server is not loading resource and doing build with lsp4j 0.15 [message #1856100] Mon, 21 November 2022 08:56 Go to next message
Eclipse UserFriend
with recent upgrade to our target platform language server stopped loading resource ( and no build)

org.eclipse.lsp4j, org.eclipse.lsp4j.generator, org.eclipse.lsp4j.jsonrpc, org.eclipse.lsp4j.websocket (version 0.15)

and org.eclipse.xtext.ide-2.28.0

It was working with org.eclipse.lsp4j 0.9 and org.eclipse.xtext.ide-2.23.0.

What i observed is with 0.9 ProjectManager class method initialize called twice (when server initialize (first request)) and from didChangeWorkspaceFolders, both passing different objects(UnknownProjectConfig and FileProjectConfig)

With 0.15 ProjectManager class method initialize called once and with UnknownProjectConfig.

As per documentation of LSP didChangeWorkspaceFolders server has to register the capabilities.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWorkspaceFolders

do i am using correct version of jar ? 0.15 and ide 2.28.0 ?

[Updated on: Mon, 21 November 2022 09:40] by Moderator

Re: Language server is not loading resource and doing build with lsp4j 0.15 [message #1856101 is a reply to message #1856100] Mon, 21 November 2022 08:59 Go to previous messageGo to next message
Eclipse UserFriend

i dont get your point about project manager
did you try tio debug why there is once an UnknowProjectConfig and once a FileProjectConfig
Re: Language server is not loading resource and doing build with lsp4j 0.15 [message #1856105 is a reply to message #1856101] Mon, 21 November 2022 11:34 Go to previous messageGo to next message
Eclipse UserFriend
@Christian Dietrich

Thank you for replying.

I have updated the question.

did you try try debug why there is once an UnknowProjectConfig and once a FileProjectConfig. Yes tried.

LanguageServerImpl: didChangeWorkspaceFolders() its strange for me why didChangeWorkspaceFolders got invoked (i don't see any request for didChangeWorkspaceFolders in RemoteEndpoint) ?
Re: Language server is not loading resource and doing build with lsp4j 0.15 [message #1856107 is a reply to message #1856105] Mon, 21 November 2022 13:21 Go to previous messageGo to next message
Eclipse UserFriend
again. i propose to set a breakpoint and debug. in the code i cannot see another call neither.
Re: Language server is not loading resource and doing build with lsp4j 0.15 [message #1856226 is a reply to message #1856107] Mon, 28 November 2022 12:10 Go to previous messageGo to next message
Eclipse UserFriend
@Christian Dietrich Thank you i have resolved the issue its bit strange in older version of xtext i have binded default version of ResourceServiceProviderServiceLoader in newer version 2.28 ServiceLoader was not able to load ISetup implementation.

Now code completion is not working did some analyses ContentAssistContext is empty. Always get null ruleName in BaseContentAssistParser: method getFollowElements( line 236) we get the rule name only when it matches our grammar defined rules (RuleNames ...antlrNameToRule)

Any hint why its happening ? its bit strange its not working with lsp4j 0.15 and org.eclipse.xtext.ide 2.28.0 and its working with lsp4j 0.9 and org.eclipse.xtext.ide 2.23.0.
Re: Language server is not loading resource and doing build with lsp4j 0.15 [message #1856227 is a reply to message #1856226] Mon, 28 November 2022 14:17 Go to previous message
Eclipse UserFriend
no. please provide a reproducing unit test.
Previous Topic:Grammar: operation with optional left argument
Next Topic:Error creating PDA for syntactic sequencer (2.29.0)
Goto Forum:
  


Current Time: Wed May 21 07:41:24 EDT 2025

Powered by FUDForum. Page generated in 0.03204 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top