// pretty much same code as super.createContext except create
// SmartReplaceTemplateContext
TemplateContextType contextType = getContextType(viewer, region);
if (contextType != null) {
IDocument document = viewer.getDocument();
return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
}
return null;
}