Klaus Schulz
Klaus Schulz

Reputation: 557

Clear Content Assistant

I have a grammar rule like

MyIdentifier:
    prefix=Prefix ('.' suffix=Suffix)?;

Prefix :
    name=ID
;

Suffix:
    name=ID
;

Now I can add some custom Content Proposals by implementing the completeSuffix_Name method.

However, there are some default proposals likeenter image description here.

How can I get rid of these and show only my custom proposals?

Edit: Xtext version 2.10.0

Upvotes: 0

Views: 73

Answers (1)

John Benedetto
John Benedetto

Reputation: 119

In your customized DSLProposalProvider that extends AbstractDSLProposalProvider, when overriding a method just don't do super.complete_something after acceptor.accept(..).

If you want to get rid of keywords, make sure you override completeKeyword from AbstractContentProposalProvider with an empty implementation. Pay attention to the parameters (different from the AbstractDSLProposalProvider functions).

Upvotes: 1

Related Questions