TemplateContextType type= JavaPlugin.getDefault().getTemplateContextRegistry().getContextType(template.getContextTypeId());
String contextId= template.getContextTypeId(); TemplateContextType type= JavaPlugin.getDefault().getTemplateContextRegistry().getContextType(contextId);
	protected void updateViewerInput() {		IStructuredSelection selection= (IStructuredSelection) getTableViewer().getSelection();		SourceViewer viewer= getViewer();				if (selection.size() == 1 && selection.getFirstElement() instanceof TemplatePersistenceData) {			TemplatePersistenceData data= (TemplatePersistenceData) selection.getFirstElement();			Template template= data.getTemplate();			TemplateContextType type= JavaPlugin.getDefault().getTemplateContextRegistry().getContextType(template.getContextTypeId());			fTemplateProcessor.setContextType(type);			viewer.getDocument().set(template.getPattern());		} else {			viewer.getDocument().set(""); //$NON-NLS-1$		}			}