Region region = new Region(0, 0);
PyDocumentTemplateContext context = PyTemplateCompletionProcessor.createContext(new PyContextType(),
pyEdit.getPySourceViewer(), region);
TemplateProposal templateProposal = new TemplateProposal(template, context, region, null);
templateProposal.apply(pyEdit.getPySourceViewer(), '\n', 0, 0);
}
}