Bug 5832 Template Pref page: Edit: Copy/paste context menu
The text field to edit the templates should have a context menu with copy/paste.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
super.okPressed();
	}
	
	private void updateButtons() {		
		boolean valid= fNameText.getText().trim().length() != 0;
		StatusInfo status= new StatusInfo();
		
		if (!valid) {
			if (fSuppressError)
				status.setError(""); 							
			else
				status.setError(TemplateMessages.getString("EditTemplateDialog.error.noname")); 
 		} else if (fVerifier.hasErrors()) {
 			status.setError(fVerifier.getErrorMessage());	
		}
		updateStatus(status);
	}
	private void insertVariable() {
		TemplateVariableDialog dialog= new TemplateVariableDialog(getShell(), TemplateCollector.getVariables());
		if (dialog.open() == Window.OK) {
			String variable= "${" + dialog.getSelectedName() + "}"; 
			StyledText text= fPatternEditor.getTextWidget();
			Point selection= text.getSelection();
			text.replaceTextRange(selection.x, selection.y - selection.x, variable);
			int caretOffset= selection.x + variable.length();
			text.setSelection(caretOffset, caretOffset);
		}
	}
}