Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:56 Go to next message
Nagaraj Kandoor is currently offline Nagaraj KandoorFriend
Messages: 56
Registered: May 2020
Member
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 14:40]

Report message to a 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 13:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member

i dont get your point about project manager
did you try tio debug why there is once an UnknowProjectConfig and once a FileProjectConfig


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
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 16:34 Go to previous messageGo to next message
Nagaraj Kandoor is currently offline Nagaraj KandoorFriend
Messages: 56
Registered: May 2020
Member
@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 18:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
again. i propose to set a breakpoint and debug. in the code i cannot see another call neither.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
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 17:10 Go to previous messageGo to next message
Nagaraj Kandoor is currently offline Nagaraj KandoorFriend
Messages: 56
Registered: May 2020
Member
@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 19:17 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
no. please provide a reproducing unit test.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:Grammar: operation with optional left argument
Next Topic:Error creating PDA for syntactic sequencer (2.29.0)
Goto Forum:
  


Current Time: Tue Oct 08 15:42:10 GMT 2024

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

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

Back to the top