Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chandra2019-01-29 04:55:35 +0000
committerVikas Chandra2019-01-31 04:25:02 +0000
commit3a41f2265acb2ca01fd8464379f43386e2835fa2 (patch)
tree3de47dbe2650209acdee6caa4bba6bade5653c4a /org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser
parentda04d8f1a677de7cdd83e4f378142a452cdb2bd0 (diff)
downloadeclipse.jdt.core-3a41f2265acb2ca01fd8464379f43386e2835fa2.tar.gz
eclipse.jdt.core-3a41f2265acb2ca01fd8464379f43386e2835fa2.tar.xz
eclipse.jdt.core-3a41f2265acb2ca01fd8464379f43386e2835fa2.zip
Bug 543873 - [12][javadoc] Provide a new inline tag {@systemProperty
property-name} Change-Id: Iaf827f34ff5ce552c489f334946d3aea71d879e4 Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java40
1 files changed, 33 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
index 677874c917..91068fbde9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/JavadocCompletionParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -8,6 +8,10 @@
*
* SPDX-License-Identifier: EPL-2.0
*
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -173,11 +177,16 @@ protected void verifyAllTagsCompletion() {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE
};
- } else if(this.complianceLevel > ClassFileConstants.JDK1_4) {
+ } else if(this.complianceLevel > ClassFileConstants.JDK1_4 && this.complianceLevel < ClassFileConstants.JDK12) {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
TAG_CODE, TAG_LITERAL
};
+ } else if(this.complianceLevel >= ClassFileConstants.JDK12) {
+ additionalTags = new char[][] {
+ TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
+ TAG_CODE, TAG_LITERAL, TAG_SYSTEM_PROPERTY
+ };
}
if (additionalTags != null) {
int length = allTags.length;
@@ -268,11 +277,16 @@ public void test006() {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE
};
- } else if (this.complianceLevel > ClassFileConstants.JDK1_4) {
+ } else if(this.complianceLevel > ClassFileConstants.JDK1_4 && this.complianceLevel < ClassFileConstants.JDK12) {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
TAG_CODE, TAG_LITERAL
};
+ } else if(this.complianceLevel >= ClassFileConstants.JDK12) {
+ additionalTags = new char[][] {
+ TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
+ TAG_CODE, TAG_LITERAL, TAG_SYSTEM_PROPERTY
+ };
}
if (additionalTags != null) {
int length = allTags.length;
@@ -411,7 +425,9 @@ public void test020() {
" */\n" +
"public class Test {}\n";
verifyCompletionInJavadoc(source, "@s");
- verifyCompletionOnJavadocTag("s".toCharArray(), new char[][] { TAG_SEE, TAG_SINCE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD }, false);
+ char[][] expectedTags = {TAG_SEE, TAG_SINCE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD};
+ char[][] expectedTags12Plus = {TAG_SEE, TAG_SINCE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD,TAG_SYSTEM_PROPERTY};
+ verifyCompletionOnJavadocTag("s".toCharArray(),this.complianceLevel >= ClassFileConstants.JDK12 ? expectedTags12Plus : expectedTags, false);
CompletionOnJavadocTag completionTag = (CompletionOnJavadocTag) this.javadoc.getCompletionNode();
assertEquals("Invalid tag start position", 24, completionTag.tagSourceStart);
assertEquals("Invalid tag end position", 28, completionTag.tagSourceEnd+1);
@@ -489,12 +505,16 @@ public void test025() {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE
};
- }
- else if (this.complianceLevel > ClassFileConstants.JDK1_4) {
+ }else if (this.complianceLevel > ClassFileConstants.JDK1_4 && this.complianceLevel < ClassFileConstants.JDK12) {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
TAG_CODE, TAG_LITERAL
};
+ }else if (this.complianceLevel >= ClassFileConstants.JDK12) {
+ additionalTags = new char[][] {
+ TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
+ TAG_CODE, TAG_LITERAL, TAG_SYSTEM_PROPERTY
+ };
}
if (additionalTags != null) {
int length = allTags.length;
@@ -564,12 +584,18 @@ public void test028() {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE
};
}
- else if (this.complianceLevel > ClassFileConstants.JDK1_4) {
+ else if(this.complianceLevel > ClassFileConstants.JDK1_4 && this.complianceLevel < ClassFileConstants.JDK12) {
additionalTags = new char[][] {
TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
TAG_CODE, TAG_LITERAL
};
+ } else if(this.complianceLevel >= ClassFileConstants.JDK12) {
+ additionalTags = new char[][] {
+ TAG_INHERITDOC, TAG_LINKPLAIN, TAG_VALUE,
+ TAG_CODE, TAG_LITERAL, TAG_SYSTEM_PROPERTY
+ };
}
+
if (additionalTags != null) {
int length = allTags.length;
int add = additionalTags.length;

Back to the top