Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content assist edit positions and template variables
Content assist edit positions and template variables [message #1837227] Mon, 25 January 2021 14:00 Go to next message
Dimo Petroff is currently offline Dimo PetroffFriend
Messages: 10
Registered: November 2018
Junior Member
Just wondering if I should expect these to work via LSP (e.g. in Theia) at all. In general, there doesn't seem to be any clear documentation that I've been able to find about what Xtext IDE features are supported via LSP, so it's difficult to tell what kind of feature parity to expect between the native Eclipse IDE plugin and an LSP IDE and where the gaps might be. There is not even an LSP section on the Xtext documentation website, while the Web Support section doesn't go into enough detail, and seemingly doesn't cover Monaco-based Theia, so it looks like it's wildly out of date. If I remember correctly, Web Support is basically abandoned in favour of LSP, so this makes sense, I just don't understand why there's no documentation for the LSP side of things.
Re: Content assist edit positions and template variables [message #1837228 is a reply to message #1837227] Mon, 25 January 2021 14:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13880
Registered: July 2009
Senior Member
the main reason is: nobody writes it. and nobody funds the writing.
at least templates work with vscode
https://github.com/itemis/xtext-languageserver-example/blob/f2291241f2a1e97c8ebab8187e2d30460923dee1/org.xtext.example.mydsl.ide/src/org/xtext/example/mydsl/ide/contentassist/MyDslIdeContentProposalProvider.xtend#L21


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 25 January 2021 14:04]

Report message to a moderator

Re: Content assist edit positions and template variables [message #1837229 is a reply to message #1837228] Mon, 25 January 2021 14:28 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 133
Registered: February 2016
Senior Member
Hello Dimo,

indeed, the Xtext-LSP section is still missing from the official Xtext documentation .
The corresponding GitHub issue is available under https://github.com/eclipse/xtext/issues/1141

Tamás
Re: Content assist edit positions and template variables [message #1838130 is a reply to message #1837229] Wed, 17 February 2021 06:49 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 133
Registered: February 2016
Senior Member
Hello Dimo,

The LSP Support section has been added to the Xtext documentation.

Tamás
Re: Content assist edit positions and template variables [message #1838244 is a reply to message #1838130] Fri, 19 February 2021 12:32 Go to previous messageGo to next message
Dimo Petroff is currently offline Dimo PetroffFriend
Messages: 10
Registered: November 2018
Junior Member
Thanks, that makes things clearer. I was actually trying to figure out if the AbstractIdeTemplateProposalProvider API with the variable and cursor methods works in LSP, but I see that the resulting edit positions are ignored in ContentAssistService. Is there a different API available, or do I need to hard-code the variables in my templates using the LSP snippet syntax?
Re: Content assist edit positions and template variables [message #1838248 is a reply to message #1838244] Fri, 19 February 2021 13:50 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13880
Registered: July 2009
Senior Member
yes there is no AbstractIdeTemplateProposalProvider in LSP.

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Display DSL code generation errors in Eclipse
Next Topic:Rename fails if cursor is behind identifier
Goto Forum:
  


Current Time: Tue Apr 13 04:43:10 GMT 2021

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

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

Back to the top