Hi LSP4E Community,
during tests of our internal CDS Language Server on Eclipse 19-03 I found an odd behavior in LSP4E I can't explain and that doesn't occur in Eclipse 18-12. Our language server supports workspace
folders and works fine in VSCode and Eclipse 18-12.
In my Eclipse 19-03 workspace I have two projects, e.g. "A" and "B". In both projects are CDS files that are supported by our Language Server. I open the first CDS file in project A and the CDS
language server gets initialized with project A as workspace root. I get also the outline for the opened CDS file, everything looks fine.
Now I navigate to project "B" and open the second CDS file. I expect that LSP4E informs the language server about a new workspace folder, but this doesn't happen. So, our CDS language server is
not able to operate on the second CDS file of project B, since it's not part of the current workspace folders configuration, e.g. there is no outline for this file and no syntax check.
In Eclipse 18-12 this scenario works fine and I see this request about a new workspace folder in the LSP trace:
LSP4E to com.sap.xst4e.cds.languageServer:{"jsonrpc":"2.0","method":"workspace/didChangeWorkspaceFolders","params":{"event":{"added":[{"uri":"file:/Users/d032842/workspaces/eclipse/xstools4eclipse-test/b","name":"b"}],"removed":[]}}}
This request is missing in Eclipse 19-03. Are there any changes in the LSP4E between Eclipse 19-03 and 18-12 in the area of workspace folder handling we have to adopt in language server or is
this a bug?
Does anybody face the same behavior for another language server?
Thanks in advance,
Markus Ofterdinger, SAP SE