我们先新建一个 元素(New Element)名称为 extender,
这时有两个元素了,在第一个元素上点右键,在弹出的对话框中选择"序列",
再在这个新增的对象上右键新增一个 extender 对象。
在 extender 的明细页中将 最大边界选择为 无边界就行了。
接下来我们给 extender 元素增加属性,过程就省略了
上面是添加好的属性,注意其中的className属性
好了,扩展点就这样建好了,下面我将这个扩展点文件贴出来:
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace= "TheMainMenuProject" >
<annotation>
<appInfo>
<meta.schema plugin= "TheMainMenuProject" id= "org.vwpolo.rcp.extender" name= "RCP Extension Point" />
</appInfo>
<documentation>
[Enter description of this extension point.]
</documentation>
</annotation>
<element name= "extension" >
<complexType>
<sequence>
<element ref= "extender" minOccurs= "1" maxOccurs= "unbounded" />
</sequence>
<attribute name= "point" type= "string" use= "required" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "id" type= "string" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "name" type= "string" >
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable= "true" />
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name= "extender" >
<complexType>
<attribute name= "id" type= "string" use= "required" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "name" type= "string" use= "required" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "type" use= "required" >
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base= "string" >
<enumeration value= "perspective" >
</enumeration>
<enumeration value= "view" >
</enumeration>
<enumeration value= "action" >
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name= "clientId" type= "string" use= "required" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "index" type= "string" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "desc" type= "string" >
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name= "className" type= "string" >
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute kind= "java" basedOn= "org.eclipse.jface.action.Action:" />
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type= "since" />
</appInfo>
<documentation>
[Enter the first release in which this extension point appears.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type= "examples" />
</appInfo>
<documentation>
[Enter extension point usage example here.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type= "apiInfo" />
</appInfo>
<documentation>
[Enter API information here.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type= "implementation" />
</appInfo>
<documentation>
[Enter information about supplied implementation of this extension point.]
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type= "copyright" />
</appInfo>
<documentation>
</documentation>
</annotation>
</schema>