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
IRegion preSelection= assembleTestCUExtractSelection(contents, javadocLine, givenImports);
		StringBuffer result= new StringBuffer();
		IRegion expectedSelection= assembleTestCUExtractSelection(result, expected, expectedImports);
		assertJavadocProposal(selector, contents, preSelection, result, expectedSelection);
	}
	private void assertMethodJavadocProposal(String expected, String javadocLine, String selector) throws CoreException {
		StringBuffer contents= new StringBuffer();
		IRegion preSelection= assembleTestMethodCUExtractSelection(contents, javadocLine, METHOD);
		StringBuffer result= new StringBuffer();
		IRegion expectedSelection= assembleTestMethodCUExtractSelection(result, expected, METHOD);
		
		assertJavadocProposal(selector, contents, preSelection, result, expectedSelection);
	}
	
	private void assertFieldJavadocProposal(String expected, String javadocLine, String selector) throws CoreException {
		StringBuffer contents= new StringBuffer();
		IRegion preSelection= assembleTestMethodCUExtractSelection(contents, javadocLine, FIELD);
		StringBuffer result= new StringBuffer();
		IRegion expectedSelection= assembleTestMethodCUExtractSelection(result, expected, FIELD);
		
		assertJavadocProposal(selector, contents, preSelection, result, expectedSelection);
	}
	
	private void assertJavadocProposal(String selector, StringBuffer contents, IRegion preSelection, StringBuffer result, IRegion expectedSelection) throws JavaModelException, PartInitException {
		fCU= createCU(fPackage, contents.toString());
		fEditor= (JavaEditor) EditorUtility.openInEditor(fCU);
		IDocument doc;
		ITextSelection postSelection;
		try {
			ICompletionProposal proposal= findNonNullProposal(selector, fCU, preSelection);