Community
Participate
Working Groups
}
this.scanner.tokenizeWhiteSpace = true;
if (this.completionNode != null) {
int flags = CompletionOnJavadoc.TEXT|CompletionOnJavadoc.ONLY_INLINE_TAG;
int flags = this.inlineTagStarted ? 0 : CompletionOnJavadoc.TEXT|CompletionOnJavadoc.ONLY_INLINE_TAG;
if (member instanceof JavadocMessageSend) {
JavadocMessageSend msgSend = (JavadocMessageSend) member;
this.completionNode = new CompletionOnJavadocMessageSend(msgSend, this.memberStart, flags);
consumeToken();
this.completionNode.addCompletionFlags(CompletionOnJavadoc.TEXT);
if (this.inlineTagStarted) {
this.completionNode.addCompletionFlags(CompletionOnJavadoc.FORMAL_REFERENCE);
} else {
verifyCompletionInJavadoc(source, "Obj");
assertCompletionNodeResult(source,
"<CompletionOnJavadocSingleTypeReference:Obj\n" +
" infos:text,formal reference\n" +
" infos:formal reference\n" +
">"
);
"BasicTestBugs.Inner.Level2[TYPE_REF]{Level2, bugs.b118397, Lbugs.b118397.BasicTestBugs$Inner$Level2;, null, null, "+this.positions+R_DICNR+"}"
/**
* Bug 144866: [assist][javadoc] Wrong completion inside @value tag
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=144866"
*/
public void testBug144866() throws JavaModelException {
String source =
"package bugs.b144866;\n" +
"public class BasicTestBugs {\n" +
" public static int EXAMPLE = 0;\n" +
" /**\n" +
" * This method returns an object\n" +
" * @see Object\n" +
" * This method will use {@value #EX } constant value...\n" +
" */\n" +
" public void foo() {\n" +
" }\n" +
"}\n";
completeInJavadoc("/Completion/src/bugs/b144866/BasicTestBugs.java", source, true, "EX", 2); // 2nd occurence
assertSortedResults(
"EXAMPLE[FIELD_REF]{EXAMPLE, Lbugs.b144866.BasicTestBugs;, I, EXAMPLE, null, "+this.positions+R_DICNR+"}"
" int foo;\n" +
"}";
completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "#fo");
completeInJavadoc("/Completion/src/javadoc/text/BasicTestTextIns.java", source, true, "fo");
"foo[JAVADOC_FIELD_REF]{{@link #foo}, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNSIT+"}"
"foo[FIELD_REF]{foo, Ljavadoc.text.BasicTestTextIns;, I, foo, null, "+this.positions+R_DICNRNS+"}"