Content assist for Eclipse JSDT based Editor

烈酒焚心 提交于 2019-12-12 07:24:41

问题


In Eclipse content assist is usually implemented by some class that implements IContentAssistProcessor (JavaDoc, example)

How to implement the same CompletionProposals for JSDT based Editor?

The only example I know is http://code.google.com/a/eclipselabs.org/p/jsdt-jquery/ , but it is large and unclear how to extend JSDT for code assist.

Are there other APIs in JSDT? Please point to APIs to use.

Related
How to extend javascript editor in JSDT in Eclipse with adding new functions


回答1:


You need to implement the completion proposal extension point of the JSDT editor. In there you have to specify a class implementing the necessary interface, but it is a different one than the very generic IContentAssistProcessor.

Depending on your use case you may also want to have a look at the related quickAssist and quickFix extension points.



来源:https://stackoverflow.com/questions/20738788/content-assist-for-eclipse-jsdt-based-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!