简体   繁体   English

Eclipse内容辅助验证密钥

[英]Eclipse content assist validation key

I'm unable to find any documentation about changing the shortcut that validates the content assist selection. 我无法找到有关更改验证内容辅助选择的快捷方式的任何文档。

I mean, for my exact case, when the content assist is opened, I want to validate its proposal by hitting enter (which works), but never with any other key, like . 我的意思是,对于我的确切情况,当内容辅助被打开时,我想通过按Enter(其工作)来验证其提议,但是从不与任何其他密钥一样,例如。 [ or (. I would like to choose what key validates the proposal. [或(。我想选择哪个密钥验证提案。

Even if I need to manually edit a config file, if anyone have this answer, it would be perfect ! 即使我需要手动编辑配置文件,如果有人有这个答案,那将是完美的!

I looked at org.eclipse.jdt.ui.prefs and org.eclipse.wst.jsdt.ui.prefs but with no success. 我查看了org.eclipse.jdt.ui.prefs和org.eclipse.wst.jsdt.ui.prefs但没有成功。

Thanks. 谢谢。

It looks like you are out of luck. 看起来你运气不好。 The Eclipse Mars documentation discusses the content assist, stating: Eclipse Mars文档讨论了内容辅助,说明:

Completion can be triggered by user request or can be automatically
 triggered when the "(" or "." character is typed:

public char[] getCompletionProposalAutoActivationCharacters() {
    return new char[] { '.', '(' };
}

Since it looks like these characters are hardcoded, you will need to implement your own content assist. 由于看起来这些字符是硬编码的,因此您需要实现自己的内容辅助。 Perhaps a simple derivative of the existing one with just this one method overwritten would suffice? 也许只用这一种方法覆盖现有的简单派生就足够了吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM