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

Bug 362475

Summary: Insert Element Popup: sort candidates that start with the given search term to the top of the list
Product: z_Archived Reporter: Florian Thienel <florian>
Component: MylynAssignee: Holger Voormann <eclipse>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.0.0 M8   
Hardware: All   
OS: All   
Whiteboard:

Description Florian Thienel CLA 2011-10-31 08:05:04 EDT
In the insert element popup (opened when hitting [Ctrl]-[Space]), the candidates that start with the given search term should be sorted to the top of the list.

Example:

(Is)
A search for "para" in DocBook results in the following list: "formalpara, para, simplepara". Hitting [Return] will insert "formalpara", although it is more likely that the user wants to insert a "para" element.

(Should)
The list should be sorted in the following way: "para, formalpara, simplepara". Hitting [Return] will insert "para". If the user wants to insert one of the other candidates, she has to select the desired candidate with the up/down keys or using the mouse.
Comment 1 Florian Thienel CLA 2011-12-04 08:15:25 EST
Implementation hint: the candidates get computed and sorted in org.eclipse.vex.core.internal.widget.VexWidgetImpl.getValidInsertElements()
Comment 2 Florian Thienel CLA 2011-12-09 17:42:46 EST
Works fine.