DESCRIPTION

Bug 383992: Juno: calling getPartialMatches causes a stack overflow

Change getPartialMatches() implementation to correctly package up result
from EBindingService.getPartialMatches() to be compatible with the
legacy API.

Change-Id: I61f0b869b5d10d0a9ae71cf151fcfc3fc28bcbe7

COMMENTS

author: Monserrat Wise
date: 2013-04-04 19:46:07.000000000

Uploaded patch set 4.

-------------------------------------
author: Slade Moran
date: 2013-04-05 12:36:11.000000000

Patch Set 4: I would prefer that you didn't submit this

(2 inline comments)

I think feeding in the map was a mistake and it should have been the triggerSequence.  See comments.

Line:298, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java -> See http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java#n400  It looks like those put(*) should use the binding.getTriggerSequence() instead of prefixTable.

Line:285, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java -> I think this needs to return a map of prefix TriggerSequences to map of Binding TriggerSequences to Bindings. so #( ALT+SHIFT+Q -> #( ALT+SHIFT+Q C -> Console, ALT+SHIFT+Q Q -> Show View, etc) )

-------------------------------------
author: Monserrat Wise
date: 2013-04-05 13:15:16.000000000

Patch Set 4: (1 inline comment)

Paul. Please look at this again. I have tested with 3.8, and getPartialMatches definitely only returns one entry from the prefix table, namely a Map<TriggerSequence,Binding>.

Line:285, bundles/org.eclipse.ui.workLeon Ochoach/Eclipse UI/org/eclipse/ui/internal/keys/BindingService.java -> No, that is incorrect. I have tested with both 3.8 and EBindingService in 4.3. In both cases, a Map<TriggerSequence,Binding> is returned.

The 3.x way was to calculate a prefix table as you describe (essentially a Map<TriggerSequence, Map<TriggerSequence,Binding>>. But getPartialMatches does a get on the prefix table, and returns only a Map<TriggerSequence,Binding>.

-------------------------------------
author: Slade Moran
date: 2013-04-05 14:18:00.000000000

Patch Set 4: Verified; Looks good to me, approved; IP review completed

Ah yes, the original algorithm was wrong and its implementation was broken.

-------------------------------------
author: Slade Moran
date: 2013-04-05 14:18:01.000000000

Change has been successfully merged into the git repository.

-------------------------------------
