注釈タイプ

org.eclipse.ui.editors.annotationTypes

3.0

注釈は、テキスト文書の特定領域に付加されている情報です。 新規の注釈は、この拡張ポイントを使用して定義できます。 注釈は、注釈モデルを使用して文書に付加され、テキスト・エディターおよびビューに表示されます。 注釈タイプは階層構造になっています。 別の型の super 属性に指定することによって、注釈タイプは別の型を詳細化します。 一部の注釈は、マーカーの UI 部分として機能します (org.eclipse.core.resources.IMarker を参照)。 一方、維持可能な形式を持たずに独自の形式で存在する注釈もあります。 マーカーと注釈タイプの間のマッピングは、markerType および markerSeverity 属性 (オプション) で定義します。

<!ELEMENT extension (type)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT type EMPTY>

<!ATTLIST type

name           CDATA #REQUIRED

markerType     CDATA #IMPLIED

super          CDATA #IMPLIED

markerSeverity (0|1|2) >

マーカーの型定義。



以下は、JDT UI 用の plugin.xml の抜粋です。ここでは、Java コンパイラー・エラーおよび警告注釈を追加します。
   

<extension point=

"org.eclipse.ui.editors.annotationTypes"

>

<type name=

"org.eclipse.jdt.ui.error"

super=

"org.eclipse.ui.workbench.texteditor.error"

markerType=

"org.eclipse.jdt.core.problem"

markerSeverity=

"2"

>

</type>

<type name=

"org.eclipse.jdt.ui.warning"

super=

"org.eclipse.ui.workbench.texteditor.warning"

markerType=

"org.eclipse.jdt.core.problem"

markerSeverity=

"1"

>

</type>

<type name=

"org.eclipse.jdt.ui.info"

super=

"org.eclipse.ui.workbench.texteditor.info"

markerType=

"org.eclipse.jdt.core.problem"

markerSeverity=

"0"

>

</type>

</extension>

org.eclipse.jface.text.source.Annotation クラスおよび org.eclipse.ui.editors.markerAnnotationSpecification 拡張ポイントを参照してください。