图标插件java_java – Eclipse插件:标记的自定义图标

请参阅bug 260909“markerImageProviders扩展点不起作用”(在阅读this thread后找到)

Tod Creasey 2009-01-21 07:32:38 EST

We have never had the push to make this API because it has some inflexibility that made it generally not consumable – it was written early on to enable the first marker views for the 3 severities we use and as a result was not used by the markerSupport as it was not API.

It is confusing that we have an internal extension point (we don’t generally do

that) but removing it would likely break someone without warning.

[由Itay编辑]

根据Vonc的指示,我最终成功地完成了这项工作.

以下是我的plugin.xml中的相关片段(假设插件名称是a.b.c)

陷阱

>标记的超类型必须设置为org.eclipse.core.resources.textmarker.任何其他值都将阻止您使用自定义图标.

>在代码中创建标记时,请确保其严重性与org.eclipse.ui.editors.annotationTypes扩展点的markerSeverity属性中指定的严重性值相匹配. 1表示警告等

>确保在build.properties文件(或插件编辑器中的“构建”选项卡)中指定了icons文件夹

>上面的声明只会指定一个自定义图标.如果要自定义其他属性(概览标尺上的指示颜色等),请按照此解决方案所基于的here中的示例进行操作.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值