Lines 508-520
Link Here
|
508 |
boolean valid = false; |
508 |
boolean valid = false; |
509 |
switch (firstChar) { |
509 |
switch (firstChar) { |
510 |
case 'a': |
510 |
case 'a': |
511 |
if (length == TAG_AUTHOR_LENGTH && CharOperation.equals(TAG_AUTHOR, tagName, 0, length)) { |
511 |
if (!this.inlineTagStarted && length == TAG_AUTHOR_LENGTH && CharOperation.equals(TAG_AUTHOR, tagName, 0, length)) { |
512 |
this.tagValue = TAG_AUTHOR_VALUE; |
512 |
this.tagValue = TAG_AUTHOR_VALUE; |
513 |
this.tagWaitingForDescription = this.tagValue; |
513 |
this.tagWaitingForDescription = this.tagValue; |
514 |
} |
514 |
} |
515 |
break; |
515 |
break; |
516 |
case 'c': |
516 |
case 'c': |
517 |
if (length == TAG_CATEGORY_LENGTH && CharOperation.equals(TAG_CATEGORY, tagName, 0, length)) { |
517 |
if (!this.inlineTagStarted && length == TAG_CATEGORY_LENGTH && CharOperation.equals(TAG_CATEGORY, tagName, 0, length)) { |
518 |
this.tagValue = TAG_CATEGORY_VALUE; |
518 |
this.tagValue = TAG_CATEGORY_VALUE; |
519 |
valid = parseIdentifierTag(false); // TODO (frederic) reconsider parameter value when @category will be significant in spec |
519 |
valid = parseIdentifierTag(false); // TODO (frederic) reconsider parameter value when @category will be significant in spec |
520 |
} else if (length == TAG_CODE_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_CODE, tagName, 0, length)) { |
520 |
} else if (length == TAG_CODE_LENGTH && this.inlineTagStarted && CharOperation.equals(TAG_CODE, tagName, 0, length)) { |
Lines 523-529
Link Here
|
523 |
} |
523 |
} |
524 |
break; |
524 |
break; |
525 |
case 'd': |
525 |
case 'd': |
526 |
if (length == TAG_DEPRECATED_LENGTH && CharOperation.equals(TAG_DEPRECATED, tagName, 0, length)) { |
526 |
if (!this.inlineTagStarted && length == TAG_DEPRECATED_LENGTH && CharOperation.equals(TAG_DEPRECATED, tagName, 0, length)) { |
527 |
this.deprecated = true; |
527 |
this.deprecated = true; |
528 |
valid = true; |
528 |
valid = true; |
529 |
this.tagValue = TAG_DEPRECATED_VALUE; |
529 |
this.tagValue = TAG_DEPRECATED_VALUE; |
Lines 536-542
Link Here
|
536 |
} |
536 |
} |
537 |
break; |
537 |
break; |
538 |
case 'e': |
538 |
case 'e': |
539 |
if (length == TAG_EXCEPTION_LENGTH && CharOperation.equals(TAG_EXCEPTION, tagName, 0, length)) { |
539 |
if (!this.inlineTagStarted && length == TAG_EXCEPTION_LENGTH && CharOperation.equals(TAG_EXCEPTION, tagName, 0, length)) { |
540 |
this.tagValue = TAG_EXCEPTION_VALUE; |
540 |
this.tagValue = TAG_EXCEPTION_VALUE; |
541 |
valid = parseThrows(); |
541 |
valid = parseThrows(); |
542 |
} |
542 |
} |
Lines 595-640
Link Here
|
595 |
} |
595 |
} |
596 |
break; |
596 |
break; |
597 |
case 'p': |
597 |
case 'p': |
598 |
if (length == TAG_PARAM_LENGTH && CharOperation.equals(TAG_PARAM, tagName, 0, length)) { |
598 |
if (!this.inlineTagStarted && length == TAG_PARAM_LENGTH && CharOperation.equals(TAG_PARAM, tagName, 0, length)) { |
599 |
this.tagValue = TAG_PARAM_VALUE; |
599 |
this.tagValue = TAG_PARAM_VALUE; |
600 |
valid = parseParam(); |
600 |
valid = parseParam(); |
601 |
} |
601 |
} |
602 |
break; |
602 |
break; |
603 |
case 'r': |
603 |
case 'r': |
604 |
if (length == TAG_RETURN_LENGTH && CharOperation.equals(TAG_RETURN, tagName, 0, length)) { |
604 |
if (!this.inlineTagStarted && length == TAG_RETURN_LENGTH && CharOperation.equals(TAG_RETURN, tagName, 0, length)) { |
605 |
this.tagValue = TAG_RETURN_VALUE; |
605 |
this.tagValue = TAG_RETURN_VALUE; |
606 |
valid = parseReturn(); |
606 |
valid = parseReturn(); |
607 |
} |
607 |
} |
608 |
break; |
608 |
break; |
609 |
case 's': |
609 |
case 's': |
610 |
if (length == TAG_SEE_LENGTH && CharOperation.equals(TAG_SEE, tagName, 0, length)) { |
610 |
if (!this.inlineTagStarted) { |
611 |
if (this.inlineTagStarted) { |
611 |
if (length == TAG_SEE_LENGTH && CharOperation.equals(TAG_SEE, tagName, 0, length)) { |
612 |
// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53290 |
|
|
613 |
// Cannot have @see inside inline comment |
614 |
valid = false; |
615 |
if (this.reportProblems) { |
616 |
this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd); |
617 |
} |
618 |
} else { |
619 |
this.tagValue = TAG_SEE_VALUE; |
612 |
this.tagValue = TAG_SEE_VALUE; |
620 |
valid = parseReference(); |
613 |
valid = parseReference(); |
621 |
} |
614 |
} else if (length == TAG_SERIAL_LENGTH && CharOperation.equals(TAG_SERIAL, tagName, 0, length)) { |
622 |
} else if (length == TAG_SERIAL_LENGTH && CharOperation.equals(TAG_SERIAL, tagName, 0, length)) { |
615 |
this.tagValue = TAG_SERIAL_VALUE; |
623 |
this.tagValue = TAG_SERIAL_VALUE; |
616 |
this.tagWaitingForDescription = this.tagValue; |
624 |
this.tagWaitingForDescription = this.tagValue; |
617 |
} else if (length == TAG_SERIAL_DATA_LENGTH && CharOperation.equals(TAG_SERIAL_DATA, tagName, 0, length)) { |
625 |
} else if (length == TAG_SERIAL_DATA_LENGTH && CharOperation.equals(TAG_SERIAL_DATA, tagName, 0, length)) { |
618 |
this.tagValue = TAG_SERIAL_DATA_VALUE; |
626 |
this.tagValue = TAG_SERIAL_DATA_VALUE; |
619 |
this.tagWaitingForDescription = this.tagValue; |
627 |
this.tagWaitingForDescription = this.tagValue; |
620 |
} else if (length == TAG_SERIAL_FIELD_LENGTH && CharOperation.equals(TAG_SERIAL_FIELD, tagName, 0, length)) { |
628 |
} else if (length == TAG_SERIAL_FIELD_LENGTH && CharOperation.equals(TAG_SERIAL_FIELD, tagName, 0, length)) { |
621 |
this.tagValue = TAG_SERIAL_FIELD_VALUE; |
629 |
this.tagValue = TAG_SERIAL_FIELD_VALUE; |
622 |
this.tagWaitingForDescription = this.tagValue; |
630 |
this.tagWaitingForDescription = this.tagValue; |
623 |
} else if (length == TAG_SINCE_LENGTH && CharOperation.equals(TAG_SINCE, tagName, 0, length)) { |
631 |
} else if (length == TAG_SINCE_LENGTH && CharOperation.equals(TAG_SINCE, tagName, 0, length)) { |
624 |
this.tagValue = TAG_SINCE_VALUE; |
632 |
this.tagValue = TAG_SINCE_VALUE; |
625 |
this.tagWaitingForDescription = this.tagValue; |
633 |
this.tagWaitingForDescription = this.tagValue; |
626 |
} |
634 |
} |
627 |
} |
635 |
break; |
628 |
break; |
636 |
case 't': |
629 |
case 't': |
637 |
if (length == TAG_THROWS_LENGTH && CharOperation.equals(TAG_THROWS, tagName, 0, length)) { |
630 |
if (!this.inlineTagStarted && length == TAG_THROWS_LENGTH && CharOperation.equals(TAG_THROWS, tagName, 0, length)) { |
638 |
this.tagValue = TAG_THROWS_VALUE; |
631 |
this.tagValue = TAG_THROWS_VALUE; |
639 |
valid = parseThrows(); |
632 |
valid = parseThrows(); |
640 |
} |
633 |
} |
Lines 664-670
Link Here
|
664 |
if (this.reportProblems) this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd); |
657 |
if (this.reportProblems) this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd); |
665 |
} |
658 |
} |
666 |
} |
659 |
} |
667 |
} else if (length == TAG_VERSION_LENGTH && CharOperation.equals(TAG_VERSION, tagName, 0, length)) { |
660 |
} else if (!this.inlineTagStarted && length == TAG_VERSION_LENGTH && CharOperation.equals(TAG_VERSION, tagName, 0, length)) { |
668 |
this.tagValue = TAG_VERSION_VALUE; |
661 |
this.tagValue = TAG_VERSION_VALUE; |
669 |
this.tagWaitingForDescription = this.tagValue; |
662 |
this.tagWaitingForDescription = this.tagValue; |
670 |
} else { |
663 |
} else { |
Lines 679-684
Link Here
|
679 |
if (this.tagValue != TAG_OTHERS_VALUE && !this.inlineTagStarted) { |
672 |
if (this.tagValue != TAG_OTHERS_VALUE && !this.inlineTagStarted) { |
680 |
this.lastBlockTagValue = this.tagValue; |
673 |
this.lastBlockTagValue = this.tagValue; |
681 |
} |
674 |
} |
|
|
675 |
if (this.inlineTagStarted && this.reportProblems |
676 |
&& (this.tagValue >= JAVADOC_TAG_TYPE.length || JAVADOC_TAG_TYPE[this.tagValue] != TAG_TYPE_INLINE)) { |
677 |
this.sourceParser.problemReporter().javadocUnexpectedTag(this.tagSourceStart, this.tagSourceEnd); |
678 |
} |
682 |
return valid; |
679 |
return valid; |
683 |
} |
680 |
} |
684 |
|
681 |
|