void enableTemplates() {
		boolean enabled = fUseTemplateButton.getSelection();

		if (!enabled) {
			// save last selected template
			Template template = getSelectedTemplate();
			if (template != null)
				fLastSelectedTemplateName = template.getName();
			else
				fLastSelectedTemplateName = ""; //$NON-NLS-1$

			fTableViewer.setSelection(null);
		}
		else {
			setSelectedTemplate(fLastSelectedTemplateName);
		}

		fTableViewer.getControl().setEnabled(enabled);
		fPatternViewer.getControl().setEnabled(enabled);
	}
void enableTemplates() {
		boolean enabled = fUseTemplateButton.getSelection();

		if (!enabled) {
			
			Template template = getSelectedTemplate();
			if (template != null)
				fLastSelectedTemplateName = template.getName();
			else
				fLastSelectedTemplateName = ""; 

			fTableViewer.setSelection(null);
		}
		else {
			setSelectedTemplate(fLastSelectedTemplateName);
		}

		fTableViewer.getControl().setEnabled(enabled);
		fPatternViewer.getControl().setEnabled(enabled);
	}
void enableTemplates ( ) { boolean enabled = fUseTemplateButton . getSelection ( ) ; if ( ! enabled ) { // save last selected template Template template = getSelectedTemplate ( ) ; if ( template != null ) fLastSelectedTemplateName = template . getName ( ) ; else fLastSelectedTemplateName = "" ; //$NON-NLS-1$ fTableViewer . setSelection ( null ) ; } else { setSelectedTemplate ( fLastSelectedTemplateName ) ; } fTableViewer . getControl ( ) . setEnabled ( enabled ) ; fPatternViewer . getControl ( ) . setEnabled ( enabled ) ; }
Enable/disable controls in page based on fUseTemplateButton's current
state.
Enable / disable controls in page based on fUseTemplateButton s current state .