如何将范围附加到绑定到Eclipse默认命令的处理程序

时间:2014-07-25 21:20:27

标签: java eclipse-plugin eclipse-rcp eclipse-pde

我在弄清楚如何覆盖命令时遇到了问题,具体而言: Eclipse RCP中的org.eclipse.ui.edit.text.showInformation

看起来像org.eclipse.ui.handlers延伸从不触发我的处理程序,控制台总是返回:

COMMANDS >>> execute >>> starting: id=org.eclipse.ui.edit.text.showInformation; event=ExecutionEvent(Command(org.eclipse.ui.edit.text.showInformation,Show Tooltip Description,
        Displays information for the current caret location in a focused hover,
        Category(org.eclipse.ui.category.textEditor,Text Editing,Text Editing Commands,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@325c29d9,
        ,,true),{},null,org.eclipse.e4.core.commands.internal.HandlerServiceImpl$ExecutionContexts@9a49ddd)
COMMANDS >>> execute >>> success: id=org.eclipse.ui.edit.text.showInformation; returnValue=null
CONTEXTS >>> [org.eclipse.ui.actionSet.keyBindings, org.eclipse.ui.edit.text.actionSet.annotationNavigation, org.eclipse.ui.contexts.dialogAndWindow, org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo, org.eclipse.search.searchActionSet, org.eclipse.ui.edit.text.actionSet.navigation, org.eclipse.ui.cheatsheets.actionSet, org.eclipse.ui.NavigateActionSet, org.eclipse.ui.externaltools.ExternalToolsSet, org.eclipse.ui.contexts.window, org.eclipse.ui.actionSet.openFiles]

这真的闻起来像我没有做必要的事情(它总是转到AbstractTextEditor中的默认InformationDispatchAction)。

评论表明我没有org.eclipse.ui.textEditorScope,但是如何为执行处理程序添加上下文?

0 个答案:

没有答案