Bug 4978 Completion list not ordered as expected
Type "fo" and press ctrl-space The best matches are the "for" templates but they are at the end of the list
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
if (path == null)
			return;
		
		try {
			FileOutputStream stream= new FileOutputStream(path);		
			templateSet.saveToStream(stream);			
		} catch (IOException e) {			
			JavaPlugin.log(e);
			MessageDialog.openError(getShell(), TemplateMessages.getString("TemplatePreferencePage.error.export"), e.getMessage()); 			
		}		
	}
	
	
	private void remove() {
		IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
		Iterator elements= selection.iterator();
		while (elements.hasNext()) {
			Template template= (Template) elements.next();
			TemplateSet.getInstance().remove(template);
		}
		fTableViewer.refresh();
	}
	
	private void enableAll(boolean enable) {
		Template[] templates= TemplateSet.getInstance().getTemplates();
		for (int i= 0; i != templates.length; i++)
			templates[i].setEnabled(enable);		
			
		fTableViewer.setAllChecked(enable);
	}