Hud*_*don 11 eclipse eclipse-plugin
当用户通过添加以下内容右键单击Project Explorer中的文件时,我设法将一个项添加到弹出菜单中:
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions">
<command
commandId="commands.mycmd"
label="do foo"
style="push">
</command>
</menuContribution>
</extension>
Run Code Online (Sandbox Code Playgroud)
现在,我知道使用的唯一原因org.eclipse.ui.navigator.ProjectExplorer是因为这是其他人似乎正在做的事情(在Eclipse PDE文档中没有这个记录).问题是我在导航器和Package Explorer视图中也需要相同的功能(右键单击文件,你可以像在Project Explorer中那样执行"do foo".如何找到这两个中的locationURI视图(Package Explorer和Navigator)?
我已经尝试过 alt+shift+F2提示找到这样的信息,但是当您激活此模式时,Eclipse不允许您获取选项卡本身的信息.
SAI*_*AIR -4
使用
locationURI="popup:org.eclipse.ui.navigator.any?after=additions">
Run Code Online (Sandbox Code Playgroud)
它会成功的。
| 归档时间: |
|
| 查看次数: |
5495 次 |
| 最近记录: |