diff options
author | Frederic Fusier | 2006-01-31 10:03:20 +0000 |
---|---|---|
committer | Frederic Fusier | 2006-01-31 10:03:20 +0000 |
commit | 640dca164a379d10390fa11e5cf245ab3efaf152 (patch) | |
tree | c944ddb4ef40d32cab2dba9e85f5ecabc5964f5c /org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java | |
parent | 1ddaa88ca7b93ac6c1dc13d6d1d7c697fa81b2a7 (diff) | |
download | eclipse.jdt.core-640dca164a379d10390fa11e5cf245ab3efaf152.tar.gz eclipse.jdt.core-640dca164a379d10390fa11e5cf245ab3efaf152.tar.xz eclipse.jdt.core-640dca164a379d10390fa11e5cf245ab3efaf152.zip |
HEAD - 125676
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.java | 55 |
1 files changed, 22 insertions, 33 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 083a086cfe..c79783efd2 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 @@ -204,40 +204,16 @@ class DocCommentParser extends AbstractCommentParser { */ protected void createTag() { TagElement tagElement = this.ast.newTagElement(); + int position = this.scanner.currentPosition; + this.scanner.resetTo(this.tagSourceStart, this.tagSourceEnd); + StringBuffer tagName = new StringBuffer(); int start = this.tagSourceStart; - String tagName = new String(this.source, start, this.tagSourceEnd-start+1); - switch (tagName.charAt(0)) { - case 'a': - if (tagName.equals(TagElement.TAG_AUTHOR)) { - tagName = TagElement.TAG_AUTHOR; - } - break; - case 'd': - if (tagName.equals(TagElement.TAG_DOCROOT)) { - tagName = TagElement.TAG_DOCROOT; - } - break; - case 'r': - if (tagName.equals(TagElement.TAG_RETURN)) { - tagName = TagElement.TAG_RETURN; - } - break; - case 's': - if (tagName.equals(TagElement.TAG_SERIAL)) { - tagName = TagElement.TAG_SERIAL; - } else if (tagName.equals(TagElement.TAG_SERIALDATA)) { - tagName = TagElement.TAG_SERIALDATA; - } else if (tagName.equals(TagElement.TAG_SERIALFIELD)) { - tagName = TagElement.TAG_SERIALFIELD; - } - break; - case 'v': - if (tagName.equals(TagElement.TAG_VERSION)) { - tagName = TagElement.TAG_VERSION; - } - break; + this.scanner.getNextChar(); + while (this.scanner.currentPosition <= (this.tagSourceEnd+1)) { + tagName.append(this.scanner.currentCharacter); + this.scanner.getNextChar(); } - tagElement.setTagName(tagName); + tagElement.setTagName(tagName.toString()); if (this.inlineTagStarted) { start = this.inlineTagStart; TagElement previousTag = null; @@ -255,7 +231,7 @@ class DocCommentParser extends AbstractCommentParser { pushOnAstStack(tagElement, true); } tagElement.setSourceRange(start, this.tagSourceEnd-start+1); -// return true; + this.scanner.resetTo(position, this.javadocEnd); } /* (non-Javadoc) @@ -343,6 +319,19 @@ class DocCommentParser extends AbstractCommentParser { } /* (non-Javadoc) + * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseIdentifierTag(boolean) + */ + protected boolean parseIdentifierTag(boolean report) { + if (super.parseIdentifierTag(report)) { + createTag(); + this.index = this.tagSourceEnd+1; + this.scanner.resetTo(this.index, this.javadocEnd); + return true; + } + return false; + } + + /* (non-Javadoc) * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseTag(int) */ protected boolean parseTag(int previousPosition) throws InvalidInputException { |