


























实际上就是对eclipse actionSets扩展点的应用
<extension point="org.eclipse.ui.actionSets">
<actionSet
id="my.actionSet"
label="Sample Action Set"
visible="true">
<menu
id="sampleMenu"
label="Sample &Menu">
<separator
name="sampleGroup">
</separator>
</menu>
<action
class="My.SampleAction"
icon="icons/sample.gif"
id="My.SampleActionID"
label="&Sample Action"
menubarPath="sampleMenu/sampleGroup"
toolbarPath="sampleGroup"
tooltip="Hello, Eclipse world">
</action>
</actionSet>
</extension>
只需要实现My.SampleAction类就好了,这个类必须实现IWorkbenchWindowActionDelegate或者IWorkbenchWindowPulldownDelegate接口。具体应用参考eclipse help中关于org.eclipse.ui.actionSets扩展点的说明。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。