Bug 45517 Add a 'Field comment' code template
20031024 The user should be able to specify a 'field comment' template. See 'CodeTemplateContextType.TYPE_COMMENT' as an example You have to - define a new variable type - specify the variables avaiable in this template - create an API in Codetemplates so it can be used Users are: - AddJavadocCommentAction - JavadocTagsSubProcessor.getMissingJavadocCommentProposals
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
fSuppressError= false;
			fTemplate.setName(name);
			updateButtons();			
		} else if (w == fContextCombo) {
			String name= fContextCombo.getText();
			fTemplate.setContext(name);
			fTemplateProcessor.setContextType(ContextTypeRegistry.getInstance().getContextType(name));
		} else if (w == fDescriptionText) {
			String desc= fDescriptionText.getText();
			fTemplate.setDescription(desc);
		}	
	}
	
	protected void doSourceChanged(IDocument document) {
		String text= document.get();
		fTemplate.setPattern(text);
		fValidationStatus.setOK();
		ContextType contextType= ContextTypeRegistry.getInstance().getContextType(fTemplate.getContextTypeName());
		if (contextType != null) {
			try {
				String errorMessage= contextType.validate(text);
				if (errorMessage != null) {
					fValidationStatus.setError(errorMessage);
				}
			} catch (CoreException e) {
				JavaPlugin.log(e);
			}			
		}
		updateUndoAction();
		updateButtons();