can xtext content assist has branch?
In the original grammar I have a parser rule defined as
Property: k=Cident '=' (simple=PropertyValue | map=MapLiteral);
valid strings could be opt1 = 1, opt2 = 'hello', opt3 = {'class': 'typeA',
'type-a-gain': 0.2} ... something like that.
I could give desired proposals opt1 opt2 opt3 for field k. But I don't
know how to give correct proposals when valid right hand side is affected
by the value of left hand side. For example:
opt4: '####', where ### could be all, none, partial. How do let content
assist only suggest these keywords?
or
opt5: {'class': 'type-A', 'type-A-gain': 1.0}
opt5: {'class': 'type-B', 'type-B-title': 'asdf'}
if 'class' is 'type-A', then it won't suggest 'type-B-title' when I want
it auto complete.
Any idea?
No comments:
Post a Comment