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
createLabel(parent, TemplateMessages.getString("EditTemplateDialog.description")); 		
		fDescriptionText= createText(parent);
		composite= new Composite(parent, SWT.NONE);
		composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
		layout= new GridLayout();		
		layout.marginWidth= 0;
		layout.marginHeight= 0;
		composite.setLayout(layout);
		Label patternLabel= createLabel(composite, TemplateMessages.getString("EditTemplateDialog.pattern")); 
		fPatternEditor= createEditor(parent);
		
		Label filler= new Label(composite, SWT.NONE);		
		filler.setLayoutData(new GridData(GridData.FILL_VERTICAL));
		
		fInsertVariableButton= new Button(composite, SWT.NONE);
		fInsertVariableButton.setLayoutData(getButtonGridData(fInsertVariableButton));
		fInsertVariableButton.setText(TemplateMessages.getString("EditTemplateDialog.insert.variable")); 
		fInsertVariableButton.addSelectionListener(new SelectionListener() {
			public void widgetSelected(SelectionEvent e) {
				insertVariable();				
			}
			public void widgetDefaultSelected(SelectionEvent e) {}
		});
		
		fNameText.setText(fTemplate.getName());
		fDescriptionText.setText(fTemplate.getDescription());
		fContextCombo.select(getIndex(fTemplate.getContext()));
		fPatternEditor.getDocument().set(fTemplate.getPattern());
		return composite;
	}