【问题标题】:Eclipse PDE, markerAnnotationSpecification - define without iconEclipse PDE,markerAnnotationSpecification - 不带图标定义
【发布时间】:2015-09-01 12:05:39
【问题描述】:

我正在为 Eclipse 开发一个 PDE,我已经通过 markerAnnotationSpecification 创建了注释(参见PDB help)。我需要那些左侧没有图标的注释(断点所在的位置),但问题是当我没有为我的注释指定图标参数时,它将使用 symbolicIcon 参数中的默认图标。目前我正在使用一个有点hacky的解决方案 - 加载一个空图像。当用户瞄准图标位置时,光标仍然会发生变化,这是不希望的行为。

TL;DR; 有没有办法完全删除(不要使用)这个图标?

这是我的规范扩展点元素之一

<specification
            annotationType="com.xxx.profiler.editor.highlight.highannotation"
            colorPreferenceKey="covc_h"
            colorPreferenceValue="255,120,120"
            highlightPreferenceKey="covh_h"
            highlightPreferenceValue="true"
            icon="/icons/ph_icon.gif" <!-- empty icon -->
            label="High Coverage"
            overviewRulerPreferenceKey="covr_h"
            overviewRulerPreferenceValue="false"
            presentationLayer="1"
            textPreferenceKey="covt_h"
            textPreferenceValue="false"
            textStylePreferenceKey="covs_h"
            textStylePreferenceValue="BOX"
            verticalRulerPreferenceKey="covv_h"
            verticalRulerPreferenceValue="false">
</specification>

//编辑:我发现这应该用 verticalRulerPreferenceValue="false" 来完成,但由于某种原因,即使它在注释首选项中被禁用,图像也会显示在我的注释中

【问题讨论】:

    标签: java eclipse pde


    【解决方案1】:

    好的,找到问题了。 org.eclipse.ui.editors.markerAnnotationSpecification 通过 org.eclipse.ui.editors.annotationTypes 插件链接到 markerType。在这个插件中,我(按照教程)自动将参数 super 设置为某个值,这涵盖了我在 markerAnnotationSpecification 中的设置。在此处删除继承参数后,一切都按预期工作。

    【讨论】:

      猜你喜欢
      • 2013-06-21
      • 2013-04-10
      • 2018-01-02
      • 1970-01-01
      • 2011-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多