Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Code Completion In A Standalone Project?
Code Completion In A Standalone Project? [message #1745821] Mon, 17 October 2016 21:50 Go to next message
Sam Patterson is currently offline Sam PattersonFriend
Messages: 18
Registered: June 2016
Junior Member
Hello,

Is it possible to make use of the code completion functionality that's present in the eclipse environment that Xtext creates, in a standalone project? i.e. pressing an arbitrary key combination would display a list of valid language suggestions.

Many Thanks,

Sam
Re: Code Completion In A Standalone Project? [message #1745824 is a reply to message #1745821] Tue, 18 October 2016 03:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
There is idecontentproposal provider that is used by Xtext web integration and coming with 211 by Xtext language server integration that runs independent from eclipse (with a slightly different API)

https://github.com/eclipse/xtext-web/blob/master/org.eclipse.xtext.web/src/main/java/org/eclipse/xtext/web/server/contentassist/ContentAssistService.xtend

https://github.com/eclipse/xtext-core/blob/master/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/server/contentassist/ContentAssistService.xtend

Depending on your usecase you may use this code or at least recycle some of it


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Code Completion In A Standalone Project? [message #1746055 is a reply to message #1745824] Thu, 20 October 2016 22:01 Go to previous messageGo to next message
Sam Patterson is currently offline Sam PattersonFriend
Messages: 18
Registered: June 2016
Junior Member
Would it be possible to provide me with an example of how to make use of that class?
Re: Code Completion In A Standalone Project? [message #1746060 is a reply to message #1746055] Fri, 21 October 2016 03:11 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Please give more context
Of what you exactly want to do

A example would be a lot of work

As said the classes should give you an idea what to do
But they are not meant to be used out of the box from a client side


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Help with Generate Infrastructure MWE - create generator package
Next Topic:Why are ANTLR files built in two different packages
Goto Forum:
  


Current Time: Fri Mar 29 10:42:36 GMT 2024

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

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

Back to the top