用户可以定义和查询给定类型的标记。标记类型是在支持多重继承性的层次结构中定义的。标记类型定义还指定必须或可能存在于该类型的标记上的一些属性以及该类型的标记是否应该被持久保存。
标记扩展点允许标记编写者使用符号名称注册他们的标记类型,然后,在工作空间中使用此符号名称来创建和查询标记。该符号名称是标记扩展的标识。当定义标记扩展时,鼓励用户在“name”属性中包含人类可读的值,“name”属性标识它们的标记,并且可能显示给用户。
<!ELEMENT extension (super* , persistent? , attribute*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT super EMPTY>
<!ATTLIST super
type CDATA #REQUIRED>
<!ELEMENT persistent EMPTY>
<!ATTLIST persistent
value (true | false) >
<!ELEMENT attribute EMPTY>
<!ATTLIST attribute
name CDATA #REQUIRED>
<extension id=
"com.xyz.coolMarker"
point=
"org.eclipse.core.resources.markers"
name=
"Cool Marker"
>
<persistent value=
"true"
/>
<super type=
"org.eclipse.core.resources.problemmarker"
/>
<super type=
"org.eclipse.core.resources.textmarker"
/>
<attribute name=
"owner"
/>
</extension>
Copyright (c) 2002, 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which
accompanies
this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html