2015-09-01 39 views
1

我正在爲Eclipse開發PDE,我通過markerAnnotationSpecification創建了註釋(請參閱PDB help)。我需要那些沒有左側圖標(斷點處)的註釋,但問題是,當我沒有爲我的註釋指定圖標參數時,它將使用symbolicIcon參數中的默認圖標。目前,我正在使用一些黑客解決方案 - 加載一張空白圖片。靜態光標在用戶定位圖標位置時發生變化,這是不希望的行爲。Eclipse PDE,markerAnnotationSpecification - define without icon

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做=「假」但由於某些原因,甚至認爲它是在註釋偏好設置中禁用,圖像顯示在我的註釋中

回答

0

確定發現問題。 org.eclipse.ui.editors.markerAnnotationSpecification已鏈接到markerType via org.eclipse.ui.editors.annotationTypes插件。在這個插件中,我(以下教程)自動將參數super設置爲某個值,其中涵蓋了我在markerAnnotationSpecification中的設置。在刪除繼承參數後,一切都按預期工作。