.

Spring Code Completion Scenarios

.

Phase 1 - Static completion values

.

Phase 2 - Resource values

.

Phase 3 - Values requiring XAM model

.

Phase 4 - Simple Java completion items

.

Phase 5 - Complex java completion items

.

Phase 6 - Smart Completion items

.

.

S.NoScenarioAvailable valuesAdditional NotesPhaseComments

.

1<beans>/default-lazy-init
<beans>/default-merge
true
false
Phase 1

.

2<beans>/default-dependency-checknone
simple
objects
all
Phase 1

.

3<beans>/default-autowireno
byName
byType
constructor
autodetect
Phase 1

.

4<beans>/<import>/resourceDirectories and names of all beans configuration files in the current project, relative to the file being edited.Phase 2

.

5<beans>/<alias>/nameList of all bean names (and ids) of all beans that are accessible in the current beans context file. This will involve all bean entities as well as alias entity namesPhase 3

.

6<beans>/*/<bean>/classList of all packages as well as classes in the project's classpath.This completion will be similar to the completion in Java files.

<bean id="sampleBean" class="com.sun.foo.bar.FooBean"/>
In this scenario, when the user presses Ctrl+Space the first time, the package names should be offered for completion and then, with press of every "." the sub packages/classes should be offered. The completion in this scenario will be the same that is offered for the import statement code completion in Java files
Phase 5

.

7<beans>/*/<bean>/parentList of all bean names accessible to the current file being edited (bean entities + alias entities)Phase 3

.

8<beans>/*/<bean>/scopeList of predefined scopes (singleton, prototype, request, session, global session) + custom scopesAn example of custom scope being used after registration:

<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="thread">
<bean class="com.foo.ThreadScope"/>
</entry>
</map>
</property>
</bean>
<bean id="bar" class="x.y.Bar" scope="thread">
<property name="name" value="Rick"/>
<aop:scoped-proxy/>
</bean>
Phase 3

.

9<beans>/*/<bean>/abstracttrue
false
Phase 1

.

10<beans>/*/<bean>/lazy-inittrue
false
default
Phase 1

.

11<beans>/*/<bean>/autowiredefault
no
byName
byType
constructor
autodetect
Phase 1

.

12<beans>/*/<bean>/dependency-checkdefault
none
simple
objects
all
Phase 1

.

13<beans>/*/<bean>/depends-onList of all bean names accessible to the current file being edited (bean entities + alias entities)Phase 3

.

14<beans>/*/<bean>/init-method
<beans>/*/<bean>/destroy-method
List of all the non static methods returning a void and accepting no parameters on current class or super classesPhase 4

.

15<beans>/*/<bean>/factory-methodList of all static methods on the bean class (returning the type of the bean class?) if the factory bean has not been defined. If the factory bean has been defined, the method should be found on the class implementing the factory beanPhase 4

.

16<beans>/*/<bean>/factory-beanList of all bean names accessible to the current file being edited (bean entities + alias entities)Phase 3

.

17<beans>/*/<bean>/autowire-candidatetrue
false
Phase 1

.

18<beans>/*/<bean>/<constructor-arg>/typeList of all available types (FQN Completion similar to use case 6)Does this need introspection on the bean's constructor?Phase 5

.

19<beans>/*/<bean>/<constructor-arg>/refList of all bean names accessible to the current file being edited (bean entities + alias entities) filtered by the type of the constructor argumentPhase 4

.

20<beans>/*/<ref>/beanList of all bean names accessible to the current file being edited (bean entities + alias entities)Filtered by type of enclosing <property> or <constructor-arg>Phase 4

.

21<beans>/*/<ref>/localList of all bean names accessible in the current file being edited (bean entities + alias entities)Filtered by type of enclosing <property> or <constructor-arg>Phase 4

.

22<beans>/*/<idref>/beanList of all bean names accessible to the current file being edited (bean entities + alias entities)Filtered by type of enclosing <property> or <constructor-arg>Phase 4

.

23<beans>/*/<idref>/localList of all bean names accessible in the current file being edited (bean entities + alias entities)Filtered by type of enclosing <property> or <constructor-arg>Phase 4

.

24<beans>/*/<value>/typeList of all available types (FQN Completion similar to use case 6)Filtered by type of enclosing <property> or <constructor-arg>Phase 5

.

25<beans>/*/<list>/merge
<beans>/*/<set>/merge
<beans>/*/<map>/merge
<beans>/*/<props>/merge
default
true
false
Phase 1

.

26<beans>/*/<list>/value-type
<beans>/*/<set>/value-type
<beans>/*/<map>/value-type
<beans>/*/<map>/key-type
List of all available types (FQN Completion similar to use case 6)Does this need introspection on the bean's class?Phase 5

.

27<beans>/*/<map>/<entry>/key-ref
<beans>/*/<map>/<entry>/value-ref
List of all bean names accessible to the current file being edited (bean entities + alias entities)Phase 3

.

28<beans>/*/<bean>/<property>/refList of all bean names accessible to the current file being edited (bean entities + alias entities)Filtered by type of property in the bean's classPhase 4

.

29<beans>/*/<bean>/<property>/nameList of all properties defined in the class or it's super classesPhase 3

.

30<beans>/*/<bean>/<lookup-method>/nameList of all methods in the bean class (non static)Phase 3

.

31<beans>/*/<bean>/<lookup-method>/beanList of all bean names accessible to the current file being edited (bean entities + alias entities)Filtered by return type of the lookup methodPhase 4

.

32<beans>/*/<bean>/<replaced-method>/nameList of all methods in the bean class (non static)Phase 3

.

33<beans>/*/<bean>/<replaced-method>/<arg-type>/matchList of all available types (FQN Completion similar to use case 6)Phase 5

.

34<beans>/*/<bean>Smart completion Item: Add Spring bean definitionShows a dialog for the user to enter properties for the generated beanPhase 6

.

35<beans>/*/<bean>/<constructor-arg>Smart completion Item: Add constructor argIntrospects the bean class and generates a <constructor-arg> for every constructor argumentPhase 6

.

36<beans>/*/<bean>/<property>Smart completion Item: Add propertyGenerates a <property> tagPhase 6