[英]How to change hover background and foreground color in eclipse?
I am building a eclipse plugin with custom editor. 我正在使用自定义编辑器构建一个eclipse插件。 I have implemented text hovering functionality in which user hover on some text then that text will be shown on tooltip like javadocs.
我已经实现了文本悬停功能,用户将鼠标悬停在某些文本上,然后该文本将显示在工具提示中,如javadocs。
How can i change the tooltip background and foreground color programmatically? 如何以编程方式更改工具提示背景和前景色?
If your ITextHover
class also implements ITextHoverExtension
you can provide the IInformationControlCreator
in the getHoverControlCreator()
method. 如果您
ITextHover
类也实现ITextHoverExtension
您可以提供IInformationControlCreator
在getHoverControlCreator()
方法。
You can use a simple IInformationControlCreator
which just returns an instance of DefaultInformationControl
as the information control. 您可以使用一个简单的
IInformationControlCreator
, IInformationControlCreator
返回一个DefaultInformationControl
实例作为信息控件。 DefaultInformationControl
has setForegroundColor
and setBackgroundColor
methods. DefaultInformationControl
具有setForegroundColor
和setBackgroundColor
方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.