IDocument document= fTextEditor.getDocumentProvider().getDocument(fTextEditor.getEditorInput());
try {
if (location.equals(fCachedPosition))
return fCachedResult;
fCachedPosition= location;
int offset= getOffset(document, textWidget, textWidget.toControl(location.x,
location.y));
if (fCachedOffset == offset)
return fCachedResult;
fCachedOffset= offset;
if (isValidTemplate(document, template, offset, 0))