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/CodeTemplateBlock.java
private static final String PREF_JAVADOC_STUBS= PreferenceConstants.CODEGEN_ADD_COMMENTS;
	
	private TreeListDialogField fCodeTemplateTree;
	
	private SelectionButtonDialogField fCreateJavaDocComments;
	
	protected CodeTemplates fTemplates;
	
	private PixelConverter fPixelConverter;
	private SourceViewer fPatternViewer;
	private Control fSWTWidget;
	public CodeTemplateBlock() {
		
		fTemplates= CodeTemplates.getInstance();
		
		CodeTemplateAdapter adapter= new CodeTemplateAdapter(fTemplates);
		String[] buttonLabels= new String[] { 
			 PreferencesMessages.getString("CodeTemplateBlock.templates.edit.button"),	
			 null,  
			 PreferencesMessages.getString("CodeTemplateBlock.templates.import.button"), 
			 PreferencesMessages.getString("CodeTemplateBlock.templates.export.button"), 
			 PreferencesMessages.getString("CodeTemplateBlock.templates.exportall.button") 
		};		
		fCodeTemplateTree= new TreeListDialogField(adapter, buttonLabels, new CodeTemplateLabelProvider());
		fCodeTemplateTree.setDialogFieldListener(adapter);
		fCodeTemplateTree.setLabelText(PreferencesMessages.getString("CodeTemplateBlock.templates.label")); 
		fCodeTemplateTree.enableButton(IDX_EXPORT, false);
		fCodeTemplateTree.enableButton(IDX_EDIT, false);