请参阅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中的示例进行操作.