首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >eclipse中plugin.xml中的所有可用标记

eclipse中plugin.xml中的所有可用标记
EN

Stack Overflow用户
提问于 2013-07-09 13:48:31
回答 2查看 3.1K关注 0票数 2

对于eclipse插件开发,我如何知道plugin.xml中的所有标签都是可用的?

有没有可用的标签列表?

EN

回答 2

Stack Overflow用户

发布于 2013-07-10 00:56:22

plugin.xml中可用的标记集不是有限的,在不同的Eclipse安装中也不是相同的。扩展点由确定其plugin.xml子集的模式的各种插件提供。

为了理解这一点,不要使用文本编辑器来编辑plugin.xml文件。始终使用PDE附带的基于表单的编辑器。它将指导您发现可用的扩展点及其属性。

票数 2
EN

Stack Overflow用户

发布于 2013-07-09 13:53:45

eclipse.org提供的article中,您需要在plugin.xml中设置这些标记

代码语言:javascript
复制
<?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来完成此操作,这使得复杂插件的操作变得容易得多

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17540859

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档