SpringXMLClassPathCompletionUI
Spring XML Configuration file class path completion - UI Specification
This page describes the UI flow for class path code completion in a Spring XML Configuration file.
Every bean in a Spring beans configuration file references a Java class and its members. The class attribute of the <bean> element holds the fully qualified name of the class which implements the bean. Following scenarios describe what will be shown to the user when code completion is invoked for the class attribute of a <bean> element.
Scenario 1
In this case, the user has not typed any letter in the attribute value and has requested code completion. Only the top level visible packages will be shown to the user, and the code completion will proceed similar to the code completion for fully qualified names in the Java Editor. Screenshots of such a scenario are shown below:
File:SpringXMLClassPathCompletionUI/scenario1 SpringXMLClassPathCompletionUI.png
File:SpringXMLClassPathCompletionUI/cc scenario3 SpringXMLClassPathCompletionUI.png
Scenario 2
In this case, the user types in some letters in the attribute value and invokes code completion (using CTRL+SPACE). The letters typed in by the user are used to calculate the completion items, the letters being treated as the case insensitive prefix with which a Java class' simple name should begin. When the user selects one of the presented completion items, the fully qualified name of the item is inserted in the attribute value.
For effeciency, such a completion is a two step process. Most of the times, a user will need only classes defined locally in the project (source classpath). Hence the first CTRL+SPACE will list only the items in the source classpath, as shown below:
File:SpringXMLClassPathCompletionUI/cc step1 SpringXMLClassPathCompletionUI.png
If the user wishes to add an item not in the source classpath, he can press CTRL+SPACE again. Also, if the typed prefix does not match any local item, the completion will automatically switch to show all items instead of just local items.
File:SpringXMLClassPathCompletionUI/cc step2 SpringXMLClassPathCompletionUI.png

