Bug 578523 - [18][javadoc] provide support for multiple annotations
within @snippet

This change is to provide proper start and end of the attributes.

Change-Id: Iad4f27087ba6fabd3db12ff8b03cc91abb69b16c
Signed-off-by: Kalyan Prasad Tatavarthi <kalyan_prasad@in.ibm.com>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/191184
Tested-by: JDT Bot <jdt-bot@eclipse.org>
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
index 02a0320..0c8ffee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
@@ -1742,7 +1742,7 @@
 												if (breakToMainSwitch)
 													break mainSwitch;
 											}
-											tokenEnd = tokenStart + slScanner.getCurrentTokenEndPosition();
+											tokenEnd = commentStart + 1 + slScanner.getCurrentTokenEndPosition();
 											inlineTag = createSnippetInnerTag(newTagName, tokenStart, tokenEnd);
 											addTagProperties(inlineTag, map);
 											inlineTags.add(inlineTag);
@@ -1838,7 +1838,7 @@
 											if (!hasReplacementStr) {
 												return inlineTag;
 											}
-											tokenEnd = tokenStart + slScanner.getCurrentTokenEndPosition();
+											tokenEnd = commentStart + 1 + slScanner.getCurrentTokenEndPosition();
 											inlineTag = createSnippetInnerTag(newTagName, tokenStart, tokenEnd);
 											addTagProperties(inlineTag, map);
 											inlineTags.add(inlineTag);