Fixed completion in for and let blocks.
Change-Id: Ic7990ebecaea39abbbb71fde90f47893db591ea0
diff --git a/plugins/org.eclipse.acceleo.aql/src/org/eclipse/acceleo/aql/completion/AcceleoAstCompletor.java b/plugins/org.eclipse.acceleo.aql/src/org/eclipse/acceleo/aql/completion/AcceleoAstCompletor.java
index ab3a342..8786632 100644
--- a/plugins/org.eclipse.acceleo.aql/src/org/eclipse/acceleo/aql/completion/AcceleoAstCompletor.java
+++ b/plugins/org.eclipse.acceleo.aql/src/org/eclipse/acceleo/aql/completion/AcceleoAstCompletor.java
@@ -544,8 +544,8 @@
}
} else if (currentScope instanceof LetStatement) {
final LetStatement let = (LetStatement)currentScope;
- for (Variable variable : let.getVariables()) {
- res.put(variable.getName(), getPossibleTypes(variable));
+ for (Binding binding : let.getVariables()) {
+ res.put(binding.getName(), getPossibleTypes(binding));
}
} else if (currentScope instanceof ForStatement) {
final ForStatement forStatement = (ForStatement)currentScope;
@@ -595,9 +595,7 @@
final IValidationResult validationResult = acceleoValidationResult.getValidationResult(binding
.getInitExpression().getAst());
res = new LinkedHashSet<IType>();
- if (binding.getType() != null) {
- res.addAll(validationResult.getPossibleTypes(binding.getInitExpression().getAst().getAst()));
- }
+ res.addAll(validationResult.getPossibleTypes(binding.getInitExpression().getAst().getAst()));
} else {
res = getPossibleTypes((Variable)binding);
}
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/completion.mtl b/tests/org.eclipse.acceleo.aql.tests/resources/completion/completion.mtl
index 1761e0a..673027b 100644
--- a/tests/org.eclipse.acceleo.aql.tests/resources/completion/completion.mtl
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/completion.mtl
@@ -31,6 +31,7 @@
[/for]
[for (myVariable | myParam.eClassifiers) <<forStatementSeparator>>separator(<<forStatementSeparatorExpression>>myVariable.name<<forStatementSeparatorCloseParenthesis>>)<<forStatementAfterSeparator>>]
<<statementInForStatement>>
+ [<<nestedQueryStatementExpressionInFor>>myVariable.<<nestedQueryStatementExpressionInForAfterDot>>name + '.txt'<<nestedQueryStatementExpressionInForEnd>> <<nestedQueryStatementExpressionInForEndAfterSpace>>/]
some static text.
[/for]
[if <<ifStatementOpenParenthesis>>(<<ifStatementExpression>>myParam.<<ifStatementExpressionAfterDot>>eClassifiers->size() = 0<<ifStatementCloseParenthesis>> <<ifStatementCloseParenthesisAfterSpace>>)<<ifStatementEndHeader>>]
@@ -45,6 +46,7 @@
[/if]
[let <<letStatementBindingName>>myVariable <<letStatementBindingColon>>: <<letStatementBindingType>>ecore::EClassifier <<letStatementBindingEqual>>= <<letStatementBindingExpression>>myParam.<<letStatementBindingExpressionAfterDot>>eClassifiers->first()<<letStatementEndHeader>> <<letStatementEndHeaderAfterSpace>>]
<<statementInLetStatement>>
+ [<<nestedQueryStatementExpressionInLet>>myVariable.<<nestedQueryStatementExpressionInLetAfterDot>>name + '.txt'<<nestedQueryStatementExpressionInLetEnd>> <<nestedQueryStatementExpressionInLetEndAfterSpace>>/]
some static text.
[/let]
[protected <<protectedAreaOpenParenthesis>>(<<protectedAreaExpression>>myParam.name<<protectedAreaCloseParenthesis>> <<protectedAreaCloseParenthesisAfterSpace>>)<<protectedAreaEndHeader>>]
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInFor-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInFor-expected-completion.txt
new file mode 100644
index 0000000..8fb0dad
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInFor-expected-completion.txt
@@ -0,0 +1,594 @@
+* Label:
+myParam
+* Description:
+Variable myParam
+* Text:
+myParam
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+myVariable
+* Description:
+Variable myVariable
+* Text:
+myVariable
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EAnnotation
+* Description:
+EClass named EAnnotation in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EAnnotation
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EAttribute
+* Description:
+EClass named EAttribute in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EAttribute
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBigDecimal
+* Description:
+EDataType named EBigDecimal in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBigDecimal
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBigInteger
+* Description:
+EDataType named EBigInteger in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBigInteger
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBoolean
+* Description:
+EDataType named EBoolean in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBoolean
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBooleanObject
+* Description:
+EDataType named EBooleanObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBooleanObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EByte
+* Description:
+EDataType named EByte in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EByte
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EByteArray
+* Description:
+EDataType named EByteArray in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EByteArray
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EByteObject
+* Description:
+EDataType named EByteObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EByteObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EChar
+* Description:
+EDataType named EChar in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EChar
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ECharacterObject
+* Description:
+EDataType named ECharacterObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ECharacterObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EClass
+* Description:
+EClass named EClass in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EClass
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EClassifier
+* Description:
+EClass named EClassifier in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EClassifier
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDataType
+* Description:
+EClass named EDataType in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDataType
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDate
+* Description:
+EDataType named EDate in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDate
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDiagnosticChain
+* Description:
+EDataType named EDiagnosticChain in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDiagnosticChain
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDouble
+* Description:
+EDataType named EDouble in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDouble
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDoubleObject
+* Description:
+EDataType named EDoubleObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDoubleObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEList
+* Description:
+EDataType named EEList in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEList
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEnum
+* Description:
+EClass named EEnum in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEnum
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEnumLiteral
+* Description:
+EClass named EEnumLiteral in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEnumLiteral
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEnumerator
+* Description:
+EDataType named EEnumerator in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEnumerator
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFactory
+* Description:
+EClass named EFactory in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFactory
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFeatureMap
+* Description:
+EDataType named EFeatureMap in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFeatureMap
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFeatureMapEntry
+* Description:
+EDataType named EFeatureMapEntry in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFeatureMapEntry
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFloat
+* Description:
+EDataType named EFloat in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFloat
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFloatObject
+* Description:
+EDataType named EFloatObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFloatObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EGenericType
+* Description:
+EClass named EGenericType in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EGenericType
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EInt
+* Description:
+EDataType named EInt in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EInt
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EIntegerObject
+* Description:
+EDataType named EIntegerObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EIntegerObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EInvocationTargetException
+* Description:
+EDataType named EInvocationTargetException in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EInvocationTargetException
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EJavaClass
+* Description:
+EDataType named EJavaClass in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EJavaClass
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EJavaObject
+* Description:
+EDataType named EJavaObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EJavaObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ELong
+* Description:
+EDataType named ELong in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ELong
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ELongObject
+* Description:
+EDataType named ELongObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ELongObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EMap
+* Description:
+EDataType named EMap in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EMap
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EModelElement
+* Description:
+EClass named EModelElement in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EModelElement
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ENamedElement
+* Description:
+EClass named ENamedElement in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ENamedElement
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EObject
+* Description:
+EClass named EObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EOperation
+* Description:
+EClass named EOperation in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EOperation
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EPackage
+* Description:
+EClass named EPackage in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EPackage
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EParameter
+* Description:
+EClass named EParameter in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EParameter
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EReference
+* Description:
+EClass named EReference in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EReference
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EResource
+* Description:
+EDataType named EResource in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EResource
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EResourceSet
+* Description:
+EDataType named EResourceSet in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EResourceSet
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EShort
+* Description:
+EDataType named EShort in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EShort
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EShortObject
+* Description:
+EDataType named EShortObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EShortObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EString
+* Description:
+EDataType named EString in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EString
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EStringToStringMapEntry
+* Description:
+EClass named EStringToStringMapEntry in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EStringToStringMapEntry
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EStructuralFeature
+* Description:
+EClass named EStructuralFeature in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EStructuralFeature
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ETreeIterator
+* Description:
+EDataType named ETreeIterator in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ETreeIterator
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ETypeParameter
+* Description:
+EClass named ETypeParameter in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ETypeParameter
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ETypedElement
+* Description:
+EClass named ETypedElement in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ETypedElement
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+()
+* Description:
+()
+* Text:
+()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+-
+* Description:
+-
+* Text:
+-
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+OrderedSet{}
+* Description:
+OrderedSet{}
+* Text:
+OrderedSet{}
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+Sequence{}
+* Description:
+Sequence{}
+* Text:
+Sequence{}
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+false
+* Description:
+false
+* Text:
+false
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+if
+* Description:
+if
+* Text:
+if
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+let
+* Description:
+let
+* Text:
+let
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+not
+* Description:
+not
+* Text:
+not
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+null
+* Description:
+null
+* Text:
+null
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+true
+* Description:
+true
+* Text:
+true
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+{}
+* Description:
+{}
+* Text:
+{}
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForAfterDot-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForAfterDot-expected-completion.txt
new file mode 100644
index 0000000..d2212e5
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForAfterDot-expected-completion.txt
@@ -0,0 +1,441 @@
+* Label:
+defaultValue
+* Description:
+EAttribute named defaultValue in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+defaultValue
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAnnotations
+* Description:
+EReference named eAnnotations in EModelElement(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+eAnnotations
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ePackage
+* Description:
+EReference named ePackage in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ePackage
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eTypeParameters
+* Description:
+EReference named eTypeParameters in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+eTypeParameters
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+instanceClass
+* Description:
+EAttribute named instanceClass in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+instanceClass
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+instanceClassName
+* Description:
+EAttribute named instanceClassName in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+instanceClassName
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+instanceTypeName
+* Description:
+EAttribute named instanceTypeName in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+instanceTypeName
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+name
+* Description:
+EAttribute named name in ENamedElement(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+name
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ancestors()
+* Description:
+ancestors(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's ancestors.<br><br> @param self<br> The EObject we seek the ancestors of<br><br> @return<br> Sequence containing the full set of the receiver's ancestors<br><br>
+* Text:
+ancestors()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ancestors()
+* Description:
+ancestors(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's ancestors of any given types.<br><br> @param self<br> The EObject we seek the ancestors of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's ancestors of any given types<br><br>
+* Text:
+ancestors()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ancestors()
+* Description:
+ancestors(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's ancestors of the given type.<br><br> @param self<br> The EObject we seek the ancestors of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's ancestors of the given type<br><br>
+* Text:
+ancestors()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAllContents()
+* Description:
+eAllContents(eObject: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a sequence of the EObjects recursively contained in the specified root eObject.<br><br> @param eObject<br> The root of the content tree<br><br> @return<br> The recursive content of the specified eObject.<br><br>
+* Text:
+eAllContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAllContents()
+* Description:
+eAllContents(eObject: org.eclipse.emf.ecore.EObject, types: java.util.Set) = List<br><br>Returns a sequence of the EObjects recursively contained in the specified root eObject and that are instances of the specified EClass<br><br> @param eObject<br> The root of the content tree<br> @param types<br> The set of types used to select elements<br><br> @return<br> The recursive content of the specified eObject.<br><br>
+* Text:
+eAllContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAllContents()
+* Description:
+eAllContents(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a sequence of the EObjects recursively contained in the specified root eObject and that are instances of the specified EClass<br><br> @param eObject<br> The root of the content tree<br> @param type<br> The type used to select elements<br><br> @return<br> The recursive content of the specified eObject.<br><br>
+* Text:
+eAllContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eClass()
+* Description:
+eClass(eObject: org.eclipse.emf.ecore.EObject) = EClass<br><br>Returns the EClass of the specified EObject<br><br> @param eObject<br> The eObject which EClass is requested.<br><br> @return<br> The EClass of the specified EObject<br><br>
+* Text:
+eClass()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainer()
+* Description:
+eContainer(eObject: org.eclipse.emf.ecore.EObject) = EObject<br><br>Returns the container of the specified EObject<br><br> @param eObject<br> The eObject which container is requested.<br><br> @return<br> The container of the specified eObject.<br><br>
+* Text:
+eContainer()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainer()
+* Description:
+eContainer(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = EObject<br><br>Returns the first container of the specified EObject that matches the given type<br><br> @param eObject<br> The eObject which container is requested.<br> @param type<br> The type filter.<br><br> @return<br> The first container of the specified eObject that matches the given type.<br><br>
+* Text:
+eContainer()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainerOrSelf()
+* Description:
+eContainerOrSelf(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = EObject<br><br>Returns self or the first container of the specified EObject that matches the given type<br><br> @param eObject<br> The eObject which container is requested.<br> @param type<br> The type filter.<br><br> @return<br> Self or the first container of the specified eObject that matches the given type.<br><br>
+* Text:
+eContainerOrSelf()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainingFeature()
+* Description:
+eContainingFeature(eObject: org.eclipse.emf.ecore.EObject) = EStructuralFeature<br><br>Returns the containing feature of the specified EObject<br><br> @param eObject<br> The eObject which containing feature is requested.<br><br> @return<br> The containing feature of the specified EObject<br><br>
+* Text:
+eContainingFeature()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainmentFeature()
+* Description:
+eContainmentFeature(eObject: org.eclipse.emf.ecore.EObject) = EReference<br><br>Returns the containment feature of the specified EObject<br><br> @param eObject<br> The eObject which containment feature is requested.<br><br> @return<br> The containment feature of the specified EObject<br><br>
+* Text:
+eContainmentFeature()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContents()
+* Description:
+eContents(eObject: org.eclipse.emf.ecore.EObject) = List<br><br>Returns the contents of the specified EObject instance.<br><br> @param eObject<br> The eObject which content is requested.<br><br> @return<br> The content of the specified eObject.<br><br>
+* Text:
+eContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContents()
+* Description:
+eContents(eObject: org.eclipse.emf.ecore.EObject, types: java.util.Set) = List<br><br>Returns a sequence made of the instances of the specified types in the contents of the specified eObject.<br><br> @param eObject<br> The eObject which content is requested.<br> @param types<br> The Set of types filter.<br><br> @return<br> The filtered content of the specified eObject.<br><br>
+* Text:
+eContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContents()
+* Description:
+eContents(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a sequence made of the instances of the specified type in the contents of the specified eObject.<br><br> @param eObject<br> The eObject which content is requested.<br> @param type<br> The type filter.<br><br> @return<br> The filtered content of the specified eObject.<br><br>
+* Text:
+eContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eCrossReferences()
+* Description:
+eCrossReferences(eObject: org.eclipse.emf.ecore.EObject) = Object<br><br>Returns the list of all EObjects cross-referenced from the receiver.<br><br> @param eObject<br> The eObject of which we need the cross-references.<br><br> @return<br> The list of all EObjects cross-referenced from the receiver.<br><br>
+* Text:
+eCrossReferences()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eGet()
+* Description:
+eGet(eObject: org.eclipse.emf.ecore.EObject, featureName: java.lang.String) = Object<br><br>Handles calls to the operation "eGet". This will fetch the value of the feature named "featureName" on "source"<br><br> @param eObject<br> The eObject we seek to retrieve a feature value of.<br> @param featureName<br> The name of the feature which value we need to retrieve.<br><br> @return<br> The value of the given feature on the given EObject<br><br>
+* Text:
+eGet()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eGet()
+* Description:
+eGet(eObject: org.eclipse.emf.ecore.EObject, feature: org.eclipse.emf.ecore.EStructuralFeature) = Object<br><br>Handles calls to the operation "eGet". This will fetch the value of the given feature on "source"<br><br> @param eObject<br> The eObject we seek to retrieve a feature value of.<br> @param feature<br> The feature which value we need to retrieve.<br><br> @return<br> The value of the given feature on the given EObject<br><br>
+* Text:
+eGet()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eGet()
+* Description:
+eGet(eObject: org.eclipse.emf.ecore.EObject, feature: org.eclipse.emf.ecore.EStructuralFeature, resolve: boolean) = Object<br><br>Handles calls to the operation "eGet". This will fetch the value of the given feature on "source"; the value is optionally resolved before it is returned.<br><br> @param eObject<br> The eObject we seek to retrieve a feature value of.<br> @param feature<br> The feature which value we need to retrieve.<br> @param resolve<br> whether to resolve the value or not.<br><br> @return<br> The value of the given feature on the given EObject<br><br>
+* Text:
+eGet()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eInverse()
+* Description:
+eInverse(eObject: org.eclipse.emf.ecore.EObject) = Set<br><br>Returns the set containing the inverse references.<br><br> @param eObject<br> The eObject which inverse references are requested.<br><br> @return<br> The set of the inverse references<br><br>
+* Text:
+eInverse()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eInverse()
+* Description:
+eInverse(eObject: org.eclipse.emf.ecore.EObject, featureName: java.lang.String) = Set<br><br>Returns the elements from the set of the inverse references of the receiver that are referencing the receiver using a feature with the given name.<br><br> @param eObject<br> The eObject which inverse references are requested.<br> @param featureName<br> The feature name.<br><br> @return<br> The set of the inverse references<br><br>
+* Text:
+eInverse()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eInverse()
+* Description:
+eInverse(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClassifier) = Set<br><br>Returns the elements of the given type from the set of the inverse references of the receiver.<br><br> @param eObject<br> The eObject which inverse references are requested.<br> @param type<br> The type filter.<br><br> @return<br> The set of the inverse references<br><br>
+* Text:
+eInverse()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eResource()
+* Description:
+eResource(eObject: org.eclipse.emf.ecore.EObject) = Resource<br><br>Returns the Resource containing the given EObject. This service is equivalent to a direct call to EObject#eResource().<br><br> @param eObject<br> The EObject<br><br> @return<br> The Resource containing the given EObject.<br><br>
+* Text:
+eResource()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+followingSiblings()
+* Description:
+followingSiblings(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's following siblings.<br><br> @param self<br> The EObject we seek the following siblings of<br><br> @return<br> Sequence containing the full set of the receiver's following siblings<br><br>
+* Text:
+followingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+followingSiblings()
+* Description:
+followingSiblings(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's following siblings of any given types.<br><br> @param self<br> The EObject we seek the following siblings of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's following siblings of any given types<br><br>
+* Text:
+followingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+followingSiblings()
+* Description:
+followingSiblings(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's following siblings of the given type.<br><br> @param self<br> The EObject we seek the following siblings of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's following siblings of the given type<br><br>
+* Text:
+followingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+getClassifierID()
+* Description:
+EOperation named getClassifierID in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+getClassifierID()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+getEAnnotation()
+* Description:
+EOperation named getEAnnotation in EModelElement(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+getEAnnotation()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+isInstance()
+* Description:
+EOperation named isInstance in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+isInstance()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+lineSeparator()
+* Description:
+lineSeparator(obj: java.lang.Object) = String<br><br>Gets the platform line separator.<br><br> @param obj<br> Any object<br><br> @return<br> '\n' (Unix) or '\r\n' (Dos) or '\r' (Mac Os Classic)<br><br>
+* Text:
+lineSeparator()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+oclAsType()
+* Description:
+oclAsType(object: java.lang.Object, type: java.lang.Object) = Object<br><br>Casts the current object to the given type.<br><br> @param object<br> The object to cast<br> @param type<br> The type to cast the object to<br><br> @return<br> The current object cast to a "type"<br><br>
+* Text:
+oclAsType()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+oclIsKindOf()
+* Description:
+oclIsKindOf(object: java.lang.Object, type: java.lang.Object) = Boolean<br><br>Evaluates to "true" if the type of the object o1 conforms to the type "classifier". That is, o1 is of type "classifier" or a subtype of "classifier".<br><br> @param object<br> The reference Object we seek to test.<br> @param type<br> The expected supertype classifier.<br><br> @return<br> "true" if the object o1 is a kind of the classifier, "false" otherwise.<br><br>
+* Text:
+oclIsKindOf()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+oclIsTypeOf()
+* Description:
+oclIsTypeOf(object: java.lang.Object, type: java.lang.Object) = Boolean<br><br>Evaluates to "true" if the object o1 if of the type "classifier" but not a subtype of the "classifier".<br><br> @param object<br> The reference Object we seek to test.<br> @param type<br> The expected type classifier.<br><br> @return<br> "true" if the object o1 is a type of the classifier, "false" otherwise.<br><br>
+* Text:
+oclIsTypeOf()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+precedingSiblings()
+* Description:
+precedingSiblings(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's preceding siblings.<br><br> @param self<br> The EObject we seek the preceding siblings of<br><br> @return<br> Sequence containing the full set of the receiver's preceding siblings<br><br>
+* Text:
+precedingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+precedingSiblings()
+* Description:
+precedingSiblings(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's preceding siblings of any given types.<br><br> @param self<br> The EObject we seek the preceding siblings of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's preceding siblings of any given types<br><br>
+* Text:
+precedingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+precedingSiblings()
+* Description:
+precedingSiblings(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's preceding siblings of the given type.<br><br> @param self<br> The EObject we seek the preceding siblings of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's preceding siblings of the given type<br><br>
+* Text:
+precedingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+siblings()
+* Description:
+siblings(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's siblings.<br><br> @param self<br> The EObject we seek the siblings of<br><br> @return<br> Sequence containing the full set of the receiver's siblings<br><br>
+* Text:
+siblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+siblings()
+* Description:
+siblings(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's siblings of any given types.<br><br> @param self<br> The EObject we seek the siblings of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's siblings of any given types<br><br>
+* Text:
+siblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+siblings()
+* Description:
+siblings(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's siblings of the given type.<br><br> @param self<br> The EObject we seek the siblings of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's siblings of the given type<br><br>
+* Text:
+siblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+toString()
+* Description:
+toString(self: java.lang.Object) = String<br><br>Returns a string representation of the current object.<br><br> @param self<br> The current object<br><br> @return<br> a String representation of the given Object. For Collections, this will be the concatenation of all contained Objects' toString.<br><br>
+* Text:
+toString()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+trace()
+* Description:
+trace(self: java.lang.Object) = String<br><br>Returns a string representation of the current environment.<br><br> @param self<br> The current object<br><br> @return<br> a string representation of the current environment.<br><br>
+* Text:
+trace()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForEnd-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForEnd-expected-completion.txt
new file mode 100644
index 0000000..596760c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForEnd-expected-completion.txt
@@ -0,0 +1,72 @@
+* Label:
++
+* Description:
++
+* Text:
++
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<
+* Description:
+<
+* Text:
+<
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<=
+* Description:
+<=
+* Text:
+<=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<>
+* Description:
+<>
+* Text:
+<>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+=
+* Description:
+=
+* Text:
+=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>
+* Description:
+>
+* Text:
+>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>=
+* Description:
+>=
+* Text:
+>=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+/]
+* Description:
+Inserts the end of an Expression Statement:<br/><pre>/]</pre>
+* Text:
+/]
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//ExpressionStatement
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForEndAfterSpace-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForEndAfterSpace-expected-completion.txt
new file mode 100644
index 0000000..596760c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInForEndAfterSpace-expected-completion.txt
@@ -0,0 +1,72 @@
+* Label:
++
+* Description:
++
+* Text:
++
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<
+* Description:
+<
+* Text:
+<
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<=
+* Description:
+<=
+* Text:
+<=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<>
+* Description:
+<>
+* Text:
+<>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+=
+* Description:
+=
+* Text:
+=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>
+* Description:
+>
+* Text:
+>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>=
+* Description:
+>=
+* Text:
+>=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+/]
+* Description:
+Inserts the end of an Expression Statement:<br/><pre>/]</pre>
+* Text:
+/]
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//ExpressionStatement
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLet-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLet-expected-completion.txt
new file mode 100644
index 0000000..8fb0dad
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLet-expected-completion.txt
@@ -0,0 +1,594 @@
+* Label:
+myParam
+* Description:
+Variable myParam
+* Text:
+myParam
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+myVariable
+* Description:
+Variable myVariable
+* Text:
+myVariable
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EAnnotation
+* Description:
+EClass named EAnnotation in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EAnnotation
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EAttribute
+* Description:
+EClass named EAttribute in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EAttribute
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBigDecimal
+* Description:
+EDataType named EBigDecimal in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBigDecimal
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBigInteger
+* Description:
+EDataType named EBigInteger in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBigInteger
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBoolean
+* Description:
+EDataType named EBoolean in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBoolean
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EBooleanObject
+* Description:
+EDataType named EBooleanObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EBooleanObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EByte
+* Description:
+EDataType named EByte in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EByte
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EByteArray
+* Description:
+EDataType named EByteArray in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EByteArray
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EByteObject
+* Description:
+EDataType named EByteObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EByteObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EChar
+* Description:
+EDataType named EChar in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EChar
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ECharacterObject
+* Description:
+EDataType named ECharacterObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ECharacterObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EClass
+* Description:
+EClass named EClass in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EClass
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EClassifier
+* Description:
+EClass named EClassifier in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EClassifier
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDataType
+* Description:
+EClass named EDataType in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDataType
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDate
+* Description:
+EDataType named EDate in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDate
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDiagnosticChain
+* Description:
+EDataType named EDiagnosticChain in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDiagnosticChain
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDouble
+* Description:
+EDataType named EDouble in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDouble
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EDoubleObject
+* Description:
+EDataType named EDoubleObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EDoubleObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEList
+* Description:
+EDataType named EEList in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEList
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEnum
+* Description:
+EClass named EEnum in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEnum
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEnumLiteral
+* Description:
+EClass named EEnumLiteral in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEnumLiteral
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EEnumerator
+* Description:
+EDataType named EEnumerator in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EEnumerator
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFactory
+* Description:
+EClass named EFactory in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFactory
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFeatureMap
+* Description:
+EDataType named EFeatureMap in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFeatureMap
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFeatureMapEntry
+* Description:
+EDataType named EFeatureMapEntry in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFeatureMapEntry
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFloat
+* Description:
+EDataType named EFloat in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFloat
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EFloatObject
+* Description:
+EDataType named EFloatObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EFloatObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EGenericType
+* Description:
+EClass named EGenericType in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EGenericType
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EInt
+* Description:
+EDataType named EInt in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EInt
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EIntegerObject
+* Description:
+EDataType named EIntegerObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EIntegerObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EInvocationTargetException
+* Description:
+EDataType named EInvocationTargetException in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EInvocationTargetException
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EJavaClass
+* Description:
+EDataType named EJavaClass in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EJavaClass
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EJavaObject
+* Description:
+EDataType named EJavaObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EJavaObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ELong
+* Description:
+EDataType named ELong in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ELong
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ELongObject
+* Description:
+EDataType named ELongObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ELongObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EMap
+* Description:
+EDataType named EMap in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EMap
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EModelElement
+* Description:
+EClass named EModelElement in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EModelElement
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ENamedElement
+* Description:
+EClass named ENamedElement in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ENamedElement
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EObject
+* Description:
+EClass named EObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EOperation
+* Description:
+EClass named EOperation in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EOperation
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EPackage
+* Description:
+EClass named EPackage in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EPackage
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EParameter
+* Description:
+EClass named EParameter in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EParameter
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EReference
+* Description:
+EClass named EReference in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EReference
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EResource
+* Description:
+EDataType named EResource in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EResource
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EResourceSet
+* Description:
+EDataType named EResourceSet in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EResourceSet
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EShort
+* Description:
+EDataType named EShort in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EShort
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EShortObject
+* Description:
+EDataType named EShortObject in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EShortObject
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EString
+* Description:
+EDataType named EString in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EString
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EStringToStringMapEntry
+* Description:
+EClass named EStringToStringMapEntry in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EStringToStringMapEntry
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::EStructuralFeature
+* Description:
+EClass named EStructuralFeature in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::EStructuralFeature
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ETreeIterator
+* Description:
+EDataType named ETreeIterator in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ETreeIterator
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ETypeParameter
+* Description:
+EClass named ETypeParameter in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ETypeParameter
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ecore::ETypedElement
+* Description:
+EClass named ETypedElement in ecore(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ecore::ETypedElement
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+()
+* Description:
+()
+* Text:
+()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+-
+* Description:
+-
+* Text:
+-
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+OrderedSet{}
+* Description:
+OrderedSet{}
+* Text:
+OrderedSet{}
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+Sequence{}
+* Description:
+Sequence{}
+* Text:
+Sequence{}
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+false
+* Description:
+false
+* Text:
+false
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+if
+* Description:
+if
+* Text:
+if
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+let
+* Description:
+let
+* Text:
+let
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+not
+* Description:
+not
+* Text:
+not
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+null
+* Description:
+null
+* Text:
+null
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+true
+* Description:
+true
+* Text:
+true
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+{}
+* Description:
+{}
+* Text:
+{}
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetAfterDot-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetAfterDot-expected-completion.txt
new file mode 100644
index 0000000..d2212e5
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetAfterDot-expected-completion.txt
@@ -0,0 +1,441 @@
+* Label:
+defaultValue
+* Description:
+EAttribute named defaultValue in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+defaultValue
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAnnotations
+* Description:
+EReference named eAnnotations in EModelElement(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+eAnnotations
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ePackage
+* Description:
+EReference named ePackage in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+ePackage
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eTypeParameters
+* Description:
+EReference named eTypeParameters in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+eTypeParameters
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+instanceClass
+* Description:
+EAttribute named instanceClass in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+instanceClass
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+instanceClassName
+* Description:
+EAttribute named instanceClassName in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+instanceClassName
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+instanceTypeName
+* Description:
+EAttribute named instanceTypeName in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+instanceTypeName
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+name
+* Description:
+EAttribute named name in ENamedElement(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+name
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ancestors()
+* Description:
+ancestors(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's ancestors.<br><br> @param self<br> The EObject we seek the ancestors of<br><br> @return<br> Sequence containing the full set of the receiver's ancestors<br><br>
+* Text:
+ancestors()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ancestors()
+* Description:
+ancestors(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's ancestors of any given types.<br><br> @param self<br> The EObject we seek the ancestors of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's ancestors of any given types<br><br>
+* Text:
+ancestors()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+ancestors()
+* Description:
+ancestors(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's ancestors of the given type.<br><br> @param self<br> The EObject we seek the ancestors of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's ancestors of the given type<br><br>
+* Text:
+ancestors()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAllContents()
+* Description:
+eAllContents(eObject: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a sequence of the EObjects recursively contained in the specified root eObject.<br><br> @param eObject<br> The root of the content tree<br><br> @return<br> The recursive content of the specified eObject.<br><br>
+* Text:
+eAllContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAllContents()
+* Description:
+eAllContents(eObject: org.eclipse.emf.ecore.EObject, types: java.util.Set) = List<br><br>Returns a sequence of the EObjects recursively contained in the specified root eObject and that are instances of the specified EClass<br><br> @param eObject<br> The root of the content tree<br> @param types<br> The set of types used to select elements<br><br> @return<br> The recursive content of the specified eObject.<br><br>
+* Text:
+eAllContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eAllContents()
+* Description:
+eAllContents(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a sequence of the EObjects recursively contained in the specified root eObject and that are instances of the specified EClass<br><br> @param eObject<br> The root of the content tree<br> @param type<br> The type used to select elements<br><br> @return<br> The recursive content of the specified eObject.<br><br>
+* Text:
+eAllContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eClass()
+* Description:
+eClass(eObject: org.eclipse.emf.ecore.EObject) = EClass<br><br>Returns the EClass of the specified EObject<br><br> @param eObject<br> The eObject which EClass is requested.<br><br> @return<br> The EClass of the specified EObject<br><br>
+* Text:
+eClass()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainer()
+* Description:
+eContainer(eObject: org.eclipse.emf.ecore.EObject) = EObject<br><br>Returns the container of the specified EObject<br><br> @param eObject<br> The eObject which container is requested.<br><br> @return<br> The container of the specified eObject.<br><br>
+* Text:
+eContainer()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainer()
+* Description:
+eContainer(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = EObject<br><br>Returns the first container of the specified EObject that matches the given type<br><br> @param eObject<br> The eObject which container is requested.<br> @param type<br> The type filter.<br><br> @return<br> The first container of the specified eObject that matches the given type.<br><br>
+* Text:
+eContainer()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainerOrSelf()
+* Description:
+eContainerOrSelf(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = EObject<br><br>Returns self or the first container of the specified EObject that matches the given type<br><br> @param eObject<br> The eObject which container is requested.<br> @param type<br> The type filter.<br><br> @return<br> Self or the first container of the specified eObject that matches the given type.<br><br>
+* Text:
+eContainerOrSelf()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainingFeature()
+* Description:
+eContainingFeature(eObject: org.eclipse.emf.ecore.EObject) = EStructuralFeature<br><br>Returns the containing feature of the specified EObject<br><br> @param eObject<br> The eObject which containing feature is requested.<br><br> @return<br> The containing feature of the specified EObject<br><br>
+* Text:
+eContainingFeature()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContainmentFeature()
+* Description:
+eContainmentFeature(eObject: org.eclipse.emf.ecore.EObject) = EReference<br><br>Returns the containment feature of the specified EObject<br><br> @param eObject<br> The eObject which containment feature is requested.<br><br> @return<br> The containment feature of the specified EObject<br><br>
+* Text:
+eContainmentFeature()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContents()
+* Description:
+eContents(eObject: org.eclipse.emf.ecore.EObject) = List<br><br>Returns the contents of the specified EObject instance.<br><br> @param eObject<br> The eObject which content is requested.<br><br> @return<br> The content of the specified eObject.<br><br>
+* Text:
+eContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContents()
+* Description:
+eContents(eObject: org.eclipse.emf.ecore.EObject, types: java.util.Set) = List<br><br>Returns a sequence made of the instances of the specified types in the contents of the specified eObject.<br><br> @param eObject<br> The eObject which content is requested.<br> @param types<br> The Set of types filter.<br><br> @return<br> The filtered content of the specified eObject.<br><br>
+* Text:
+eContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eContents()
+* Description:
+eContents(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a sequence made of the instances of the specified type in the contents of the specified eObject.<br><br> @param eObject<br> The eObject which content is requested.<br> @param type<br> The type filter.<br><br> @return<br> The filtered content of the specified eObject.<br><br>
+* Text:
+eContents()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eCrossReferences()
+* Description:
+eCrossReferences(eObject: org.eclipse.emf.ecore.EObject) = Object<br><br>Returns the list of all EObjects cross-referenced from the receiver.<br><br> @param eObject<br> The eObject of which we need the cross-references.<br><br> @return<br> The list of all EObjects cross-referenced from the receiver.<br><br>
+* Text:
+eCrossReferences()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eGet()
+* Description:
+eGet(eObject: org.eclipse.emf.ecore.EObject, featureName: java.lang.String) = Object<br><br>Handles calls to the operation "eGet". This will fetch the value of the feature named "featureName" on "source"<br><br> @param eObject<br> The eObject we seek to retrieve a feature value of.<br> @param featureName<br> The name of the feature which value we need to retrieve.<br><br> @return<br> The value of the given feature on the given EObject<br><br>
+* Text:
+eGet()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eGet()
+* Description:
+eGet(eObject: org.eclipse.emf.ecore.EObject, feature: org.eclipse.emf.ecore.EStructuralFeature) = Object<br><br>Handles calls to the operation "eGet". This will fetch the value of the given feature on "source"<br><br> @param eObject<br> The eObject we seek to retrieve a feature value of.<br> @param feature<br> The feature which value we need to retrieve.<br><br> @return<br> The value of the given feature on the given EObject<br><br>
+* Text:
+eGet()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eGet()
+* Description:
+eGet(eObject: org.eclipse.emf.ecore.EObject, feature: org.eclipse.emf.ecore.EStructuralFeature, resolve: boolean) = Object<br><br>Handles calls to the operation "eGet". This will fetch the value of the given feature on "source"; the value is optionally resolved before it is returned.<br><br> @param eObject<br> The eObject we seek to retrieve a feature value of.<br> @param feature<br> The feature which value we need to retrieve.<br> @param resolve<br> whether to resolve the value or not.<br><br> @return<br> The value of the given feature on the given EObject<br><br>
+* Text:
+eGet()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eInverse()
+* Description:
+eInverse(eObject: org.eclipse.emf.ecore.EObject) = Set<br><br>Returns the set containing the inverse references.<br><br> @param eObject<br> The eObject which inverse references are requested.<br><br> @return<br> The set of the inverse references<br><br>
+* Text:
+eInverse()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eInverse()
+* Description:
+eInverse(eObject: org.eclipse.emf.ecore.EObject, featureName: java.lang.String) = Set<br><br>Returns the elements from the set of the inverse references of the receiver that are referencing the receiver using a feature with the given name.<br><br> @param eObject<br> The eObject which inverse references are requested.<br> @param featureName<br> The feature name.<br><br> @return<br> The set of the inverse references<br><br>
+* Text:
+eInverse()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eInverse()
+* Description:
+eInverse(eObject: org.eclipse.emf.ecore.EObject, type: org.eclipse.emf.ecore.EClassifier) = Set<br><br>Returns the elements of the given type from the set of the inverse references of the receiver.<br><br> @param eObject<br> The eObject which inverse references are requested.<br> @param type<br> The type filter.<br><br> @return<br> The set of the inverse references<br><br>
+* Text:
+eInverse()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+eResource()
+* Description:
+eResource(eObject: org.eclipse.emf.ecore.EObject) = Resource<br><br>Returns the Resource containing the given EObject. This service is equivalent to a direct call to EObject#eResource().<br><br> @param eObject<br> The EObject<br><br> @return<br> The Resource containing the given EObject.<br><br>
+* Text:
+eResource()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+followingSiblings()
+* Description:
+followingSiblings(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's following siblings.<br><br> @param self<br> The EObject we seek the following siblings of<br><br> @return<br> Sequence containing the full set of the receiver's following siblings<br><br>
+* Text:
+followingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+followingSiblings()
+* Description:
+followingSiblings(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's following siblings of any given types.<br><br> @param self<br> The EObject we seek the following siblings of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's following siblings of any given types<br><br>
+* Text:
+followingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+followingSiblings()
+* Description:
+followingSiblings(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's following siblings of the given type.<br><br> @param self<br> The EObject we seek the following siblings of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's following siblings of the given type<br><br>
+* Text:
+followingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+getClassifierID()
+* Description:
+EOperation named getClassifierID in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+getClassifierID()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+getEAnnotation()
+* Description:
+EOperation named getEAnnotation in EModelElement(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+getEAnnotation()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+isInstance()
+* Description:
+EOperation named isInstance in EClassifier(http://www.eclipse.org/emf/2002/Ecore)
+* Text:
+isInstance()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+lineSeparator()
+* Description:
+lineSeparator(obj: java.lang.Object) = String<br><br>Gets the platform line separator.<br><br> @param obj<br> Any object<br><br> @return<br> '\n' (Unix) or '\r\n' (Dos) or '\r' (Mac Os Classic)<br><br>
+* Text:
+lineSeparator()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+oclAsType()
+* Description:
+oclAsType(object: java.lang.Object, type: java.lang.Object) = Object<br><br>Casts the current object to the given type.<br><br> @param object<br> The object to cast<br> @param type<br> The type to cast the object to<br><br> @return<br> The current object cast to a "type"<br><br>
+* Text:
+oclAsType()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+oclIsKindOf()
+* Description:
+oclIsKindOf(object: java.lang.Object, type: java.lang.Object) = Boolean<br><br>Evaluates to "true" if the type of the object o1 conforms to the type "classifier". That is, o1 is of type "classifier" or a subtype of "classifier".<br><br> @param object<br> The reference Object we seek to test.<br> @param type<br> The expected supertype classifier.<br><br> @return<br> "true" if the object o1 is a kind of the classifier, "false" otherwise.<br><br>
+* Text:
+oclIsKindOf()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+oclIsTypeOf()
+* Description:
+oclIsTypeOf(object: java.lang.Object, type: java.lang.Object) = Boolean<br><br>Evaluates to "true" if the object o1 if of the type "classifier" but not a subtype of the "classifier".<br><br> @param object<br> The reference Object we seek to test.<br> @param type<br> The expected type classifier.<br><br> @return<br> "true" if the object o1 is a type of the classifier, "false" otherwise.<br><br>
+* Text:
+oclIsTypeOf()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+precedingSiblings()
+* Description:
+precedingSiblings(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's preceding siblings.<br><br> @param self<br> The EObject we seek the preceding siblings of<br><br> @return<br> Sequence containing the full set of the receiver's preceding siblings<br><br>
+* Text:
+precedingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+precedingSiblings()
+* Description:
+precedingSiblings(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's preceding siblings of any given types.<br><br> @param self<br> The EObject we seek the preceding siblings of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's preceding siblings of any given types<br><br>
+* Text:
+precedingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+precedingSiblings()
+* Description:
+precedingSiblings(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's preceding siblings of the given type.<br><br> @param self<br> The EObject we seek the preceding siblings of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's preceding siblings of the given type<br><br>
+* Text:
+precedingSiblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+siblings()
+* Description:
+siblings(self: org.eclipse.emf.ecore.EObject) = List<br><br>Returns a Sequence containing the full set of object's siblings.<br><br> @param self<br> The EObject we seek the siblings of<br><br> @return<br> Sequence containing the full set of the receiver's siblings<br><br>
+* Text:
+siblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+siblings()
+* Description:
+siblings(self: org.eclipse.emf.ecore.EObject, filters: java.util.Set) = List<br><br>Returns a Sequence containing the set of object's siblings of any given types.<br><br> @param self<br> The EObject we seek the siblings of<br> @param filters<br> The set of filtering EClasses<br><br> @return<br> Sequence containing the set of the receiver's siblings of any given types<br><br>
+* Text:
+siblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+siblings()
+* Description:
+siblings(self: org.eclipse.emf.ecore.EObject, filter: org.eclipse.emf.ecore.EClass) = List<br><br>Returns a Sequence containing the set of object's siblings of the given type.<br><br> @param self<br> The EObject we seek the siblings of<br> @param filter<br> The filtering EClass<br><br> @return<br> Sequence containing the set of the receiver's siblings of the given type<br><br>
+* Text:
+siblings()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+toString()
+* Description:
+toString(self: java.lang.Object) = String<br><br>Returns a string representation of the current object.<br><br> @param self<br> The current object<br><br> @return<br> a String representation of the given Object. For Collections, this will be the concatenation of all contained Objects' toString.<br><br>
+* Text:
+toString()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+trace()
+* Description:
+trace(self: java.lang.Object) = String<br><br>Returns a string representation of the current environment.<br><br> @param self<br> The current object<br><br> @return<br> a string representation of the current environment.<br><br>
+* Text:
+trace()
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetEnd-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetEnd-expected-completion.txt
new file mode 100644
index 0000000..596760c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetEnd-expected-completion.txt
@@ -0,0 +1,72 @@
+* Label:
++
+* Description:
++
+* Text:
++
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<
+* Description:
+<
+* Text:
+<
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<=
+* Description:
+<=
+* Text:
+<=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<>
+* Description:
+<>
+* Text:
+<>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+=
+* Description:
+=
+* Text:
+=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>
+* Description:
+>
+* Text:
+>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>=
+* Description:
+>=
+* Text:
+>=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+/]
+* Description:
+Inserts the end of an Expression Statement:<br/><pre>/]</pre>
+* Text:
+/]
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//ExpressionStatement
+
diff --git a/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetEndAfterSpace-expected-completion.txt b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetEndAfterSpace-expected-completion.txt
new file mode 100644
index 0000000..596760c
--- /dev/null
+++ b/tests/org.eclipse.acceleo.aql.tests/resources/completion/nestedQueryStatementExpressionInLetEndAfterSpace-expected-completion.txt
@@ -0,0 +1,72 @@
+* Label:
++
+* Description:
++
+* Text:
++
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<
+* Description:
+<
+* Text:
+<
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<=
+* Description:
+<=
+* Text:
+<=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+<>
+* Description:
+<>
+* Text:
+<>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+=
+* Description:
+=
+* Text:
+=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>
+* Description:
+>
+* Text:
+>
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+>=
+* Description:
+>=
+* Text:
+>=
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//Expression
+
+* Label:
+/]
+* Description:
+Inserts the end of an Expression Statement:<br/><pre>/]</pre>
+* Text:
+/]
+* Type (optional):
+http://www.eclipse.org/acceleo/4.0#//ExpressionStatement
+