Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptff2004-02-12 14:29:51 +0000
committerptff2004-02-12 14:29:51 +0000
commit0fb8e6d8cd5771230b88c7189dc0d95f3a5da0e3 (patch)
treee21d6e0db9d4b5227fd8a177f568d25a310d70f4 /org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
parent1dbf45ade1eaa8473579771e92825a7887776253 (diff)
downloadeclipse.jdt.core-0fb8e6d8cd5771230b88c7189dc0d95f3a5da0e3.tar.gz
eclipse.jdt.core-0fb8e6d8cd5771230b88c7189dc0d95f3a5da0e3.tar.xz
eclipse.jdt.core-0fb8e6d8cd5771230b88c7189dc0d95f3a5da0e3.zip
51476, 51478, 51626, 51650, 51770
Diffstat (limited to 'org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java')
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
index 9ef89307fa..dec3fb0e88 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
@@ -271,10 +271,25 @@ class DocCommentParser extends AbstractCommentParser {
*/
protected boolean parseTag() {
TagElement tag = this.ast.newTagElement();
- int length = this.scanner.currentPosition-this.tagSourceStart;
- tag.setTagName(new String(this.source, this.tagSourceStart, length));
- tag.setSourceRange(this.tagSourceStart, length);
- pushOnAstStack(tag, true);
+ int start = this.tagSourceStart;
+ tag.setTagName(new String(this.source, start, this.tagSourceEnd-start+1));
+ if (this.inlineTagStarted) {
+ start = this.inlineTagStart;
+ TagElement previousTag = null;
+ if (this.astPtr == -1) {
+ previousTag = this.ast.newTagElement();
+ previousTag.setSourceRange(start, this.tagSourceEnd-start+1);
+ pushOnAstStack(previousTag, true);
+ } else {
+ previousTag = (TagElement) this.astStack[this.astPtr];
+ }
+ int previousStart = previousTag.getStartPosition();
+ previousTag.fragments().add(tag);
+ previousTag.setSourceRange(previousStart, this.tagSourceEnd-previousStart+1);
+ } else {
+ pushOnAstStack(tag, true);
+ }
+ tag.setSourceRange(start, this.tagSourceEnd-start+1);
return true;
}
@@ -356,6 +371,7 @@ class DocCommentParser extends AbstractCommentParser {
}
previousTag.fragments().add(text);
previousTag.setSourceRange(previousStart, end-previousStart+1);
+ this.textStart = -1;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#pushText(int, int)

Back to the top