Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Keybinding's scheme
Keybinding's scheme [message #653715] Thu, 10 February 2011 19:38 Go to next message
Jesus   Luna Quiroga is currently offline Jesus Luna QuirogaFriend
Messages: 67
Registered: July 2009
Location: Mexico
Member

Hi,
I'm trying the new keybinding feature and it works fine when I use the org.eclipse.ui.defaultAcceleratorConfiguration scheme, but this scheme produces conflicts with some keys like this:

!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2011-02-10 13:22:55.982
!MESSAGE A conflict occurred for F2:
Binding(F2,
ParameterizedCommand(Command(50200,F2, , Category(ui.controllers.category,category,Tool Bar commands,true), ,,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(F2,
ParameterizedCommand(Command(org.eclipse.ui.edit.rename,Rena me,Rename the selected item,
Category(org.eclipse.ui.category.file,File,null,true),,,,tru e),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)

So I tried to define my own scheme:

<scheme name="key scheme" description="Application's shortcuts" id="scheme.id" />

But I have read that in order to use my own scheme I have to register it in the plugin_customization.ini file, and I did.
But it seems that the application is not reading this file. In RCP the plugin_customization.in file is configured in the products extension point, but this extension point doesn't exist in RAP.

Is there another way to register the scheme?
Re: Keybinding's scheme [message #653905 is a reply to message #653715] Fri, 11 February 2011 18:57 Go to previous message
Jesus   Luna Quiroga is currently offline Jesus Luna QuirogaFriend
Messages: 67
Registered: July 2009
Location: Mexico
Member

Hi,
I found a way to activate the shceme through the code:
BindingService service = (BindingService)configurer.getWindow().getWorkbench().getSer vice(IBindingService.class);
Scheme s = service.getScheme("scheme.id");
manager.setActiveScheme(s);

With this code the conflicts do not appear, and I also realized there is no need of the plugin_customization.ini since the scheme is registered with the declaration of it in the plugin.xml, but no activated.

I don't know if it is the best way to activate the scheme, does anyone has a better idea for this?
Previous Topic:File Drag & Drop from Desktop
Next Topic:Controlling the Scrollbar position in a Text Widget
Goto Forum:
  


Current Time: Mon Oct 18 05:31:43 GMT 2021

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

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

Back to the top