Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Missing auto complete and validation in 2.11
Missing auto complete and validation in 2.11 [message #1758412] Tue, 28 March 2017 13:27 Go to next message
Rodrigo Ruiz is currently offline Rodrigo RuizFriend
Messages: 28
Registered: March 2017
Junior Member
Hi, i'm creating a simple grammar extending XBase, nothing fancy, pretty much this:
https://dzone.com/articles/using-jvm-types-xtext-21-and

grammar org.xtext.example.helloxbase.HelloXbase with
	org.eclipse.xtext.xbase.Xbase

generate helloXbase "http://www.xtext.org/example/helloxbase/HelloXbase"

Model:
	imports += Import*
	greetings+=Greeting*;

Import:
  'import' importedNamespace = QualifiedNameWithWildcard
;

QualifiedNameWithWildcard:
  QualifiedName '.*'?
; 

Greeting:
    'Hello' name=ID 'from' expression = XExpression '!'
;

I generate the code, start the eclipse runtime instance with the generated plugins, but then all the autocomplete (code assist?) is missing.
I can't do any of the things that article takes for given, even if i press ctrl+space explicitly.
Testing further i enabled org.eclipse.xtext.validation.NamesAreUniqueValidator but it only check top level entities, i saw in other tutorial that it even check for duplicated in fields or var inside methods and classes, which in my case is not happening.

Is there anything else i need in 2.11 to enable those advanced features?
could this be a bug?
thanks for all your help!
Re: Missing auto complete and validation in 2.11 [message #1758415 is a reply to message #1758412] Tue, 28 March 2017 13:45 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Restarting Eclipse often works wonders for classpath issues.

If you copied and pasted example projects, make sure you do not have the same grammar names / module names / nsURIs in more than one project. If you do, remove duplicates and restart Eclipse.

Regards

Ed Willink
Re: Missing auto complete and validation in 2.11 [message #1758419 is a reply to message #1758415] Tue, 28 March 2017 13:57 Go to previous messageGo to next message
Rodrigo Ruiz is currently offline Rodrigo RuizFriend
Messages: 28
Registered: March 2017
Junior Member
Thanks, but i don't think it's a classpath issue, i created the project from scratch, pasted the grammar, generated artifacts, restarted eclipse several times and nothing.
I wonder if someone else is having this issue i'm on eclipse neon.2.
Regards!
Re: Missing auto complete and validation in 2.11 [message #1758421 is a reply to message #1758419] Tue, 28 March 2017 14:05 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Did you implement the inferrer ?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Missing auto complete and validation in 2.11 [message #1758422 is a reply to message #1758421] Tue, 28 March 2017 14:17 Go to previous messageGo to next message
Rodrigo Ruiz is currently offline Rodrigo RuizFriend
Messages: 28
Registered: March 2017
Junior Member
I was under the impression that the inferrer is only for generating code and it has nothing to do with the auto complete or validation features.
Re: Missing auto complete and validation in 2.11 [message #1758424 is a reply to message #1758422] Tue, 28 March 2017 14:22 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
No it is needed to proper scope the expression and thus for the validation
Another problem is that you might need to type at least one char to get proper content assist
(There I a bug on this somewhere in the 1600 open ones but
I don't know if it affects your situation as well


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:String Annotation Value that is a constant attribute
Next Topic:XbaseCompiler exception when compiling simple XExpressions
Goto Forum:
  


Current Time: Thu Apr 25 22:32:49 GMT 2024

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

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

Back to the top