【问题标题】:How to add debug items to toolbar for my custom perspective in Eclipse?如何在 Eclipse 中为我的自定义透视图添加调试项到工具栏?
【发布时间】:2023-03-19 09:56:02
【问题描述】:

我有一个具有独特视图的自定义透视图。当我切换到我的视角时,我想添加调试项。我假设我应该使用这个扩展点将它们添加到我的 plugin.xml 中 =“org.eclipse.ui.menus”,但我不知道如何指定这些按钮。

【问题讨论】:

    标签: eclipse eclipse-plugin eclipse-rcp toolbar


    【解决方案1】:

    要将现有项目添加到透视图中,请使用 org.eclipse.ui.perspectiveExtensions 扩展点。

    您可能需要此扩展点的actionSet 元素。您必须进行一些研究才能确定现有的操作集 ID 是什么。

    您可能需要重置透视图才能显示您的更改。

    在 org.eclipse.debug.ui 插件中查找其操作集 ID。其中之一是org.eclipse.debug.ui.debugActionSet

    <extension point="org.eclipse.ui.perspectiveExtensions"> 
        <perspectiveExtension 
            targetID="your perspective id"> 
            <actionSet id="org.eclipse.debug.ui.debugActionSet"/> 
         </perspectiveExtension> 
    </extension> 
    

    【讨论】:

    • 如果可能的话,你能给我举个例子吗?因为我只想要调试项目,而且我认为我不应该在拥有扩展名时创建一个类来引用。也许那些调试工具栏项目的 id 名称?
    • perspectiveExtensions 不需要类
    • actionsets 已弃用十年
    • @Basilevs 我知道这一点,但似乎没有perspectiveExtensions 的替代品。
    猜你喜欢
    • 1970-01-01
    • 2011-06-27
    • 1970-01-01
    • 2012-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多