Eclipse插件开发:如何避免不推荐的ActionSet? [英] Eclipse plugin development: How to avoid deprecated ActionSet?

查看:301
本文介绍了Eclipse插件开发:如何避免不推荐的ActionSet?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从官方的Eclipse插件开发教程中,我复制了以下代码,以在我的plugin.xml中定义一个新按钮

From an official Eclipse plugin development tutorial, I copied the following code to define a new button in my plugin.xml

<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>

但不幸的是,我收到一些不赞成的警告。 Especiall为扩展点和动作。我找不到任何信息如何避免。任何提示?

But unfortunately, I get some deprecated warnings. Especiall for the extension point and the actionset. I couldn't find any information how to avoid that. Any hints?

推荐答案

问题是整个操作框架已被弃用。如今,一个使用命令。有关命令的更多信息,请参见此处此处

The problem is that the whole action framework is deprecated. Nowadays, one uses commands instead. You can find more information about commands for instance here or here.

这篇关于Eclipse插件开发:如何避免不推荐的ActionSet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆