@Override
public void apply(ICompletionReporter reporter) throws Exception {
VariableFieldContext ctx = (VariableFieldContext) getContext();
String varName = ctx.getVariable();
TemplateField var = SymfonyModelAccess.getDefault().findTemplateVariableType("$" + varName, ctx.getSourceModule());
if (var == null) {
return;
}
String className = var.getClassName();
IDLTKSearchScope scope = SearchEngine.createSearchScope(ctx.getSourceModule().getScriptProject());
String prefix = ctx.getPrefix();
SourceRange range = getReplacementRange(getContext());
if (className != null) {
IType[] types = PhpModelAccess.getDefault().findTypes(var.getQualifier(), var.getClassName(), MatchRule.EXACT, 0, 0, scope, null);
if (types.length == 1) {
IType type = types[0];