Content assist for Eclipse JSDT based Editor

2019-02-16 02: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条回答
趁早两清
2楼-- · 2019-02-16 03:30

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.

查看更多
登录 后发表回答