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:Writing a Java class for custom figures
Next Topic:Selecting root tree item
Goto Forum:
  


Current Time: Fri Mar 29 11:30:49 GMT 2024

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

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

Back to the top