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/EditTemplateDialog.java
if (fIsNameModifiable) {
			fNameText.setText(fTemplate.getName());
			fContextCombo.select(getIndex(fTemplate.getContextTypeId()));
		} else {
			fPatternEditor.getControl().setFocus();
		}
		initializeActions();
		applyDialogFont(parent);		
		return composite;
	}
	
	protected void doTextWidgetChanged(Widget w) {
		if (w == fNameText) {
			String name= fNameText.getText();
			if (fSuppressError && (name.trim().length() != 0))
				fSuppressError= false;
			fTemplate.setName(name);
			updateButtons();			
		} else if (w == fContextCombo) {
			String name= fContextCombo.getText();
			String contextId= getContextId(name);
			fTemplate.setContextTypeId(contextId);
			fTemplateProcessor.setContextType(fContextTypeRegistry.getContextType(contextId));
		} else if (w == fDescriptionText) {
			String desc= fDescriptionText.getText();
			fTemplate.setDescription(desc);
		}	
	}
	
	private String getContextId(String name) {