Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext - Content Assist(Keys already present in document should appear greyed out in the code completion)
Xtext - Content Assist [message #1739072] Wed, 27 July 2016 11:36 Go to next message
Roman Delph is currently offline Roman DelphFriend
Messages: 5
Registered: August 2015
Junior Member
Please help me find the solution.

I need create some sort of filter on content proposal. The code completion proposal should include keys that are already defined in the current document as non-active options (i.e. cannot click/add them; "greyed out"; at the end of the list). It would be a nice to see some code example.

Thanks.
Re: Xtext - Content Assist [message #1739073 is a reply to message #1739072] Wed, 27 July 2016 11:43 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14650
Registered: July 2009
Senior Member
i dont think that is possible. do you know any language / other editor that supports that?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext - Content Assist [message #1739077 is a reply to message #1739073] Wed, 27 July 2016 12:09 Go to previous messageGo to next message
Roman Delph is currently offline Roman DelphFriend
Messages: 5
Registered: August 2015
Junior Member
no i couldn't find any example.
How can i filter content assist ?
i guess i have to exclude items which present in document from content proposal but i don't know how to correctly do this.
Re: Xtext - Content Assist [message #1739080 is a reply to message #1739077] Wed, 27 July 2016 12:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14650
Registered: July 2009
Senior Member
Roman Delph <forums-noreply@xxxxxxxx> wrote:
> no i couldn't find any example.
> How can i filter content assist ?
> i guess i have to exclude items which present in document from content
> proposal but i don't know how to correctly do this.
>

Depends on the kind of elements. Is this about cross references ?) about
keywords ? ..


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext - Content Assist [message #1739082 is a reply to message #1739080] Wed, 27 July 2016 12:46 Go to previous messageGo to next message
Roman Delph is currently offline Roman DelphFriend
Messages: 5
Registered: August 2015
Junior Member
It is about keywords.
Re: Xtext - Content Assist [message #1739083 is a reply to message #1739082] Wed, 27 July 2016 12:50 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14650
Registered: July 2009
Senior Member
you can override completeKeyword in the proposal provider. https://kthoms.wordpress.com/2012/05/22/xtext-content-assist-filtering-keyword-proposals/ (should more or less still work)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[SOLVED] Content Assist Invalid completeXMemberFeatureCall_Feature
Next Topic:Serializing cross-references with Serializer2
Goto Forum:
  


Current Time: Wed Feb 21 02:53:26 GMT 2024

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

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

Back to the top