Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problem about key binding!
Problem about key binding! [message #212234] Mon, 20 March 2006 09:51 Go to next message
Eclipse UserFriend
Originally posted by: java.freshman.cx.gmail.com

Hi, all.

In my project, I need to bind key "CTRL+A" to my customized
SelectAllAction by installing KeyHandler to my editor to handler keyboard
event.
It works well when the runtime platform is eclipse workbench, but the key
binding doesn't work with RCP platform.

What is the problem in deed on RCP platform? And what should I do
additionally?

Also, I am wondering is there any solution of key binding.
How about extending the extension points "binding" and "command"?

Thanks a lot!
Re: Problem about key binding! [message #212490 is a reply to message #212234] Thu, 23 March 2006 21:33 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
I think the proper way to is to declare your action with an global ID using
the org.eclipse.ui.actions.ActionFactory.SELECT_ALL.getId().

Then you need to override the GraphicalEditor#createActions method and
register your SelectAllAction.

-Steve

"Shawn Chen" <java.freshman.cx@gmail.com> wrote in message
news:52dfeaa4f0fa27e81e74724b12853804$1@www.eclipse.org...
> Hi, all.
>
> In my project, I need to bind key "CTRL+A" to my customized
> SelectAllAction by installing KeyHandler to my editor to handler keyboard
> event.
> It works well when the runtime platform is eclipse workbench, but the key
> binding doesn't work with RCP platform.
>
> What is the problem in deed on RCP platform? And what should I do
> additionally?
>
> Also, I am wondering is there any solution of key binding.
> How about extending the extension points "binding" and "command"?
>
> Thanks a lot!
>
Re: Problem about key binding! [message #212499 is a reply to message #212490] Fri, 24 March 2006 01:16 Go to previous message
Eclipse UserFriend
Originally posted by: java.freshman.cx.gmail.com

Hi, Steven,

I tried this solution before. But it seems not to work well.
"CTRL+A" is always diabled in RCP environment.

Steven Shaw wrote:

> I think the proper way to is to declare your action with an global ID using
> the org.eclipse.ui.actions.ActionFactory.SELECT_ALL.getId().

> Then you need to override the GraphicalEditor#createActions method and
> register your SelectAllAction.

> -Steve

> "Shawn Chen" <java.freshman.cx@gmail.com> wrote in message
> news:52dfeaa4f0fa27e81e74724b12853804$1@www.eclipse.org...
>> Hi, all.
>>
>> In my project, I need to bind key "CTRL+A" to my customized
>> SelectAllAction by installing KeyHandler to my editor to handler keyboard
>> event.
>> It works well when the runtime platform is eclipse workbench, but the key
>> binding doesn't work with RCP platform.
>>
>> What is the problem in deed on RCP platform? And what should I do
>> additionally?
>>
>> Also, I am wondering is there any solution of key binding.
>> How about extending the extension points "binding" and "command"?
>>
>> Thanks a lot!
>>
Previous Topic:Usage of GEF only in an eclipse view (no editor)
Next Topic:Selection Problem when two GEF editor instances are running
Goto Forum:
  


Current Time: Thu Dec 01 14:19:00 GMT 2022

Powered by FUDForum. Page generated in 0.01831 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top