Lines 11-16
Link Here
|
11 |
package org.eclipse.jdt.core.tests.compiler.parser; |
11 |
package org.eclipse.jdt.core.tests.compiler.parser; |
12 |
|
12 |
|
13 |
import java.util.Locale; |
13 |
import java.util.Locale; |
|
|
14 |
import java.util.Map; |
14 |
import java.util.StringTokenizer; |
15 |
import java.util.StringTokenizer; |
15 |
|
16 |
|
16 |
import junit.framework.Test; |
17 |
import junit.framework.Test; |
Lines 41-46
Link Here
|
41 |
} |
42 |
} |
42 |
|
43 |
|
43 |
CompletionJavadoc javadoc; |
44 |
CompletionJavadoc javadoc; |
|
|
45 |
String sourceLevel; |
44 |
|
46 |
|
45 |
public JavadocCompletionParserTest(String testName) { |
47 |
public JavadocCompletionParserTest(String testName) { |
46 |
super(testName); |
48 |
super(testName); |
Lines 61-66
Link Here
|
61 |
*/ |
63 |
*/ |
62 |
protected void setUp() throws Exception { |
64 |
protected void setUp() throws Exception { |
63 |
super.setUp(); |
65 |
super.setUp(); |
|
|
66 |
this.sourceLevel = null; |
64 |
} |
67 |
} |
65 |
|
68 |
|
66 |
protected void assertCompletionNodeResult(String source, String expected) { |
69 |
protected void assertCompletionNodeResult(String source, String expected) { |
Lines 82-88
Link Here
|
82 |
actual |
85 |
actual |
83 |
); |
86 |
); |
84 |
} |
87 |
} |
85 |
|
88 |
protected Map getCompilerOptions() { |
|
|
89 |
Map options = super.getCompilerOptions(); |
90 |
if (this.sourceLevel == null) { |
91 |
return options; |
92 |
} |
93 |
options.put(CompilerOptions.OPTION_Source, this.sourceLevel); |
94 |
return options; |
95 |
} |
86 |
protected void verifyCompletionInJavadoc(String source, String after) { |
96 |
protected void verifyCompletionInJavadoc(String source, String after) { |
87 |
CompilerOptions options = new CompilerOptions(getCompilerOptions()); |
97 |
CompilerOptions options = new CompilerOptions(getCompilerOptions()); |
88 |
CompletionParser parser = new CompletionParser(new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(), |
98 |
CompletionParser parser = new CompletionParser(new ProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(), |
Lines 283-288
Link Here
|
283 |
verifyCompletionInJavadoc(source, "@"); |
293 |
verifyCompletionInJavadoc(source, "@"); |
284 |
verifyAllTagsCompletion(); |
294 |
verifyAllTagsCompletion(); |
285 |
} |
295 |
} |
|
|
296 |
/** |
297 |
* @bug [javadoc][assist] @linkplain no longer proposed when 1.4 compliance is used |
298 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=123096" |
299 |
*/ |
300 |
public void test008() { |
301 |
this.sourceLevel = CompilerOptions.VERSION_1_3; |
302 |
String source = "package javadoc;\n" + |
303 |
"/**\n" + |
304 |
" * Completion on empty tag name:\n" + |
305 |
" * @\n" + |
306 |
" */\n" + |
307 |
"public class Test {}\n"; |
308 |
verifyCompletionInJavadoc(source, "@"); |
309 |
verifyAllTagsCompletion(); |
310 |
} |
286 |
|
311 |
|
287 |
/** |
312 |
/** |
288 |
* @tests Tests to verify completion node flags |
313 |
* @tests Tests to verify completion node flags |