Bug 55325 [typing] Starting Javadoc comment inserts @param tags for next method
build I20040318 - open type TrimLayout - before method setSpacing, start a new method by typing a Javadoc comment - you get @param tags for the next method (even though it has its own Javadoc) For example: Type this: /**<Enter> Before this: /** * Sets the empty space surrounding the center area. This whitespace is * located between the trim and the central widget. */ public void setSpacing(int left, int right, int top, int bottom) { leftSpacing = left; rightSpacing = right; topSpacing = top; bottomSpacing = bottom; } You get: /** * * @param left * @param right * @param top * @param bottom */
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
* @param comment the computed comment 
	 * @param indentation the base indentation
	 * @param lineDelimiter the line delimiter
	 * @return a trimmed version of <code>comment</code>
	 */
	private String prepareTemplateComment(String comment, String indentation, String lineDelimiter) {
		
		if (comment.endsWith("*/")) 
			comment= comment.substring(0, comment.length() - 2);
		comment= comment.trim();
		if (comment.startsWith("/*")) { 
			if (comment.length() > 2 && comment.charAt(2) == '*') {
				comment= comment.substring(3); 
			} else {
				comment= comment.substring(2); 
			}
		}
		return Strings.changeIndent(comment, 0, CodeFormatterUtil.getTabWidth(), indentation, lineDelimiter);
	}
	
	private String createTypeTags(IDocument document, DocumentCommand command, String indentation, String lineDelimiter, IType type)
		throws CoreException
	{
		String comment= CodeGeneration.getTypeComment(type.getCompilationUnit(), type.getTypeQualifiedName('.'), lineDelimiter);
		if (comment != null) {
			return prepareTemplateComment(comment.trim(), indentation, lineDelimiter);
		}
		return null;
	}