此链接描述了一些具有透视工具栏并将其映射到 ClassURI 的机制:
platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org. eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher
我尝试了同样的方法,但我没有得到任何工具栏的贡献。我想我在某个地方出错了。如果我在任何地方出错了,有人可以纠正我吗?
我在“Application.e4xmi”文件中使用的代码片段是:
<toolBarContributions xmi:id="_iJ5CQFxFEeWnG7SUWOY3vg" elementId="com.ami.veb.application.toolbarcontribution.0">
<children xsi:type="menu:ToolControl" xmi:id="_lvnLwFxFEeWnG7SUWOY3vg" elementId="com.ami.veb.application.toolcontrol.0" contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher"/>
</toolBarContributions>