I'm developping DLTK IDE for Freemarker template engine that you can find at DLTK Freemarker Eclipse Plugin and I would like manage Completion for Java Model used into Freemarker template. For instance you have the Java Model :

models.put("className", "MyClass");

and Freemarker Template script:

public class ${className} {
}

I would like manage autocompletion after the ${ character and show 'className' into the autocompletion. I tell me which is the best solution. My first idea is to implement ScriptCompletionEngine and manage that into it. But perhaps it should be better to create DLTK AST by using Freemarker Interpolation token (classname) and use the AST?