if (! (context instanceof DocumentTemplateContext)) return super.evaluate(context);  DocumentTemplateContext documentContext= (DocumentTemplateContext) context; if (documentContext.getCompletionLength() == 0) { return ""; } else { return documentContext.getKey(); }
final String selection= context.getVariable("selection"); return selection == null ? super.evaluate(context) : selection;
		public String evaluate(TemplateContext context) {			if (! (context instanceof DocumentTemplateContext))				return super.evaluate(context);						DocumentTemplateContext documentContext= (DocumentTemplateContext) context;			if (documentContext.getCompletionLength() == 0) {				return ""; //$NON-NLS-1$			} else {				return documentContext.getKey();					}		}		