【问题标题】:Is there any way to dynamically set the icon of view/part in eclipse rcp?有没有办法在eclipse rcp中动态设置视图/部分的图标?
【发布时间】:2019-07-24 22:35:29
【问题描述】:

我想用我的应用程序主题更改 eclipse rcp 中的视图/部件的图像。到目前为止,这不是 E4 应用程序,所以我们仍然使用 org.eclipse.ui.views 作为扩展点。所以我硬编码了扩展图标路径中的图片路径。

如果我可以从代码中设置图标,我认为可以做到这一点。有没有办法这样做

【问题讨论】:

    标签: eclipse eclipse-plugin eclipse-rcp


    【解决方案1】:

    扩展ViewPart的类可以通过调用setTitleImage方法改变图片:

    protected void setTitleImage(Image titleImage)
    

    【讨论】:

    • 是的,无论如何我都尝试使用这个设置感谢您的回答
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-09-27
    • 2012-09-27
    • 1970-01-01
    • 2020-09-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多