Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete doesn't seem to take the type of the model elements into account properly #24

Closed
amlajmi opened this issue Nov 18, 2016 · 1 comment
Labels

Comments

@amlajmi
Copy link
Contributor

amlajmi commented Nov 18, 2016

Consider the following grammar:

grammar com…. with org.eclipse.xtext.common.Terminals
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
generate editor "http://www..."

Model:
{Model}
('item123s'
item123s+=Item123+
'end')?
('item456'
item123s+=Item456+
'end')?
('item789'
item123s+=Item789+
'end')?
('rl'
rl+=rl123+
'end')?
;

rl123:
(name=STRING
':')?
'keyword1'
at=[Item123|PHRASE]
('and' attri2=[Item123|PHRASE])?
('and' attri3=[Item123|PHRASE])?
ca=[Item456|PHRASE]
va=STRING
'keyword2'
dec=[Item789|PHRASE]
;

Item123:
name=PHRASE item123Id=STRING;
Item456:
name=PHRASE calcId=STRING;
Item789:
name=PHRASE Item789Id=STRING;
terminal PHRASE: '<' ('\' ('b' | 't' | 'n' | 'f' | 'r' | 'u' | '"' | "'" | '\' |'<'|'>') | !('\' | '>' | '\r' | '\n'))* '>';

In rl123 it should only show Item123 in the first position, and only Item456 in the second, and only Item789 in the third. It shows all of Item 123 + Item 456 + Item 789 as options in all 3 places

@amlajmi amlajmi added the bug label Nov 18, 2016
@amlajmi
Copy link
Contributor Author

amlajmi commented Nov 25, 2016

Released new version which fixes the problem v0.9.0-20161125

@amlajmi amlajmi closed this as completed Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant