use of org.eclipse.jface.text.templates.TemplateBuffer in project erlide_eclipse by erlang.
the class ModuleElementVariableResolver method resolve.
@Override
public void resolve(final TemplateVariable variable, final TemplateContext theContext) {
if (reentry) {
return;
}
reentry = true;
final DocumentTemplateContext context = new DocumentTemplateContext(ErlangSourceContextTypeModule.getDefault(), new Document(fTemplate.getPattern()), 0, fTemplate.getPattern().length());
TemplateBuffer tb;
try {
tb = context.evaluate(fTemplate);
variable.setValue(tb.getString());
} catch (final BadLocationException e) {
} catch (final TemplateException e) {
}
reentry = false;
}
Aggregations