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
viewer.getTextWidget().setFont(font);
		
		Control control= viewer.getControl();
		data= new GridData(GridData.FILL_BOTH);
		data.horizontalSpan= nColumns;
		data.heightHint= fPixelConverter.convertHeightInCharsToPixels(5);
		control.setLayoutData(data);
		
		return viewer;
	}
	
	protected Template[] getTemplateOfCategory(boolean isComment) {
		ArrayList res=  new ArrayList();
		Template[] templates= fTemplates.getTemplates();
		for (int i= 0; i < templates.length; i++) {
			Template curr= templates[i];
			if (isComment == curr.getName().endsWith(CodeTemplates.COMMENT_SUFFIX)) {
				res.add(curr);
			}
		}
		return (Template[]) res.toArray(new Template[res.size()]);
	}
	
	protected static boolean canEdit(List selected) {
		return selected.size() == 1 && (selected.get(0) instanceof Template);
	}	
	
	protected void updateSourceViewerInput(List selection) {
		if (fPatternViewer == null || fPatternViewer.getTextWidget().isDisposed()) {
			return;