开发者

How to filter eclipse rcp key bindings as ESC key?

I have some trouble to select combo item from AutoCompleteField.

When I begin to write into com开发者_运维问答bo, some proposals are displayed with a pop-up dialog. If I select an item and hit Enter, this choice is kept by combo: this is the common behavior.

If a key binding exists on Enter, the handler is activated, but the pop-up dialog is never notified from this event. The same does not occur with the {ESC} key !

I think there is a way to filter key as Esc one to bypass key bindings, anybody knows a way to do that?

I'm using eclipse RCP 3.4.2 on Fedora.

It has the same behavior with eclipse RCP 3.4.2 and 3.6.2 on Windows.

Workaround

I have wrote a specific AutoCompleteField, then I add an IContentProposalListener2 on the ContentProposalAdapter to disable the key bindings context when pop-up dialog opens and to restore it when it is closed.

This is not a satisfactory solution because the chain of responsibility for activating the context is broken.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜