为Eclipse创建自定义代码完成 [英] create a custom code completion for eclipse

查看:120
本文介绍了为Eclipse创建自定义代码完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为eclipse创建一个插件,以在代码完成窗口中添加更多结果。
为此,我需要获取对Java编辑器的引用,以便覆盖getContentAssistant编辑器的SourceViewerConfiguration的方法

I am trying to make a plugin for eclipse to add more results in the code completion window. In order to do that i need to get a reference to the Java Editor in order to override the getContentAssistant method of the editor’s SourceViewerConfiguration.

那么,如何获得该引用?
谢谢

So, how can i get that reference? Thank you

PS。随时提供任何有用的建议或链接

PS. feel free to provide any suggestions or links that can be helpful

推荐答案

实施 javaCompletionProposalComputer 。您提供的链接没有用,因为它仅对实施语言编辑器的人有用,但是Java编辑器已经存在。

Implement the javaCompletionProposalComputer. The link you gave is not useful, as that is only for people who implement a language editor, but the Java editor already exists.

这篇关于为Eclipse创建自定义代码完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆