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/text/correction/JavadocTagsSubProcessor.java
boolean needsLead= true;
			boolean isLast= false;
			for (int i= 0; i < fChangedList.size(); i++) {
				Event curr= (Event) fChangedList.get(i);
				if (curr.isInserted()) {
					StringBuffer buf= new StringBuffer();
					if (needsLead) {
						buf.append('\n');
					}
					buf.append(getNewTagString(curr.newTag));
					if (!needsLead && !isLast) {
						buf.append('\n');
					}
					
					String indentString= getIndent(buffer) + " * "; 
					String str= Strings.changeIndent(buf.toString(), 0, CodeFormatterUtil.getTabWidth(), indentString, buffer.getLineDelimiter());
					if (isLast) {
						str= "* " + str + buffer.getLineDelimiter() + getIndent(buffer) + ' ';
					}
					root.addChild(new InsertEdit(currPos, str));
				} else {
					JavaDocTag original= curr.originalTag;
					currPos= original.getOffset() + original.getLength();
					needsLead= false;
					isLast= (fOriginalTags.length > 0 && fOriginalTags[fOriginalTags.length - 1] == original);
				}
			}
		}
		
		private String getNewTagString(JavaDocTag newTag) {