Bug 31075 Code Templates are not preserved
the new code templates are a great feature. The problem is when you close eclipse and start it up again they seem to be reset to the defaults.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
}
		if (selection.size() == 1 && selection.get(0) instanceof Template) {
			Template template= (Template) selection.get(0);
			fPatternViewer.getDocument().set(template.getPattern());
		} else {
			fPatternViewer.getDocument().set(""); 
		}		
	}
	
	protected void doKeyInSourcePressed() {
		List selected= fCodeTemplateTree.getSelectedElements();
		if (canEdit(selected)) {
			doButtonPressed(IDX_EDIT, selected);
		}
	}
	
	
	protected void doButtonPressed(int buttonIndex, List selected) {
		if (buttonIndex == IDX_EDIT) {
			edit((Template) selected.get(0));
		} else if (buttonIndex == IDX_EXPORT) {
			export(selected);
		} else if (buttonIndex == IDX_EXPORTALL) {
			exportAll();
		} else {
			import_();
		}
	}
	
	private void edit(Template template) {