diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java index 8c601e5..ba81aca 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java @@ -636,23 +636,17 @@ return null; } - /** - * TODO Promote this method to API. - *

- * Adds a single new binding to the existing array of bindings. If the array - * is currently null, then a new array is created and this - * binding is added to it. This method does not detect duplicates. - *

- *

- * This method completes in amortized O(1). - *

+ /* + * (non-Javadoc) * - * @param binding - * The binding to be added; must not be null. + * @see + * org.eclipse.ui.keys.IBindingService#addBinding(org.eclipse.jface.bindings + * .Binding) */ public final void addBinding(final Binding binding) { MBindingTable table = getMTable(binding.getContextId()); createORupdateMKeyBinding(application, table, binding); + manager.addBinding(binding); } /** @@ -851,12 +845,12 @@ return null; } - /** - * Remove the specific binding by identity. Does nothing if the binding is - * not in the manager. + /* + * (non-Javadoc) * - * @param binding - * The binding to be removed; must not be null. + * @see + * org.eclipse.ui.keys.IBindingService#removeBinding(org.eclipse.jface.bindings + * .Binding) */ public final void removeBinding(final Binding binding) { MKeyBinding mKeyBinding; @@ -889,6 +883,8 @@ mKeyBinding.getTags().add(EBindingService.DELETED_BINDING_TAG); } } + + manager.removeBinding(binding); } public BindingManager getBindingManager() { diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IBindingService.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IBindingService.java index 3c25535..957c33d 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IBindingService.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/keys/IBindingService.java @@ -13,7 +13,6 @@ import java.io.IOException; import java.util.Collection; import java.util.Map; - import org.eclipse.core.commands.ParameterizedCommand; import org.eclipse.jface.bindings.Binding; import org.eclipse.jface.bindings.IBindingManagerListener; @@ -56,6 +55,30 @@ /** *

+ * Adds a single new binding to the existing array of bindings. If the array + * is currently null, then a new array is created and this + * binding is added to it. This method does not detect duplicates. + *

+ *

+ * This method completes in amortized O(1). + *

+ * + * @param binding + * The binding to be added; must not be null. + */ + public void addBinding(final Binding binding); + + /** + * Remove the specific binding by identity. Does nothing if the binding is + * not in the manager. + * + * @param binding + * The binding to be removed; must not be null. + */ + public void removeBinding(final Binding binding); + + /** + *

* Adds a listener to this binding service. The listener will be notified * when the set of defined schemes or bindings changes. This can be used to * track the global appearance and disappearance of bindings.