2013-07-09 23 views

回答

0

eclipse.org給出的article您需要根據您的插件配置
您可以使用Eclipse使用編輯這個文件中plugin.xml

<?xml version="1.0"?> 
<plugin 
    name="Eclipse Hello World Example" 
    id="org.eclipse.examples.helloworld" 
    version="0.0.0" 
    provider-name="OTI"> 

    <requires> 
    <import plugin="org.eclipse.core.resources"/> 
     <import plugin="org.eclipse.ui"/> 
    </requires> 

    <runtime> 
    <library name="helloworld.jar"/> 
    </runtime> 

    <extension point = "org.eclipse.ui.actionSets"> 
     <actionSet 
      id="org.eclipse.examples.helloworld.HelloWorldActionSet" 
      label="Hello World" 
     visible="true" 
     description="The action set for the Eclipse Hello World example"> 
     <menu 
     id="org.eclipse.examples.helloworld.HelloWorldMenu" 
     label="Samples"> 
     <separator name="samples"/> 
     </menu> 
     <action id="org.eclipse.examples.helloworld.actions.HelloWorldAction" 
     menubarPath="org.eclipse.examples.helloworld.HelloWorldMenu/samples" 
     toolbarPath="Normal"    
     label="Hello World" 
     tooltip="Press to see a message" 
     icon="icons/helloworld.gif" 
     class="org.eclipse.examples.helloworld.HelloWorldAction"/> 
     </actionSet> 
    </extension> 
</plugin> 

設置這些標籤只需編輯plugin.xml文件,並把這些標籤默認的文本編輯器。爲此,請選擇窗口 - >首選項,展開工作臺條目,然後選擇文件關聯。添加資源擴展xml,並將文本編輯器添加到其關聯。現在,當您嘗試在.xml文件上打開編輯器時,您將使用默認文本編輯器執行此操作.PDE使複雜插件更輕鬆

+0

問題不在於要求示例plugin.xml文件。 –

1

plugin.xml中可用的一組標籤是在Eclipse的不同安裝中不是有限的,也不是相同的。擴展點由確定plugin.xml子集模式的各種插件提供。

要理解這一點,請不要使用文本編輯器來編輯plugin.xml文件。始終使用PDE附帶的基於表單的編輯器。它將指導您發現可用的擴展點及其屬性。

相關問題