Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Need help with Contentassist
Need help with Contentassist [message #896691] Thu, 19 July 2012 12:01 Go to next message
Amneris T is currently offline Amneris TFriend
Messages: 15
Registered: June 2012
Junior Member
Hi everybody,

I have made a very simple grammar to test xbase, the grammar looks like this:

Model: 
          importedNamespace=Import
          xbaseTest=XBaseTest
;

XBaseTest:
	'xBaseTest' name=ID '{' 
	'xExpressions' query=XExpression 
	'}'
	;

Import:
	'import' importedNamespace=FqnWithWildCard;

FqnWithWildCard:
	FQN ('.*')?;


FQN:
	ID ('.' ID)*;


The grammar works as espected, but contentassist is not working correctly.
The keywords are proposed by contentassist, but not the curly brackets in XBaseTest and the name=ID. From other example grammars I know that these can be proposed by xtext and I thought this would be the standard behaviour.

Can you give me a hint on how to implement such contentassists?
Eg when I type xBaseTest in the editor, the contentassist should propose "ID" or something like this....

Thanks in advance,
Amneris
Re: Need help with Contentassist [message #896693 is a reply to message #896691] Thu, 19 July 2012 12:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
See xbaseproposalprovider.iskeywordworthytopropose

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Need help with Contentassist [message #896699 is a reply to message #896691] Thu, 19 July 2012 12:11 Go to previous message
Amneris T is currently offline Amneris TFriend
Messages: 15
Registered: June 2012
Junior Member
Hi Christian,
thank you very much I think you have an answer to all my questions =) this looks very promising I will have a look at this...
Previous Topic:Problem with get xtext resource for Xtend's doGenerate
Next Topic:Auto-fold text regions
Goto Forum:
  


Current Time: Sat Apr 20 01:49:22 GMT 2024

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

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

Back to the top