Bug 17646 Comments in Java Templates don't have right syntax coloring
F1 - open Template preferences - select filecomment observe: the preview doesn't rendere the filecomment using the defined color for comments, but it does use the color for the keyword this.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TemplatePreferencePage.java
openReadErrorDialog(e);
		}
		return super.performCancel();
	}
	
	/**
	 * Initializes the default values of this page in the preference bundle.
	 * Will be called on startup of the JavaPlugin
	 */
	public static void initDefaults(IPreferenceStore prefs) {
		prefs.setDefault(PREF_FORMAT_TEMPLATES, true);
	}
	public static boolean useCodeFormatter() {
		IPreferenceStore prefs= JavaPlugin.getDefault().getPreferenceStore();
		return prefs.getBoolean(PREF_FORMAT_TEMPLATES);
	}
	private void openReadErrorDialog(CoreException e) {
		ErrorDialog.openError(getShell(),
			TemplateMessages.getString("TemplatePreferencePage.error.read.title"), 
			null, e.getStatus());
	}
	
	private void openWriteErrorDialog(CoreException e) {
		ErrorDialog.openError(getShell(),
			TemplateMessages.getString("TemplatePreferencePage.error.write.title"), 
			null, e.getStatus());		
	}
		
}