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
IRegion line= d.getLineInformationOfOffset(p);
			int lineOffset= line.getOffset();
			int firstNonWS= findEndOfWhiteSpace(d, lineOffset, offset);
			Assert.isTrue(firstNonWS >= lineOffset, "indentation must not be negative"); 
			
			StringBuffer buf= new StringBuffer(c.text);
			IRegion prefix= findPrefixRange(d, line);
			String indentation= d.get(prefix.getOffset(), prefix.getLength());
			int lengthToAdd= Math.min(offset - prefix.getOffset(), prefix.getLength());
			
			buf.append(indentation.substring(0, lengthToAdd));
			
			if (firstNonWS < offset) {
				if (d.getChar(firstNonWS) == '/') {
					
					buf.append(" * "); 
					if (isPreferenceTrue(PreferenceConstants.EDITOR_CLOSE_JAVADOCS) && isNewComment(d, offset)) {
						c.shiftsCaret= false;
						c.caretOffset= c.offset + buf.length();
						String lineDelimiter= TextUtilities.getDefaultLineDelimiter(d);
						
						String endTag= lineDelimiter + indentation + " */"; 
						
						if (isPreferenceTrue(PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS)) {
							 
							
							d.replace(offset, 0, endTag);
							
							ICompilationUnit unit= getCompilationUnit();
							if (unit != null) {