Eclipse RCP应用程序中未显示主工具栏

时间:2015-04-28 13:56:38

标签: java eclipse toolbar rcp plugin.xml

我在Eclipse RCP 3.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>

1 个答案:

答案 0 :(得分:0)

  

我有ApplicationWorkBenchAdvisor类,但我不碰它。

就像greg-449已经评论过:在plugin.xml的{​​{3}}旁边,你ApplicationWorkbenchWindowAdvisor课程中的defining some toolbar elements也是如此。