// nothing found, return
if (service == null || exp.getCallName() == null) {
return true;
}
SimpleReference callName = exp.getCallName();
//TODO: this is a problematic case, as during a clean build
// it's possible that the SourceModule in which the
// called method was declared is not yet in the index, so
// the return type cannot be evaluated and therefore
// the templatevariable won't be created...
//
// Possible solution: check if there's an event fired when the
// build is completed and store those return types in a global
// singleton, evaluate them when the whole build process is finished.
String fqsn = service.getNamespace() != null ? service.getNamespace().getQualifiedName() : null;
TemplateVariable tempVar = null;
tempVar = SymfonyModelAccess.getDefault()
.createTemplateVariableByReturnType(source, currentMethod, callName,
service.getClassName(), fqsn, var.getName(), cache);
if (tempVar != null) {
deferredVariables.push(tempVar);
}
// something like $formView = $form->createView();
} else if (exp.getReceiver().getClass() == VariableReference.class) {
VariableReference varRef = (VariableReference) exp.getReceiver();
SimpleReference ref = exp.getCallName();
// check for a previosly declared variable
for (TemplateVariable tempVar : deferredVariables) {
if (tempVar.getName().equals(varRef.getName())) {