Bug 120568 [content assist] @link proposal not inserted
I20051213-0010 1. Have the 2 following CUs: Reference.java public class Reference { public static int A_STATIC_FIELD = 0; } Test.java /** * Completion inside reference Reference#A_STATIC_F */ public class Test { } 2. Complete after Reference#A_STATIC_F 3. Choose {@link Reference#A_STATIC_FIELD} 4. Press Enter Observe: The proposal is not inserted
org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/contentassist/JavadocCompletionTest.java
fTypeDeclaration;
		StringBuffer lineBuffer= new StringBuffer(javadocLine);
		int firstPipe= lineBuffer.indexOf(CARET);
		int secondPipe;
		if (firstPipe == -1) {
			firstPipe= lineBuffer.length();
			secondPipe= firstPipe;
		} else {
			lineBuffer.replace(firstPipe, firstPipe + CARET.length(), "");
			secondPipe= lineBuffer.indexOf(CARET, firstPipe);
			if (secondPipe ==-1)
				secondPipe= firstPipe;
			else
				lineBuffer.replace(secondPipe, secondPipe + CARET.length(), "");
		}
		buffer.append(prefix + lineBuffer + postfix);
		return new Region(firstPipe + prefix.length(), secondPipe - firstPipe);
	}
	
	private IRegion assembleTestMethodCUExtractSelection(StringBuffer buffer, String javadocLine, String member) {
		String prefix= "package test1;\n" +
				"\n" +
				TYPE_START +
				MEMBER_JDOC_START;
				String postfix= MEMBER_JDOC_END +
				member +
				TYPE_END;
		StringBuffer lineBuffer= new StringBuffer(javadocLine);
		int firstPipe= lineBuffer.indexOf(CARET);
		int secondPipe;