Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Content assist on java methods and xbase
Content assist on java methods and xbase [message #1809153] Wed, 10 July 2019 09:35 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: June 2019
Junior Member
Hi all,

I created a grammar with xbase and it is working fine.
I have a rule with a XBlockExpression in order to have a java like language.

When I write in my dsl :
var test = 'Hello'
test.t

And I make a ctrl+space I have some proposals like toCharArray, toString etc.. and it is ok

But when I write this code :
var test = 'Hello'
test.

I don't have any proposals... How can I have the same proposals as above ?

Thanks in advance !
Re: Content assist on java methods and xbase [message #1809158 is a reply to message #1809153] Wed, 10 July 2019 10:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13164
Registered: July 2009
Senior Member
hi, i cannot reproduce this with the domain model example
=> problem must be specific to your dsl or example project


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content assist on java methods and xbase [message #1814089 is a reply to message #1809158] Tue, 03 September 2019 12:04 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: June 2019
Junior Member
I added this configuration in my DSL :
parserGenerator = {
  options = {
    backtrack = true
  }
}

When i remove this configuration (and change my grammar...), i don't have any problem with autocomplete.

Thakns for your answer !
Re: Content assist on java methods and xbase [message #1814090 is a reply to message #1814089] Tue, 03 September 2019 12:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13164
Registered: July 2009
Senior Member
per se this is a bad idea. the question is: what is in your grammar that makes it ambigous

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Content assist on java methods and xbase [message #1814126 is a reply to message #1814090] Wed, 04 September 2019 09:41 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: June 2019
Junior Member
Yes, you're right : this is a bad idea. But i changed my grammar to disambigous it !
Previous Topic:Don't resolve expressions during indexing!
Next Topic:How to hide part of text in xtext editor
Goto Forum:
  


Current Time: Wed Oct 23 00:38:29 GMT 2019

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

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

Back to the top