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
TemplateSet.getInstance().add(template);
			fTableViewer.refresh();
			fTableViewer.setChecked(template, template.isEnabled());
			fTableViewer.setSelection(new StructuredSelection(template));			
		}
	}
	private void edit() {
		IStructuredSelection selection= (IStructuredSelection) fTableViewer.getSelection();
		Template template= (Template) selection.getFirstElement();
		EditTemplateDialog dialog= new EditTemplateDialog(getShell(), template, true);
		if (dialog.open() == dialog.OK) {
			fTableViewer.refresh(template);
			fTableViewer.setChecked(template, template.isEnabled());
			fTableViewer.setSelection(new StructuredSelection(template));			
		}
	}
	
	private void import_() {
		FileDialog dialog= new FileDialog(getShell());
		dialog.setText(TemplateMessages.getString("TemplatePreferencePage.import.title")); 
		dialog.setFilterExtensions(new String[] {TemplateMessages.getString("TemplatePreferencePage.import.extension")}); 
		String path= dialog.open();
		
		if (path == null)
			return;
		
		try {
			FileInputStream stream= new FileInputStream(path);		
			TemplateSet.getInstance().addFromStream(stream);