Xtext:使用类型系统过滤内容辅助提议

时间:2016-08-18 12:00:19

标签: autocomplete xtext type-systems content-assist

我使用Validator类实现了自己的类型系统。 现在我想在 Ctrl + Space -ing时只有有效的提议(目前它也暗示无效的东西)。

例如:

int a = 1;
int b = 2;
String s = "something";

a = //at this point, the auto completion should suggest only b, not s.
    //Of course that picking up s causes an error (I implemented my type system that way).

是否可以从我继承的ui.contentassist.{}ProposalProvider类实现?

感谢。

更新

根据Christian的建议,我发现从继承的{} ProposalProvider类调用super.complete_something更容易,然后从acceptor.delegate.proposals中删除不相关的提议。 请注意提案是一个私人领域,但它是easy to overcome

0 个答案:

没有答案
相关问题