Lines 636-658
Link Here
|
636 |
return null; |
636 |
return null; |
637 |
} |
637 |
} |
638 |
|
638 |
|
639 |
/** |
639 |
/* |
640 |
* TODO Promote this method to API. |
640 |
* (non-Javadoc) |
641 |
* <p> |
|
|
642 |
* Adds a single new binding to the existing array of bindings. If the array |
643 |
* is currently <code>null</code>, then a new array is created and this |
644 |
* binding is added to it. This method does not detect duplicates. |
645 |
* </p> |
646 |
* <p> |
647 |
* This method completes in amortized <code>O(1)</code>. |
648 |
* </p> |
649 |
* |
641 |
* |
650 |
* @param binding |
642 |
* @see |
651 |
* The binding to be added; must not be <code>null</code>. |
643 |
* org.eclipse.ui.keys.IBindingService#addBinding(org.eclipse.jface.bindings |
|
|
644 |
* .Binding) |
652 |
*/ |
645 |
*/ |
653 |
public final void addBinding(final Binding binding) { |
646 |
public final void addBinding(final Binding binding) { |
654 |
MBindingTable table = getMTable(binding.getContextId()); |
647 |
MBindingTable table = getMTable(binding.getContextId()); |
655 |
createORupdateMKeyBinding(application, table, binding); |
648 |
createORupdateMKeyBinding(application, table, binding); |
|
|
649 |
manager.addBinding(binding); |
656 |
} |
650 |
} |
657 |
|
651 |
|
658 |
/** |
652 |
/** |
Lines 851-862
Link Here
|
851 |
return null; |
845 |
return null; |
852 |
} |
846 |
} |
853 |
|
847 |
|
854 |
/** |
848 |
/* |
855 |
* Remove the specific binding by identity. Does nothing if the binding is |
849 |
* (non-Javadoc) |
856 |
* not in the manager. |
|
|
857 |
* |
850 |
* |
858 |
* @param binding |
851 |
* @see |
859 |
* The binding to be removed; must not be <code>null</code>. |
852 |
* org.eclipse.ui.keys.IBindingService#removeBinding(org.eclipse.jface.bindings |
|
|
853 |
* .Binding) |
860 |
*/ |
854 |
*/ |
861 |
public final void removeBinding(final Binding binding) { |
855 |
public final void removeBinding(final Binding binding) { |
862 |
MKeyBinding mKeyBinding; |
856 |
MKeyBinding mKeyBinding; |
Lines 889-894
Link Here
|
889 |
mKeyBinding.getTags().add(EBindingService.DELETED_BINDING_TAG); |
883 |
mKeyBinding.getTags().add(EBindingService.DELETED_BINDING_TAG); |
890 |
} |
884 |
} |
891 |
} |
885 |
} |
|
|
886 |
|
887 |
manager.removeBinding(binding); |
892 |
} |
888 |
} |
893 |
|
889 |
|
894 |
public BindingManager getBindingManager() { |
890 |
public BindingManager getBindingManager() { |