对于eclipse插件开发,我如何知道plugin.xml中的所有标签都是可用的?
有没有可用的标签列表?
发布于 2013-07-10 00:56:22
plugin.xml中可用的标记集不是有限的,在不同的Eclipse安装中也不是相同的。扩展点由确定其plugin.xml子集的模式的各种插件提供。
为了理解这一点,不要使用文本编辑器来编辑plugin.xml文件。始终使用PDE附带的基于表单的编辑器。它将指导您发现可用的扩展点及其属性。
发布于 2013-07-09 13:53:45
在eclipse.org提供的article中,您需要在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文件并根据您的插件配置放置这些标记
您可以使用Eclipse和默认的文本编辑器来编辑此文件。为此,请选择Window -> Preferences,展开工作台条目,然后选择File associations。添加资源扩展xml,并将文本编辑器添加到其关联中。现在,当您尝试打开.xml文件上的编辑器时,您将使用默认文本editor.PDE来完成此操作,这使得复杂插件的操作变得容易得多
https://stackoverflow.com/questions/17540859
复制相似问题