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
}
	
	public boolean performOk(boolean enabled) {
		IPreferenceStore prefs= PreferenceConstants.getPreferenceStore();
		prefs.setValue(PREF_JAVADOC_STUBS, fCreateJavaDocComments.isSelected());
		JavaPlugin.getDefault().savePluginPreferences();		
		return true;
	}
	
	public void performCancel() {
		try {
			fTemplates.reset();			
		} catch (CoreException e) {
			openReadErrorDialog(e);
		}
	}
	
	private void openReadErrorDialog(CoreException e) {
		String title= PreferencesMessages.getString("CodeTemplateBlock.error.read.title"); 
		String message= PreferencesMessages.getString("CodeTemplateBlock.error.read.message"); 
		ExceptionHandler.handle(e, getShell(), title, message);		
	}
	
	private void openWriteErrorDialog(CoreException e) {
		String title= PreferencesMessages.getString("CodeTemplateBlock.error.write.title"); 
		String message= PreferencesMessages.getString("CodeTemplateBlock.error.write.message"); 
		ExceptionHandler.handle(e, getShell(), title, message);	
	}	
}