Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 229544 Details for
Bug 379289
No supported public API for programmatically modifying/adding bindings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Breaking backward compatibility patch
bug379289_breaking.patch (text/plain), 3.53 KB, created by
Arnaud Brunet
on 2013-04-09 19:25:34 EDT
(
hide
)
Description:
Breaking backward compatibility patch
Filename:
MIME Type:
Creator:
Arnaud Brunet
Created:
2013-04-09 19:25:34 EDT
Size:
3.53 KB
patch
obsolete
>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. >- * <p> >- * Adds a single new binding to the existing array of bindings. If the array >- * is currently <code>null</code>, then a new array is created and this >- * binding is added to it. This method does not detect duplicates. >- * </p> >- * <p> >- * This method completes in amortized <code>O(1)</code>. >- * </p> >+ /* >+ * (non-Javadoc) > * >- * @param binding >- * The binding to be added; must not be <code>null</code>. >+ * @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 <code>null</code>. >+ * @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 @@ > > /** > * <p> >+ * Adds a single new binding to the existing array of bindings. If the array >+ * is currently <code>null</code>, then a new array is created and this >+ * binding is added to it. This method does not detect duplicates. >+ * </p> >+ * <p> >+ * This method completes in amortized <code>O(1)</code>. >+ * </p> >+ * >+ * @param binding >+ * The binding to be added; must not be <code>null</code>. >+ */ >+ 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 <code>null</code>. >+ */ >+ public void removeBinding(final Binding binding); >+ >+ /** >+ * <p> > * 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.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 379289
: 229544