code: void updateViewerInput() {
  		Template template = getSelectedTemplate();
  		if (template != null) {
  			fPatternViewer.getDocument().set(template.getPattern());
  			String imageId = "org.glassmaker.ui.templates."+template.getName().replace(" ", "").toLowerCase();
  			ImageDescriptor desc = imageRegistry.getDescriptor(imageId);
  			if(desc != null){
  				fImage.setImage(desc.createImage());
  			}else{
  				fImage.setImage(null);
  			}
  				
  		}
  		else {
  			fPatternViewer.getDocument().set(""); //$NON-NLS-1$
  		}
  	}
docs: Updates the pattern viewer.