您的位置:首页 >> 编程开发 >> Java >> Java基础 >> Eclipse >> 正文
Eclipse RSS
 

自己动手编写Eclipse扩展点

http://www.rdxx.com 04年09月15日 12:12 Blog 我要投稿

关键词: 扩展 , Eclipse , IP

  </extension>
  这样就可以通过“window->show view->other”,在弹出的“Show view”对话框中选择“WorkList视图”,打开视图,我们用这个视图显示workList扩展点的所有扩展信息。“Show View”对话框显示了Eclipse中定义所有视图,即所有org.eclipse.views扩展点的扩展。了解这一点很重要,因为我们在编写workList扩展点代码时,就可以模仿甚至拷贝views扩展点的代码。
  下面,我们要在net.softapp.worklist插件中定义workList扩展点。
  扩展点的定义文件按照Eclipse的存放方式,一般存放在schema目录下,我们把文件命名为worklist.exsd。内容如下,此内容由PDE生成:
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="mtn.esip.worklist">
<annotation>
      <appInfo>
         <meta.schema plugin="net.softapp.worklist" id="workList" name="workList"/>
         <!--通过这个定义,我们可以看出,定义的扩展点的id是 net.softapp.worklist.workList,以后引用时要注意,同时注意大小写-->
      </appInfo>
      <documentation>
         [Enter description of this extension point.]
      </documentation>
   </annotation>

   <element name="extension">
      <complexType>
         <choice minOccurs="0" maxOccurs="unbounded">
            <element ref="category" minOccurs="0" maxOccurs="1"/>
            <element ref="worklist" minOccurs="0" maxOccurs="1"/>
         </choice>
         <attribute name="point" type="string" use="required"><!--定义point-->
            <annotation>
               <documentation>                 
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string"><!--定义id-->
            <annotation>
               <documentation>                 
               </documentation>

共7页  第1页 第2页 第3页 第4页 第5页 第6页 第7页


 
 
标签: 扩展 , Eclipse , IP 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站