Lines 675-680
Link Here
|
675 |
try { //get the next char |
675 |
try { //get the next char |
676 |
boolean isJavadoc = false, star = false; |
676 |
boolean isJavadoc = false, star = false; |
677 |
boolean isUnicode = false; |
677 |
boolean isUnicode = false; |
|
|
678 |
int previous; |
678 |
// consume next character |
679 |
// consume next character |
679 |
this.unicodeAsBackSlash = false; |
680 |
this.unicodeAsBackSlash = false; |
680 |
if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') |
681 |
if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') |
Lines 701-706
Link Here
|
701 |
} |
702 |
} |
702 |
} |
703 |
} |
703 |
isUnicode = false; |
704 |
isUnicode = false; |
|
|
705 |
previous = this.currentPosition; |
704 |
if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') |
706 |
if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') |
705 |
&& (this.source[this.currentPosition] == 'u')) { |
707 |
&& (this.source[this.currentPosition] == 'u')) { |
706 |
//-------------unicode traitement ------------ |
708 |
//-------------unicode traitement ------------ |
Lines 718-724
Link Here
|
718 |
if (this.currentCharacter == '/') { |
720 |
if (this.currentCharacter == '/') { |
719 |
isJavadoc = false; |
721 |
isJavadoc = false; |
720 |
} |
722 |
} |
721 |
//loop until end of comment */ |
723 |
//loop until end of comment */ |
|
|
724 |
int firstTag = 0; |
722 |
while ((this.currentCharacter != '/') || (!star)) { |
725 |
while ((this.currentCharacter != '/') || (!star)) { |
723 |
if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) { |
726 |
if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) { |
724 |
//checkNonExternalizedString(); |
727 |
//checkNonExternalizedString(); |
Lines 728-735
Link Here
|
728 |
} |
731 |
} |
729 |
} |
732 |
} |
730 |
} |
733 |
} |
731 |
star = this.currentCharacter == '*'; |
734 |
|
|
|
735 |
switch (this.currentCharacter) { |
736 |
case '*': |
737 |
star = true; |
738 |
break; |
739 |
case '@': |
740 |
if (firstTag == 0 && this.isFirstTag()) { |
741 |
firstTag = previous; |
742 |
} |
743 |
// fall through default case to set star to false |
744 |
default: |
745 |
star = false; |
746 |
} |
732 |
//get next char |
747 |
//get next char |
|
|
748 |
previous = this.currentPosition; |
733 |
if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') |
749 |
if (((this.currentCharacter = this.source[this.currentPosition++]) == '\\') |
734 |
&& (this.source[this.currentPosition] == 'u')) { |
750 |
&& (this.source[this.currentPosition] == 'u')) { |
735 |
//-------------unicode traitement ------------ |
751 |
//-------------unicode traitement ------------ |
Lines 746-751
Link Here
|
746 |
} |
762 |
} |
747 |
int token = isJavadoc ? TokenNameCOMMENT_JAVADOC : TokenNameCOMMENT_BLOCK; |
763 |
int token = isJavadoc ? TokenNameCOMMENT_JAVADOC : TokenNameCOMMENT_BLOCK; |
748 |
recordComment(token); |
764 |
recordComment(token); |
|
|
765 |
this.commentTagStarts[this.commentPtr] = firstTag; |
749 |
if (!isJavadoc && this.startPosition <= this.cursorLocation && this.cursorLocation < this.currentPosition-1){ |
766 |
if (!isJavadoc && this.startPosition <= this.cursorLocation && this.cursorLocation < this.currentPosition-1){ |
750 |
throw new InvalidCursorLocation(InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT); |
767 |
throw new InvalidCursorLocation(InvalidCursorLocation.NO_COMPLETION_INSIDE_COMMENT); |
751 |
} |
768 |
} |
Lines 810-815
Link Here
|
810 |
throw new InvalidCursorLocation(InvalidCursorLocation.NO_COMPLETION_INSIDE_UNICODE); |
827 |
throw new InvalidCursorLocation(InvalidCursorLocation.NO_COMPLETION_INSIDE_UNICODE); |
811 |
} |
828 |
} |
812 |
} |
829 |
} |
|
|
830 |
protected boolean isFirstTag() { |
831 |
return |
832 |
getNextChar('d') && |
833 |
getNextChar('e') && |
834 |
getNextChar('p') && |
835 |
getNextChar('r') && |
836 |
getNextChar('e') && |
837 |
getNextChar('c') && |
838 |
getNextChar('a') && |
839 |
getNextChar('t') && |
840 |
getNextChar('e') && |
841 |
getNextChar('d'); |
842 |
} |
813 |
public final void jumpOverBlock() { |
843 |
public final void jumpOverBlock() { |
814 |
this.jumpOverMethodBody(); |
844 |
this.jumpOverMethodBody(); |
815 |
} |
845 |
} |