我基於ibm教程Best practices for developing Eclipse plugins Using markers, annotations, and decorators創建了自己的標記。標記視圖顯示我的標記,帶有紅色正方形的錯誤/警告圖標
在我的插件XML 我有這樣的事情:
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
:
<extension point="org.eclipse.core.resources.markers"
id="com.ibm.mymarkers.mymarker"
name="My error">
<super type="org.eclipse.core.resources.textmarker"/>
<super type="org.eclipse.core.resources.marker"/>
<persistent value="true"/>
</extension>
我用不同的超類型,如
<super type="org.eclipse.core.resources.problemmarker"/>
當我創建我設置標記也嘗試問題在於標記顯示在標記視圖中,但沒有圖標(基本上是紅色正方形),我如何爲這些標記定義圖標?
我試過Vogella這個簡單的例子,但仍然沒有看到標記被創建但沒有圖像的任何圖像。
IMarker marker = res.createMarker(IMarker.TASK);
marker.setAttribute(IMarker.MESSAGE, "This a a task");
marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
我是否可能缺少一些包含此圖片的插件?
你有沒有試過它*只是* problemmarker作爲超級類型? – nitind
是的,我做到了,和它相同的行爲 – user847988