【发布时间】:2014-01-07 11:17:02
【问题描述】:
我的问题与here 相同。但是那里提供的解决方案对我不起作用。
我已按照 greg-449 在我的观点的createPartControl 中的回答中所述激活了上下文。
IContextService contextService = IContextService)getSite().getService(IContextService.class);
contextService.activateContext(myViewContextId);
当我的视图被激活时,我在 Eclipse 控制台上收到以下警告
!MESSAGE CTRL+F 发生冲突:
绑定(CTRL+F, ParameterizedCommand(Command(myFindCmdId,Find, , 类别(org.eclipse.core.commands.categories.autogenerated,未分类,自动生成或没有类别的命令,true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@f41266e, ,,true),null), org.eclipse.ui.defaultAcceleratorConfiguration, myViewContextId,,,system)
绑定(CTRL+F, ParameterizedCommand(Command(org.eclipse.ui.edit.findReplace,查找和替换, 查找和替换文本, 类别(org.eclipse.ui.category.edit,Edit,null,true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@24ad92b0, ,,true),null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.ui.contexts.window,,,system)
===Plugin.xml 有 ====
<extension
point="org.eclipse.ui.contexts">
<context
id=<myViewContextId>
name="abc">
</context>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId=<myFindCmdId>
contextId=<myViewContextId>
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1+F">
</key>
//some more key binding here
</extension>
【问题讨论】:
标签: eclipse eclipse-rcp eclipse-plugin