本文介绍了内容辅助Eclipse JSDT编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse内容帮助通常由某些类实现,这些类实现IContentAssistProcessor (, )



如何为基于JSDT的编辑器实现相同的 CompletionProposal p>

我唯一知道的例子是,但是如何扩展JSDT以提供代码辅助是很大的和不清楚的。



JSDT中是否有其他API?请指向要使用的API。



相关

解决方案

您需要实现。
在那里你必须指定一个实现必要接口的类,但它与一个非常通用的IContentAssistProcessor不同。



根据你的用例也可能想看看相关的和扩展点。


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

解决方案

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.

这篇关于内容辅助Eclipse JSDT编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-22 06:01