Skip to content

Commit 61e3087

Browse files
resolved the JavaDocTypeCompletionModel issue
1 parent 3109526 commit 61e3087

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,28 +1592,30 @@ else if (this.tagValue == TAG_VALUE_VALUE) {
15921592
break nextToken;
15931593
case TokenNameUNDERSCORE:
15941594
case TokenNameIdentifier :
1595-
char[] identifier = this.scanner.getCurrentIdentifierSource();
1596-
int pos = this.scanner.getCurrentTokenStartPosition() - 1;
1597-
while (pos >= 0 && Character.isWhitespace(this.source[pos])) {
1598-
pos--;
1599-
}
1600-
if (pos >= 0 && this.source[pos] == '(') {
1601-
if (isURLScheme(identifier)) {
1602-
if (isFollowedByURLPattern()) {
1603-
if (typeRef == null) {
1604-
int currStartPos = this.scanner.startPosition;
1605-
typeRefStartPosition = this.scanner.getCurrentTokenStartPosition();
1606-
typeRef = parseURLReference(true);
1607-
checkMarkdownLinkSyntaxValid(currStartPos, true);
1608-
if (this.abort) return false;
1595+
if (this.markdown) {
1596+
char[] identifier = this.scanner.getCurrentIdentifierSource();
1597+
int pos1 = this.scanner.getCurrentTokenStartPosition() - 1;
1598+
while (pos1 >= 0 && Character.isWhitespace(this.source[pos1])) {
1599+
pos1--;
1600+
}
1601+
if (pos1 >= 0 && this.source[pos1] == '(') {
1602+
if (isURLScheme(identifier)) {
1603+
if (isFollowedByURLPattern()) {
1604+
if (typeRef == null) {
1605+
int currStartPos = this.scanner.startPosition;
1606+
typeRefStartPosition = this.scanner.getCurrentTokenStartPosition();
1607+
typeRef = parseURLReference(true);
1608+
checkMarkdownLinkSyntaxValid(currStartPos, true);
1609+
if (this.abort) return false;
1610+
}
16091611
}
1612+
} else if (this.source[this.scanner.getCurrentTokenEndPosition() +1 ] == '.') { //$NON-NLS-1$
1613+
int currStartPos = this.scanner.startPosition;
1614+
typeRefStartPosition = this.scanner.getCurrentTokenStartPosition();
1615+
typeRef = parseURLReference(false);
1616+
checkMarkdownLinkSyntaxValid(currStartPos, true);
1617+
if (this.abort) return false;
16101618
}
1611-
} else if (this.source[this.scanner.getCurrentTokenEndPosition() +1 ] == '.') { //$NON-NLS-1$
1612-
int currStartPos = this.scanner.startPosition;
1613-
typeRefStartPosition = this.scanner.getCurrentTokenStartPosition();
1614-
typeRef = parseURLReference(false);
1615-
checkMarkdownLinkSyntaxValid(currStartPos, true);
1616-
if (this.abort) return false;
16171619
}
16181620
}
16191621
if (typeRef == null) {

0 commit comments

Comments
 (0)