Bug 123985 [code templates] Code template preference page wrongly computes selection
I20060110-1026 Steps to reproduce: - Goto code template preference page - Select tree nodes "Code", "New Java files" and "Class body" - Press Export... -> File dialog with caption "Exporting 12 Code Template(s)" appears -> Caption should be "Export Templates" as in other places -> Only 10 templates should be exported
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
openWriteErrorDialog(e);
			}
		}
		
	}
	private boolean confirmOverwrite(File file) {
		return MessageDialog.openQuestion(getShell(),
			PreferencesMessages.CodeTemplateBlock_export_exists_title, 
			Messages.format(PreferencesMessages.CodeTemplateBlock_export_exists_message, file.getAbsolutePath())); 
	}
	public void performDefaults() {
		fTemplateStore.restoreDefaults();
		
		
		fCodeTemplateTree.refresh();
		updateSourceViewerInput(fCodeTemplateTree.getSelectedElements());
	}
	
	public boolean performOk(boolean enabled) {
		if (fProject != null) {
			TemplatePersistenceData[] templateData= fTemplateStore.getTemplateData();
			for (int i= 0; i < templateData.length; i++) {
				fTemplateStore.setProjectSpecific(templateData[i].getId(), enabled);
			}
		}
		try {
			fTemplateStore.save();
		} catch (IOException e) {
			JavaPlugin.log(e);
			openWriteErrorDialog(e);