Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Getting exception during unbind of F2 key(Getting exception during unbind of F2 key)
Getting exception during unbind of F2 key [message #1805810] Wed, 24 April 2019 14:09
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018

I want to unbind F2 key Programatically in eclipse java. Iam having the some piece of code where Iam unbinding but Iam not getting how to activate my binding manager and save.
Please find the below code

ContextManager contextManager = new ContextManager();

BindingManager bindingManager = new BindingManager(contextManager,
IBindingService bindingService = (IBindingService) PlatformUI.
Binding[] bindings = bindingService.getBindings();
for (Binding binding : bindings) {
KeyBinding keyBinding = (KeyBinding) binding;
String contextId = binding.getContextId();
String schemeId = binding.getSchemeId();
KeySequence triggerSequence = keyBinding.getKeySequence();

ParameterizedCommand parameterizedCommand = binding
Command command = parameterizedCommand.getCommand();
KeyBinding deleteBinding = new KeyBinding(triggerSequence,
null, schemeId, contextId, null, null, null,

If I tried to activate bindingManager Iam getting exceptions
try {

} catch (final NotDefinedException e) {
throw new Error(
"Error"); //$NON-NLS-1$
If I save the active binding Iam getting exceptions.
try {
bindingManager .getActiveScheme(), bindingManager
} catch (IOException e) {

Iam adding this code in my perspective plugin. I hope Iam unbinding F2 key but Iam not getting how to activate and save
PLease find the below stack Trace
Cannot get the parent identifier from an undefined scheme. org.eclipse.ui.defaultAcceleratorConfiguration

Please anyone help me
Previous Topic:Interest in hosting Emacs+ plugin?
Next Topic:properties page goes blank randomly in Eclipse RCP application
Goto Forum:

Current Time: Sat May 18 17:00:09 GMT 2024

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

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

Back to the top