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
File file= new File(path);		
		if (file.isHidden()) {
			String title= PreferencesMessages.CodeTemplateBlock_export_error_title; 
			String message= Messages.format(PreferencesMessages.CodeTemplateBlock_export_error_hidden, file.getAbsolutePath()); 
			MessageDialog.openError(getShell(), title, message);
			return;
		}
		
		if (file.exists() && !file.canWrite()) {
			String title= PreferencesMessages.CodeTemplateBlock_export_error_title; 
			String message= Messages.format(PreferencesMessages.CodeTemplateBlock_export_error_canNotWrite, file.getAbsolutePath()); 
			MessageDialog.openError(getShell(), title, message);
			return;
		}
		if (!file.exists() || confirmOverwrite(file)) {
			OutputStream output= null;
			try {
				output= new BufferedOutputStream(new FileOutputStream(file));
				TemplateReaderWriter writer= new TemplateReaderWriter();
				writer.save(templates, output);
				output.close();
			} catch (IOException e) {
				if (output != null) {
					try {
						output.close();
					} catch (IOException e2) {
						 
					}
				}