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
doc= fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput());
			apply(fEditor, doc, proposal, preSelection);
			postSelection= (ITextSelection) fEditor.getSelectionProvider().getSelection();
		} finally {
			EditorTestHelper.closeEditor(fEditor);
		}
		assertEquals(result.toString(), doc.get());
		assertEquals(expectedSelection.getOffset(), postSelection.getOffset());
		assertEquals(expectedSelection.getLength(), postSelection.getLength());
	}
	
	private void assertNoProposals(String javadocLine, String selector) throws CoreException {
		StringBuffer contents= new StringBuffer();
		IRegion preSelection= assembleTestCUExtractSelection(contents, javadocLine, "");
		ICompilationUnit cu= createCU(fPackage, contents.toString());
		fEditor= (JavaEditor) EditorUtility.openInEditor(cu);
		try {
			assertNull("illegal proposal for \"" + selector +"\"", findNamedProposal(selector, cu, preSelection));
		} finally {
			EditorTestHelper.closeEditor(fEditor);
		}
		
	}
	private IRegion assembleTestCUExtractSelection(StringBuffer buffer, String javadocLine, String imports) {
		String prefix= "package test1;\n" +
				imports +
				 "\n" +
				 TYPE_JDOC_START;
		String postfix= "\n" +
				 TYPE_JDOC_END +