java主工具栏在EclipseRCP应用程序中不显示

dgiusagp  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(471)

我在EclipseRCP3.x上有一个应用程序,并尝试通过plugin.xml添加主工具栏。
运行应用程序后,我看不到它。工具栏不可见。我不明白代码里怎么了。

<menuContribution
    allPopups="false"
    locationURI="toolbar:org.eclipse.ui.main.toolbar">
 <toolbar
       id="rcp.toolbar1">
    <command
          commandId="org.eclipse.ui.file.save"
          label="Save"
          style="push">
    </command>
    <command
          commandId="org.eclipse.ui.file.saveAll"
          id="rcp.menu.file.saveall"
          label="Save All"
          style="push">
    </command>
 </toolbar>
</menuContribution>
jrcvhitl

jrcvhitl1#

我有ApplicationWorkbenchVisor类,但我不碰它。
就像greg-449已经说过的:除了在 plugin.xml ,您还必须激活 ApplicationWorkbenchWindowAdvisor 类-如果已创建。

相关问题