Bug 38317 Add getter/setter templates.
Add template support to the code generation pref panel for getter and setter method bodies.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
return;
		}
		if (selection.size() == 1 && selection.get(0) instanceof Template) {
			Template template= (Template) selection.get(0);
			fPatternViewer.getDocument().set(template.getPattern());
		} else {
			fPatternViewer.getDocument().set(""); 
		}		
	}
		
	protected void doButtonPressed(int buttonIndex, List selected) {
		if (buttonIndex == IDX_EDIT) {
			edit((Template) selected.get(0));
		} else if (buttonIndex == IDX_EXPORT) {
			export(selected);
		} else if (buttonIndex == IDX_EXPORTALL) {
			exportAll();
		} else if (buttonIndex == IDX_IMPORT) {
			import_();
		}
	}
	
	private void edit(Template template) {
		Template newTemplate= new Template(template);
		EditTemplateDialog dialog= new EditTemplateDialog(getShell(), newTemplate, true, false, new String[0]);
		if (dialog.open() == EditTemplateDialog.OK) {
			
			template.setDescription(newTemplate.getDescription());
			template.setPattern(newTemplate.getPattern());
			fCodeTemplateTree.refresh(template);