Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content Assist for external information(Grammar contains elements of type String that I would like to assist the user to choose values based on a external source)
Content Assist for external information [message #1776099] Fri, 10 November 2017 17:02 Go to next message
Zoe Tsekas is currently offline Zoe TsekasFriend
Messages: 7
Registered: October 2016
Junior Member
I would like to

    define a grammar to create some basic rules
    use the web editor
    hook-up to external resources to facilitate text population


Example
Employee with userid (some user id looked up) must belong to department (departments values looked-up)

How to I extend the web editor to provide content assist to text fields?
Re: Content Assist for external information [message #1776100 is a reply to message #1776099] Fri, 10 November 2017 17:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
What do you mean by text fields. The xtext web integration gives you an editor

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content Assist for external information [message #1776160 is a reply to message #1776100] Mon, 13 November 2017 10:17 Go to previous messageGo to next message
Zoe Tsekas is currently offline Zoe TsekasFriend
Messages: 7
Registered: October 2016
Junior Member
Yes, I have been using the editor, specifically the web editor. It is great so far, but my use case is as follows
For example
Greeting:
'Hello' name=ID '!';


when the interpreter reaches the name; I would like to provide the user a list of options with content assist, by doing a dynamic look up
I am currently looking at the class AbstractMyDslProposalProvider is that the correct one to extend so I can extend the content assist for the web editor?

Re: Content Assist for external information [message #1776166 is a reply to message #1776160] Mon, 13 November 2017 11:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
have a look at org.eclipse.xtext.ide.editor.contentassist.IdeContentProposalProvider

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content Assist for external information [message #1776178 is a reply to message #1776160] Mon, 13 November 2017 13:31 Go to previous messageGo to next message
Zoe Tsekas is currently offline Zoe TsekasFriend
Messages: 7
Registered: October 2016
Junior Member
ok, I think I figured that I need to follow
https://www.eclipse.org/Xtext/documentation/330_web_support.html#content-assist

My previous post modifies the content assist within Eclipse Editor, not Web Editor
Re: Content Assist for external information [message #1776194 is a reply to message #1776178] Mon, 13 November 2017 15:31 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
yes thats what i meant

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to correctly modify the order of containment references in an XTextEditor?
Next Topic:How to force the editor to parse the entire editor content
Goto Forum:
  


Current Time: Tue Apr 16 08:06:51 GMT 2024

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

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

Back to the top