Bug 39783 [preferences] template editor in preferences should honor partition type
200307030800 1. Preferences, Java->Editor->Templates 2. Add a template for javadoc 3. syntax highlighting shows default (java) partition type highlighting -> should respect partition type setting, e.g. initialize the viewer with javadoc
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaTemplatePreferencePage.java
import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
import org.eclipse.jdt.internal.ui.text.IJavaPartitions;
import org.eclipse.jdt.internal.ui.text.template.preferences.TemplateVariableProcessor;
public class JavaTemplatePreferencePage extends TemplatePreferencePage implements IWorkbenchPreferencePage {
	private TemplateVariableProcessor fTemplateProcessor;
	
	public JavaTemplatePreferencePage() {
		setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
		setTemplateStore(JavaPlugin.getDefault().getTemplateStore());
		setContextTypeRegistry(JavaPlugin.getDefault().getTemplateContextRegistry());
		fTemplateProcessor= new TemplateVariableProcessor();
	}
	/*
	 * @see org.eclipse.jface.preference.IPreferencePage#performOk()
	 */
	public boolean performOk() {
		boolean ok= super.performOk();
		JavaPlugin.getDefault().savePluginPreferences();
		
		return ok;
	}
	
	/*
	 * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#getFormatterPreferenceKey()
	 */
	protected String getFormatterPreferenceKey() {