Bug 86852 [1.5] Code assist for Javadoc and generics creates comments with warnings
Go to the "#" and hit Ctrl + Space. -------------------------- import java.util.List; /** * @see # */ public class TestGenericComment { void somthing(List<? extends Object> objects) { } }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocCompletionEvaluator.java
private static int findClosingCharacter(IDocument doc, int pos, int end, char endChar) throws BadLocationException {
		int curr= pos;
		while (curr < end && (doc.getChar(curr) != endChar)) {
			curr++;
		}
		if (curr < end) {
			return curr + 1;
		}
		return pos;
	}
	
	private static int findReplaceEndPos(IDocument doc, String newText, String oldText, int pos) {
		if (oldText.length() == 0 || oldText.equals(newText)) {
			return pos;
		}
		
		try {
			IRegion lineInfo= doc.getLineInformationOfOffset(pos);
			int end= lineInfo.getOffset() + lineInfo.getLength();
			
			if (newText.endsWith(">")) { 
				
				return findClosingCharacter(doc, pos, end, '>');
			}
			char ch= 0;
			int pos1= pos;
			while (pos1 < end && Character.isJavaIdentifierPart(ch= doc.getChar(pos1))) {
				pos1++;
			}