Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Shortcut problem
Shortcut problem [message #483227] Mon, 31 August 2009 16:20 Go to next message
Eclipse UserFriend
Originally posted by: jedlicka.poll.cz

This is a multi-part message in MIME format.
--------------070701030304070900020708
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I have created my actions and I have defined some shortcuts for
them. One of these shortcuts is CTRL+F. When I press CTRL+F there appear
list with options of action for this shortcut (see attachment). This is
ok because for the same shortcut is in RCP defined action Find and
Replace. But can this shortcut work only for my actions? That means to
disable default action (Find and Replace) and to do only my action. If
it is possible could you please advice how to set this up? Any example?

Thanks.

Martin

--------------070701030304070900020708
Content-Type: image/gif;
name="key.GIF"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="key.GIF"

R0lGODlhgQAuAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/ AP//AAAA//8A
/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAz AAAzMwAzZgAz
mQAzzAAz/wBmAABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDM AADMMwDMZgDM
mQDMzADM/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMz ADMzMzMzZjMz
mTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPM ADPMMzPMZjPM
mTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2Yz AGYzM2YzZmYz
mWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bM AGbMM2bMZmbM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acaAht9p8zdG1 15QR4ieUnUcZ
udORyjV5lmx17YkkoEwW+iSCUa7JnUb/CQZaT6IRFJp6c03qaKRsWjoanVge peVPFyrH3Hsb
9clYbSd11qd7HnUmm3b9cf9XXHGapSmZiZ1KCZSbILlaKaQ8zUoqsLOO6t5y /8Up6VJ46tSs
hQEG2idspbK63XbZzQYoYK96le1Iic0mraECHrqWorzCqu518E27qqqFCSvv sHH+muVSn362
JajDSrmmpN1uqh+t/nHbqMGRwvWfh5ih+WFsnFopMb8TG/WsRBeDGm2hfHKc aJQdI1qWuVWh
uKI/MKJ8csovoqyiyk2xvPLLLcscM80zx5wzzC7rfLPPPfNsc9A14/xzqA+b mbSIYiqda5e2
+oWrdIpeWbHV9GWc8Wcgd+3n1x6DTXJwiUaM9dVoM2xUvqIu3TTTancZt9PS TX1T1JBVnfbe
ZzN+xWxrG4fsddiEC+5buWX3zfficz+tFNKOw+12429Xfl6udhOmt+KcM641 4IMbXnjopKeF
+JKbM666hJ+y7ejksEdueexl3uqw7CjCLKPuNdfI+8q+//i7z7sLb3zwyNs4 /PI66gm26NCX
Tu7Iia9uPdatAw7R9tx37/332wcEADs=
--------------070701030304070900020708--
Re: Shortcut problem [message #483717 is a reply to message #483227] Wed, 02 September 2009 17:02 Go to previous messageGo to next message
Alex Ignácio da Silva is currently offline Alex Ignácio da SilvaFriend
Messages: 23
Registered: July 2009
Junior Member
Hi all,

I have this problem too with my RCP application.

I managed to exclude the default shortcut by registering an extension to
org.eclipse.ui.bindings with no commandId set, but that disables the
shortcut of my custom command too. What I really wanted to do was to
override the platform's default shortcut.

I would like to know if there is a way of accomplishing this other than
customizing the platform's plugin defining the default shortcut.

Cheers,

Alex

Martin Jedlička wrote:
> Hi,
>
> I have created my actions and I have defined some shortcuts for them.
> One of these shortcuts is CTRL+F. When I press CTRL+F there appear list
> with options of action for this shortcut (see attachment). This is ok
> because for the same shortcut is in RCP defined action Find and Replace.
> But can this shortcut work only for my actions? That means to disable
> default action (Find and Replace) and to do only my action. If it is
> possible could you please advice how to set this up? Any example?
>
> Thanks.
>
> Martin
>
> ------------------------------------------------------------ ------------
>
Re: Shortcut problem [message #483735 is a reply to message #483717] Wed, 02 September 2009 18:35 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Alex Ignácio da Silva wrote on Wed, 02 September 2009 13:02
I managed to exclude the default shortcut by registering an extension to
org.eclipse.ui.bindings with no commandId set, but that disables the
shortcut of my custom command too. What I really wanted to do was to
override the platform's default shortcut.


You can override a shortcut in one of 3 ways

1) create a new scheme with no parent. You can then define as many keybindings as you want, as you will see none of the default bindings.

2) create a new scheme with the default scheme parent. You will inherit all of the default keybindings, but any that you define in your scheme will take precedence (I think Smile

3) create a child context off of the context containing some of the bindings. Any keys that you define in your context will take precedence over the original context.

PW


Re: Shortcut problem [message #484292 is a reply to message #483735] Sat, 05 September 2009 15:56 Go to previous message
Alex Ignácio da Silva is currently offline Alex Ignácio da SilvaFriend
Messages: 23
Registered: July 2009
Junior Member
Hi Paul,

Cool, now I managed to override the platform's default bindings!

There was still one tricky step which was setting
org.eclipse.ui/KEY_CONFIGURATION_ID=myscheme in
plugin_customization.ini, as I could find in Lars' tutorials.

Thank you very much for the hints.

Alex

Paul Webster wrote:
> Alex Ignácio da Silva wrote on Wed, 02 September 2009 13:02
>> I managed to exclude the default shortcut by registering an extension to
>> org.eclipse.ui.bindings with no commandId set, but that disables the
>> shortcut of my custom command too. What I really wanted to do was to
>> override the platform's default shortcut.
>
>
> You can override a shortcut in one of 3 ways
>
> 1) create a new scheme with no parent. You can then define as many
> keybindings as you want, as you will see none of the default bindings.
>
> 2) create a new scheme with the default scheme parent. You will inherit
> all of the default keybindings, but any that you define in your scheme
> will take precedence (I think :)
>
> 3) create a child context off of the context containing some of the
> bindings. Any keys that you define in your context will take precedence
> over the original context.
>
> PW
>
Previous Topic:Using Python inside RCP
Next Topic:Multiple platform export problem on 64 bit Cocoa OSX
Goto Forum:
  


Current Time: Fri Apr 26 23:37:43 GMT 2024

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

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

Back to the top