標記說明

org.eclipse.ui.ide.markerHelp

3.0 版(原先是以 org.eclipse.ui.markerHelp 的形式,加入 2.0 版中)

這個延伸點用來建立說明文字內容 ID 和特定「類型」的標記之間的關聯性(特定類型的標記或有特定屬性值)。

<!ELEMENT extension (markerHelp*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT markerHelp (attribute*)>

<!ATTLIST markerHelp

markerType    CDATA #IMPLIED

helpContextId CDATA #REQUIRED>


<!ELEMENT attribute EMPTY>

<!ATTLIST attribute

name  CDATA #REQUIRED

value CDATA #REQUIRED>


下列是標記說明延伸的範例(請注意子元素和使用屬性的方式):

 

<extension point=

"org.eclipse.ui.ide.markerHelp"

>

<markerHelp markerType=

"org.eclipse.ui.examples.readmetool.readmemarker"

helpContextId=

"org.eclipse.ui.examples.readmetool.marker_example1_context"

>

<attribute name=

"org.eclipse.ui.examples.readmetool.id"

value=

"1234"

/>

</markerHelp>

</extension>

在上面的範例中,說明內容 ID 與 org.eclipse.ui.examples.readmetool.readmemarker 類型的標記相關聯,其 org.eclipse.ui.examples.readmetool.id 的屬性值為 1234。

確定單一說明環境定義 ID 提供作為特定標記之用是由開發人員決定。 如果提供二或多個說明文字內容 ID 至給定類型的標記,工作台將未定義傳回的訊息。然而,工作台定義一律將「最特定的」文字內容 ID 傳回至給定的標記。也就是,會先傳回與三個屬性值關聯的文字內容 ID,然後傳回兩個屬性值關聯的文字內容 ID。