Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Language]ProposalProvider for generic IDE (VS-Code)
[Language]ProposalProvider for generic IDE (VS-Code) [message #1804571] Thu, 28 March 2019 19:34 Go to next message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 54
Registered: September 2018
Member
We have an extension for Visual Studio Code and we want to build custom content assist proposal provider.

We want to be able to generate a random UUID, when the user defines a UUID property, this UUID property is part of our grammar.

Person:
       'person' name=ID '{' 
                 'uuid'=UuidValue
       '}'


for Eclipse plugins Xtext automatically generates a [Language]ProposalProvider, and all one needs to do is to overwrite a method which is named like this: complete_UuidValue

However, for generic IDE, the solution of XText seems to be very complex. All we get is a IdeContentProposalProvider , which doesnt seem to offer many good opportunities to play with or extend.

Is there any good, reliable way to achieve this, without breaking something? Thanks
Re: [Language]ProposalProvider for generic IDE (VS-Code) [message #1804572 is a reply to message #1804571] Thu, 28 March 2019 19:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13071
Registered: July 2009
Senior Member
sorry. you have to deal with IdeContentProposalProvider and if else there:

org.eclipse.xtext.ide.editor.contentassist.IdeContentProposalProvider._createProposals(RuleCall, ContentAssistContext, IIdeContentProposalAcceptor)

see StatemachineWebContentProposalProvider in xtext-web (at github)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: [Language]ProposalProvider for generic IDE (VS-Code) [message #1804576 is a reply to message #1804572] Thu, 28 March 2019 20:13 Go to previous message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 54
Registered: September 2018
Member
I solved the issue on the client side, with the VS-Code API, thanks
Previous Topic:Xtext-Web / Referencing Elements
Next Topic:Xtend code generation: include library
Goto Forum:
  


Current Time: Fri Aug 23 22:18:45 GMT 2019

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

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

Back to the top