Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326916

Summary: CompletionCombo jump to next entry, when character is entered multiple times
Product: [RT] Riena Reporter: Steffen Kriese <steffen.kriese>
Component: UIAssignee: Elias Volanakis <elias>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: christian.campo, elias
Version: unspecified   
Target Milestone: 3.0.0   
Hardware: PC   
OS: All   
Whiteboard:

Description Steffen Kriese CLA 2010-10-04 09:11:42 EDT
When a CompletionCombo is bound to an unordered list and a key is entered mulitple times, the combo should jump to the next entry with the entered character.

Example:
- red 3
- blue
- red 2
- yellow
...

The user enters "r" and red 3 is selected. When the user enters "r" again, the combo should select red 2.
Comment 1 Steffen Kriese CLA 2010-10-04 10:05:47 EDT
Method CompletionCombo.handleAutoCompletion() has been updated to detect, if a character was entered multiple times.
Comment 2 Elias Volanakis CLA 2010-11-22 01:01:53 EST
The commit for this bug (1.15) has broken the CompletionCombo.

To reproduce: 

1. Go to CompletionCombo example in Playground
2. Type 'Dortmund'

You notice that after 'D' is typed Dortmund is selected, after 'o' is typed it becomes deselected. This behavior does not exist prior to this commit (1.14).
Comment 3 Elias Volanakis CLA 2010-11-22 01:06:46 EST
Shooting from the hip, but at first glance I think that the idea used here is wrong. One cannot compare the first character with the new character. Instead it should look at the last character and the new character... I'll experiment a little...
Comment 4 Elias Volanakis CLA 2010-11-22 01:29:53 EST
Resolved.
Comment 5 Elias Volanakis CLA 2011-02-22 16:24:45 EST
Reopening. Requirements have been changed / clarified.
Comment 6 Elias Volanakis CLA 2011-02-28 13:23:59 EST
Here are the specs for AutoCompletionMode.FIRST_LETTER_MATCH:

* The Combo selects the items beginning with the character that was
* just typed (ignoring case). If no match is found the input is
* ignored. When reaching the end of the list of matches, the selection
* wraps around and continues from the beginning.
* <p>
* Examples:
* <ul>
* <li>'a' selects the 1st item beginning with 'a',</li>
* <li>'aa' selects the 2nd item beginning with 'a',</li>
* <li>'aaa' the 3rd item,</li>
* <li>assumming there are only two items beginning with 'a', then 'aaa'
* would wrap and select the 1st item,</li>
* <li>'ad' selects the 1st item beginning with 'd'</li>
* </ul>
		 
Resolved.