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 64811 Details for
Bug 110232
[KeyBindings] preference page: adding keybinding removes keybinding from more specific context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Binding Manager v01
bindingManager-v01.txt (text/plain), 3.27 KB, created by
Paul Webster
on 2007-04-24 21:16:37 EDT
(
hide
)
Description:
Binding Manager v01
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2007-04-24 21:16:37 EDT
Size:
3.27 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/bindings/BindingManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java,v >retrieving revision 1.39 >diff -u -r1.39 BindingManager.java >--- src/org/eclipse/jface/bindings/BindingManager.java 11 Apr 2007 15:09:40 -0000 1.39 >+++ src/org/eclipse/jface/bindings/BindingManager.java 25 Apr 2007 01:15:58 -0000 >@@ -599,7 +599,7 @@ > .getParameterizedCommand(), trigger); > > } else if (match instanceof Collection) { >- bindings.addAll(resolveConflicts((Collection) match)); >+ bindings.addAll((Collection)match); > bindingsByTrigger.put(trigger, bindings); > > final Iterator matchItr = bindings.iterator(); >@@ -1927,78 +1927,6 @@ > > /** > * <p> >- * Attempts to resolve the conflicts for the given bindings -- irrespective >- * of the currently active contexts. This means that type and scheme will be >- * considered. >- * </p> >- * <p> >- * This method completes in <code>O(n)</code>, where <code>n</code> is >- * the number of bindings. >- * </p> >- * >- * @param bindings >- * The bindings which all match the same trigger sequence; must >- * not be <code>null</code>, and should contain at least two >- * items. This collection should only contain instances of >- * <code>Binding</code> (i.e., no <code>null</code> values). >- * @return The collection of bindings which match the current scheme. >- */ >- private final Collection resolveConflicts(final Collection bindings) { >- final Collection matches = new ArrayList(); >- final Iterator bindingItr = bindings.iterator(); >- Binding bestMatch = (Binding) bindingItr.next(); >- matches.add(bestMatch); >- >- /* >- * Iterate over each binding and compares it with the best match. If a >- * better match is found, then replace the best match and clear the >- * collection. If the current binding is equivalent, then simply add it >- * to the collection of matches. If the current binding is worse, then >- * do nothing. >- */ >- while (bindingItr.hasNext()) { >- final Binding current = (Binding) bindingItr.next(); >- >- /* >- * SCHEME: Test whether the current is in a child scheme. Bindings >- * defined in a child scheme will take priority over bindings >- * defined in a parent scheme -- assuming that consulting their >- * contexts led to a conflict. >- */ >- final String currentSchemeId = current.getSchemeId(); >- final String bestSchemeId = bestMatch.getSchemeId(); >- final int compareTo = compareSchemes(bestSchemeId, currentSchemeId); >- if (compareTo > 0) { >- bestMatch = current; >- matches.clear(); >- matches.add(current); >- } >- if (compareTo != 0) { >- continue; >- } >- >- /* >- * TYPE: Test for type superiority. >- */ >- if (current.getType() > bestMatch.getType()) { >- bestMatch = current; >- matches.clear(); >- matches.add(current); >- continue; >- } else if (bestMatch.getType() > current.getType()) { >- continue; >- } >- >- // The bindings are equivalent. >- matches.add(current); >- } >- >- // Return all of the matches. >- return matches; >- } >- >- /** >- * <p> > * Attempts to resolve the conflicts for the given bindings. > * </p> > * <p>
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 110232
: 64811