Eclipse 3.3 Europa JDT TextHover
我想在 Eclipse 中显示我自己的文本悬停某些特定单词? 请给我一些例子
I want to show my own text hover in eclipse for some specific words? Please provide me some examples
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以首先查看 Koder 示例。
例如这个 CEditorTextHoverDispatcher 或这个 UCTextHover
您可以在
SourceViewerConfiguration
中设置 TextHover,如下所示 < a href="http://www.koders.com/java/fid441801AFBF843A71F77B2AD1DCF4FE3FEED01A64.aspx?s=ITextHover#L20" rel="nofollow noreferrer">GasSourceViewerConfiguration
或此CalcSourceViewerConfiguration
除此之外,我没有太多更多信息:我发现的示例更多的是编程性而不是声明性(即“
plugin.xml
”),因此您可能需要探索更多代码。另一个很好的例子:Eclipse:Rich Hovers Redux (虽然它是针对 eclipse3.4 的,但完整的示例可以给您另一个关于如何将自定义 ITextHover 添加到当前编辑器的提示)
You can start by looking at Koder examples.
E.g. this CEditorTextHoverDispatcher or this UCTextHover
You would set a TextHover in a
SourceViewerConfiguration
like thisGasSourceViewerConfiguration
or thisCalcSourceViewerConfiguration
Beyond that, I have not much more information: the examples I have found are more programmatic than declarative (i.e. "
plugin.xml
"), so you may want to explore some more code.Another good example: Eclipse: Rich Hovers Redux (it is for eclipse3.4 though, but the full example can give you another hint at how a custom ITextHover is added to the current editor)
最好的办法是首先使用 java 编辑器插件和 eclipse。 获取eclipse帮助->欢迎->示例->Java编辑器插件
The best thing is to use the java editor plugin along with eclipse first. Take eclipse help ->welcome->Samples->Java Editor plugin