Bug 8082 template pref page: export overwrites without warning
export from template pref page overwrites files without warning this is never good - you can lose templates you have saved on your disk somewhere
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
}
	
	private void updateButtons() {
		int selectionCount= ((IStructuredSelection) fTableViewer.getSelection()).size();
		int itemCount= fTableViewer.getTable().getItemCount();
		
		fEditButton.setEnabled(selectionCount == 1);
		fExportButton.setEnabled(selectionCount > 0);
		fRemoveButton.setEnabled(selectionCount > 0 && selectionCount <= itemCount);
		fEnableAllButton.setEnabled(itemCount > 0);
		fDisableAllButton.setEnabled(itemCount > 0);
	}
	
	private void add() {		
		
		Template template= new Template();
		ContextTypeRegistry registry=ContextTypeRegistry.getInstance();
		ContextType type= registry.getContextType("java");
		
		String contextTypeName;
		if (type != null)
			contextTypeName= type.getName();
		else {
			Iterator iterator= registry.iterator();
			contextTypeName= (String) iterator.next();
		}
		template.setContext(contextTypeName); 
		
		EditTemplateDialog dialog= new EditTemplateDialog(getShell(), template, false);
		if (dialog.open() == dialog.OK) {