mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[javadoc] IDEA-241299 Support the @index Standard Doclet tag
Fix the parser when a phrase in the `index` javadoc tag consists of multi lines. Such phrases should ignore leading asterisks and long whitespaces and need to be concatenated. GitOrigin-RevId: 5366b61a80cfd24a092dc8f5a6a9a6673995059b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
76741b3198
commit
250eae64c8
@@ -55,6 +55,7 @@ import com.intellij.util.containers.ContainerUtil;
|
||||
import kotlin.text.StringsKt;
|
||||
import org.jdom.Element;
|
||||
import org.jdom.JDOMException;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -1544,13 +1545,7 @@ public class JavaDocInfoGenerator {
|
||||
generateValueValue(tag, buffer, element);
|
||||
}
|
||||
else if (tagName.equals(INDEX_TAG)) {
|
||||
final PsiDocTagValue indexTagValue = PsiTreeUtil.findChildOfType(tag, PsiDocTagValue.class);
|
||||
if (indexTagValue != null) {
|
||||
final HtmlChunk.Element text = new HtmlBuilder()
|
||||
.append(indexTagValue.getText())
|
||||
.wrapWith("i");
|
||||
buffer.append(text);
|
||||
}
|
||||
generateIndexValue(buffer, tag);
|
||||
}
|
||||
else if (tagName.equals(SUMMARY_TAG)) {
|
||||
generateSummaryValue(buffer, tag);
|
||||
@@ -1562,6 +1557,22 @@ public class JavaDocInfoGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
@Contract(mutates = "param1")
|
||||
private static void generateIndexValue(@NotNull StringBuilder buffer, @NotNull PsiInlineDocTag tag) {
|
||||
final PsiDocTagValue indexTagValue = PsiTreeUtil.findChildOfType(tag, PsiDocTagValue.class);
|
||||
if (indexTagValue == null) return;
|
||||
|
||||
final ASTNode[] valuesTokens = indexTagValue.getNode().getChildren(TokenSet.create(JavaDocTokenType.DOC_TAG_VALUE_TOKEN));
|
||||
if (valuesTokens.length == 0) return;
|
||||
|
||||
final StringJoiner indexValue = new StringJoiner(" ");
|
||||
for (ASTNode token : valuesTokens) {
|
||||
indexValue.add(token.getText());
|
||||
}
|
||||
|
||||
buffer.append(indexValue);
|
||||
}
|
||||
|
||||
private static void generateSummaryValue(StringBuilder buffer, PsiInlineDocTag tag) {
|
||||
final ASTNode[] summaryTokens = tag.getNode().getChildren(TokenSet.create(JavaDocTokenType.DOC_COMMENT_DATA));
|
||||
if (summaryTokens.length == 0) return;
|
||||
|
||||
@@ -45,6 +45,6 @@ public interface JavaDocTokenType {
|
||||
TokenSet ALL_JAVADOC_TOKENS = TokenSet.create(
|
||||
DOC_COMMENT_START, DOC_COMMENT_END, DOC_COMMENT_DATA, DOC_SPACE, DOC_COMMENT_LEADING_ASTERISKS, DOC_TAG_NAME,
|
||||
DOC_INLINE_TAG_START, DOC_INLINE_TAG_END, DOC_TAG_VALUE_TOKEN, DOC_TAG_VALUE_DOT, DOC_TAG_VALUE_COMMA,
|
||||
DOC_TAG_VALUE_LPAREN, DOC_TAG_VALUE_RPAREN, DOC_TAG_VALUE_SHARP_TOKEN
|
||||
DOC_TAG_VALUE_LPAREN, DOC_TAG_VALUE_RPAREN, DOC_TAG_VALUE_SHARP_TOKEN, DOC_TAG_VALUE_QUOTE
|
||||
);
|
||||
}
|
||||
@@ -129,10 +129,10 @@ class _JavaDocLexer implements FlexLexer {
|
||||
|
||||
/* The ZZ_CMAP_A table has 3216 entries */
|
||||
static final char ZZ_CMAP_A[] = zzUnpackCMap(
|
||||
"\11\0\1\2\1\1\1\42\1\43\1\1\22\0\1\2\1\0\1\44\1\14\1\4\3\0\1\12\1\13\1\10"+
|
||||
"\11\0\1\2\1\42\1\43\1\44\1\1\22\0\1\2\1\0\1\45\1\14\1\4\3\0\1\12\1\13\1\10"+
|
||||
"\1\0\1\15\1\5\1\3\1\7\12\3\1\5\1\0\1\23\1\0\1\24\1\0\1\16\32\4\1\11\1\0\1"+
|
||||
"\11\1\0\1\4\1\0\1\20\1\4\1\26\1\30\1\31\3\4\1\33\2\4\1\32\1\22\1\35\1\27\1"+
|
||||
"\17\1\4\1\21\1\37\1\34\1\40\2\4\1\36\1\41\1\4\1\25\1\0\1\6\7\0\1\42\14\0\4"+
|
||||
"\17\1\4\1\21\1\37\1\34\1\40\2\4\1\36\1\41\1\4\1\25\1\0\1\6\7\0\1\43\14\0\4"+
|
||||
"\4\4\0\1\4\12\0\1\4\4\0\1\4\5\0\27\4\1\0\12\4\4\0\14\4\16\0\5\4\7\0\1\4\1"+
|
||||
"\0\1\4\1\0\5\4\1\0\2\4\2\0\4\4\1\0\1\4\6\0\1\4\1\0\3\4\1\0\1\4\1\0\4\4\1\0"+
|
||||
"\23\4\1\0\13\4\10\0\6\4\1\0\26\4\2\0\1\4\6\0\10\4\7\0\14\4\5\0\3\4\30\0\1"+
|
||||
@@ -154,7 +154,7 @@ class _JavaDocLexer implements FlexLexer {
|
||||
"\0\2\4\3\0\10\4\10\0\5\4\2\0\22\4\1\0\1\4\5\0\17\4\1\0\16\4\2\0\5\4\13\0\14"+
|
||||
"\4\13\0\1\4\15\0\7\4\7\0\16\4\15\0\2\4\11\0\4\4\1\0\4\4\3\0\2\4\11\0\10\4"+
|
||||
"\1\0\1\4\1\0\1\4\1\0\1\4\1\0\6\4\1\0\7\4\1\0\1\4\3\0\3\4\1\0\7\4\3\0\4\4\2"+
|
||||
"\0\6\4\14\0\2\42\12\0\1\4\14\0\1\4\15\0\1\4\2\0\1\4\4\0\1\4\2\0\12\4\1\0\1"+
|
||||
"\0\6\4\14\0\2\43\12\0\1\4\14\0\1\4\15\0\1\4\2\0\1\4\4\0\1\4\2\0\12\4\1\0\1"+
|
||||
"\4\3\0\5\4\6\0\1\4\1\0\1\4\1\0\1\4\1\0\4\4\1\0\13\4\2\0\4\4\5\0\5\4\4\0\1"+
|
||||
"\4\1\0\5\4\6\0\4\4\3\0\2\4\14\0\7\4\1\0\7\4\6\0\3\4\11\0\11\4\7\0\5\4\2\0"+
|
||||
"\5\4\3\0\7\4\6\0\3\4\12\0\2\4\13\0\11\4\2\0\27\4\2\0\7\4\1\0\3\4\1\0\4\4\1"+
|
||||
@@ -183,11 +183,11 @@ class _JavaDocLexer implements FlexLexer {
|
||||
"\17\0\3\1\1\2\1\3\1\4\2\2\1\5\1\6"+
|
||||
"\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+
|
||||
"\1\17\1\12\1\20\1\1\1\21\1\22\2\21\1\23"+
|
||||
"\1\24\1\12\1\25\1\0\1\26\1\0\10\27\1\30"+
|
||||
"\1\24\2\12\1\25\1\0\1\26\1\0\10\27\1\30"+
|
||||
"\16\27\1\31\3\27\2\32\1\27\1\33\3\27\1\34";
|
||||
|
||||
private static int [] zzUnpackAction() {
|
||||
int [] result = new int[83];
|
||||
int [] result = new int[84];
|
||||
int offset = 0;
|
||||
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -212,20 +212,20 @@ class _JavaDocLexer implements FlexLexer {
|
||||
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
|
||||
|
||||
private static final String ZZ_ROWMAP_PACKED_0 =
|
||||
"\0\0\0\45\0\112\0\157\0\224\0\271\0\336\0\u0103"+
|
||||
"\0\u0128\0\u014d\0\u0172\0\u0197\0\u01bc\0\u01e1\0\u0206\0\u022b"+
|
||||
"\0\u0250\0\u0275\0\u022b\0\u029a\0\u022b\0\u0275\0\u02bf\0\u022b"+
|
||||
"\0\u02e4\0\u0309\0\u032e\0\u0353\0\u0378\0\u022b\0\u022b\0\u022b"+
|
||||
"\0\u022b\0\u022b\0\u039d\0\u022b\0\u03c2\0\u022b\0\u03e7\0\u03e7"+
|
||||
"\0\u0275\0\u040c\0\u022b\0\u0431\0\u022b\0\u0456\0\u022b\0\u0275"+
|
||||
"\0\u047b\0\u04a0\0\u04c5\0\u04ea\0\u050f\0\u0534\0\u0559\0\u057e"+
|
||||
"\0\u022b\0\u05a3\0\u05c8\0\u05ed\0\u0612\0\u0637\0\u065c\0\u0681"+
|
||||
"\0\u06a6\0\u06cb\0\u06f0\0\u0715\0\u073a\0\u075f\0\u0784\0\u04c5"+
|
||||
"\0\u07a9\0\u07ce\0\u07f3\0\u047b\0\u04c5\0\u0818\0\u04c5\0\u083d"+
|
||||
"\0\u0862\0\u0887\0\u04c5";
|
||||
"\0\0\0\46\0\114\0\162\0\230\0\276\0\344\0\u010a"+
|
||||
"\0\u0130\0\u0156\0\u017c\0\u01a2\0\u01c8\0\u01ee\0\u0214\0\u023a"+
|
||||
"\0\u0260\0\u0286\0\u023a\0\u02ac\0\u023a\0\u0286\0\u02d2\0\u023a"+
|
||||
"\0\u02f8\0\u031e\0\u0344\0\u036a\0\u0390\0\u023a\0\u023a\0\u023a"+
|
||||
"\0\u023a\0\u023a\0\u03b6\0\u023a\0\u03dc\0\u023a\0\u0402\0\u0402"+
|
||||
"\0\u0286\0\u0428\0\u023a\0\u044e\0\u0474\0\u023a\0\u049a\0\u023a"+
|
||||
"\0\u0286\0\u04c0\0\u04e6\0\u050c\0\u0532\0\u0558\0\u057e\0\u05a4"+
|
||||
"\0\u05ca\0\u023a\0\u05f0\0\u0616\0\u063c\0\u0662\0\u0688\0\u06ae"+
|
||||
"\0\u06d4\0\u06fa\0\u0720\0\u0746\0\u076c\0\u0792\0\u07b8\0\u07de"+
|
||||
"\0\u050c\0\u0804\0\u082a\0\u0850\0\u04c0\0\u050c\0\u0876\0\u050c"+
|
||||
"\0\u089c\0\u08c2\0\u08e8\0\u050c";
|
||||
|
||||
private static int [] zzUnpackRowMap() {
|
||||
int [] result = new int[83];
|
||||
int [] result = new int[84];
|
||||
int offset = 0;
|
||||
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -248,65 +248,77 @@ class _JavaDocLexer implements FlexLexer {
|
||||
private static final int [] ZZ_TRANS = zzUnpackTrans();
|
||||
|
||||
private static final String ZZ_TRANS_PACKED_0 =
|
||||
"\7\20\1\21\1\22\34\20\1\23\2\24\3\23\1\25"+
|
||||
"\1\23\1\26\5\23\1\27\6\23\1\30\14\23\1\20"+
|
||||
"\1\24\2\23\1\24\1\31\3\23\1\25\1\23\1\26"+
|
||||
"\14\23\1\30\14\23\1\20\1\31\1\23\1\20\2\32"+
|
||||
"\3\20\1\25\1\20\1\22\32\20\1\32\2\20\2\33"+
|
||||
"\5\20\1\22\32\20\1\33\1\20\1\23\2\34\2\35"+
|
||||
"\1\23\1\25\1\23\1\26\1\35\1\36\1\23\1\37"+
|
||||
"\1\40\1\23\4\35\1\41\2\23\14\35\1\20\1\34"+
|
||||
"\1\23\1\20\2\24\2\35\3\20\1\22\1\35\1\20"+
|
||||
"\1\42\1\20\1\40\1\20\4\35\3\20\14\35\1\20"+
|
||||
"\7\20\1\21\1\22\35\20\1\23\2\24\3\23\1\25"+
|
||||
"\1\23\1\26\5\23\1\27\6\23\1\30\14\23\1\24"+
|
||||
"\1\20\1\24\2\23\1\24\1\31\3\23\1\25\1\23"+
|
||||
"\1\26\14\23\1\30\14\23\1\24\1\20\1\31\1\23"+
|
||||
"\1\20\2\32\3\20\1\25\1\20\1\22\31\20\1\32"+
|
||||
"\1\20\1\32\2\20\2\33\5\20\1\22\31\20\1\33"+
|
||||
"\1\20\1\33\1\20\1\23\2\34\2\35\1\23\1\25"+
|
||||
"\1\23\1\26\1\35\1\36\1\23\1\37\1\40\1\23"+
|
||||
"\4\35\1\41\2\23\14\35\1\34\1\20\1\34\1\23"+
|
||||
"\1\20\2\24\2\35\3\20\1\22\1\35\1\20\1\42"+
|
||||
"\1\20\1\40\1\20\4\35\3\20\14\35\1\24\1\20"+
|
||||
"\1\24\5\20\1\43\3\20\1\22\6\20\4\43\1\20"+
|
||||
"\1\44\1\20\14\43\13\20\1\22\5\20\1\45\26\20"+
|
||||
"\1\44\1\20\14\43\14\20\1\22\5\20\1\45\27\20"+
|
||||
"\1\46\1\47\1\50\3\46\1\25\1\46\1\51\14\46"+
|
||||
"\1\30\14\46\1\20\1\47\2\46\1\47\1\50\3\46"+
|
||||
"\1\25\1\46\1\51\31\46\1\20\1\47\1\46\1\20"+
|
||||
"\2\52\5\20\1\22\32\20\1\52\11\20\1\22\33\20"+
|
||||
"\1\53\44\54\1\55\1\20\2\34\3\20\1\25\1\20"+
|
||||
"\1\22\32\20\1\34\1\20\55\0\1\56\43\0\1\57"+
|
||||
"\1\60\35\0\2\24\40\0\1\24\1\0\1\61\2\0"+
|
||||
"\14\61\1\62\23\61\1\0\1\61\2\0\1\31\40\0"+
|
||||
"\1\31\2\0\2\32\40\0\1\32\2\0\2\33\40\0"+
|
||||
"\1\33\2\0\2\34\40\0\1\34\4\0\2\35\4\0"+
|
||||
"\1\35\5\0\4\35\3\0\14\35\6\0\3\43\11\0"+
|
||||
"\4\43\3\0\14\43\3\0\1\63\2\0\3\63\1\0"+
|
||||
"\10\63\1\64\6\63\1\65\3\63\1\66\1\67\3\63"+
|
||||
"\1\70\3\63\1\0\1\63\1\0\2\47\40\0\1\47"+
|
||||
"\2\0\2\52\40\0\1\52\1\0\44\54\11\0\1\71"+
|
||||
"\34\0\1\61\2\0\40\61\1\0\2\61\2\0\15\61"+
|
||||
"\1\72\22\61\1\0\1\61\1\63\2\0\3\63\1\0"+
|
||||
"\34\63\1\0\2\63\2\0\3\63\1\0\11\63\1\73"+
|
||||
"\22\63\1\0\2\63\2\0\3\63\1\0\20\63\1\74"+
|
||||
"\13\63\1\0\2\63\2\0\3\63\1\0\24\63\1\75"+
|
||||
"\7\63\1\0\2\63\2\0\3\63\1\0\26\63\1\76"+
|
||||
"\5\63\1\0\2\63\2\0\3\63\1\0\31\63\1\77"+
|
||||
"\2\63\1\0\1\63\1\61\2\0\16\61\1\100\21\61"+
|
||||
"\1\0\1\61\1\63\2\0\3\63\1\0\12\63\1\101"+
|
||||
"\21\63\1\0\2\63\2\0\3\63\1\0\21\63\1\102"+
|
||||
"\12\63\1\0\2\63\2\0\3\63\1\0\25\63\1\103"+
|
||||
"\6\63\1\0\2\63\2\0\3\63\1\0\21\63\1\104"+
|
||||
"\12\63\1\0\2\63\2\0\3\63\1\0\13\63\1\105"+
|
||||
"\20\63\1\0\1\63\1\61\2\0\15\61\1\106\22\61"+
|
||||
"\1\0\1\61\1\63\2\0\3\63\1\0\11\63\1\107"+
|
||||
"\22\63\1\0\2\63\2\0\3\63\1\0\22\63\1\110"+
|
||||
"\11\63\1\0\2\63\2\0\3\63\1\0\22\63\1\111"+
|
||||
"\11\63\1\0\2\63\2\0\3\63\1\0\22\63\1\112"+
|
||||
"\11\63\1\0\2\63\2\0\3\63\1\0\13\63\1\113"+
|
||||
"\20\63\1\0\1\63\1\61\2\0\17\61\1\114\20\61"+
|
||||
"\1\0\1\61\1\63\2\0\3\63\1\0\13\63\1\115"+
|
||||
"\20\63\1\0\2\63\2\0\3\63\1\0\12\63\1\116"+
|
||||
"\21\63\1\0\2\63\2\0\3\63\1\0\27\63\1\117"+
|
||||
"\4\63\1\0\2\63\2\0\3\63\1\0\11\63\1\120"+
|
||||
"\22\63\1\0\2\63\2\0\3\63\1\0\11\63\1\121"+
|
||||
"\22\63\1\0\2\63\2\0\3\63\1\0\12\63\1\122"+
|
||||
"\21\63\1\0\2\63\2\0\3\63\1\0\23\63\1\110"+
|
||||
"\10\63\1\0\2\63\2\0\3\63\1\0\32\63\1\123"+
|
||||
"\1\63\1\0\1\63";
|
||||
"\1\30\14\46\1\47\1\20\1\47\2\46\1\47\1\50"+
|
||||
"\3\46\1\25\1\46\1\51\31\46\1\47\1\20\1\47"+
|
||||
"\1\46\1\20\2\52\5\20\1\22\31\20\1\52\1\20"+
|
||||
"\1\52\11\20\1\22\34\20\1\53\1\54\2\55\37\54"+
|
||||
"\1\24\1\54\1\55\1\56\1\20\2\34\3\20\1\25"+
|
||||
"\1\20\1\22\31\20\1\34\1\20\1\34\1\20\56\0"+
|
||||
"\1\57\44\0\1\60\1\61\36\0\2\24\37\0\1\24"+
|
||||
"\1\0\1\24\1\0\1\62\2\0\14\62\1\63\22\62"+
|
||||
"\1\0\1\62\1\0\1\62\2\0\1\31\41\0\1\31"+
|
||||
"\2\0\2\32\37\0\1\32\1\0\1\32\2\0\2\33"+
|
||||
"\37\0\1\33\1\0\1\33\2\0\2\34\37\0\1\34"+
|
||||
"\1\0\1\34\4\0\2\35\4\0\1\35\5\0\4\35"+
|
||||
"\3\0\14\35\7\0\3\43\11\0\4\43\3\0\14\43"+
|
||||
"\4\0\1\64\2\0\3\64\1\0\10\64\1\65\6\64"+
|
||||
"\1\66\3\64\1\67\1\70\3\64\1\71\2\64\1\0"+
|
||||
"\1\64\1\0\1\64\1\0\2\47\37\0\1\47\1\0"+
|
||||
"\1\47\2\0\2\52\37\0\1\52\1\0\1\52\1\0"+
|
||||
"\42\54\1\0\2\54\1\0\1\54\2\55\37\54\1\24"+
|
||||
"\1\54\1\55\11\0\1\72\35\0\1\62\2\0\37\62"+
|
||||
"\1\0\1\62\1\0\2\62\2\0\15\62\1\73\21\62"+
|
||||
"\1\0\1\62\1\0\1\62\1\64\2\0\3\64\1\0"+
|
||||
"\33\64\1\0\1\64\1\0\2\64\2\0\3\64\1\0"+
|
||||
"\11\64\1\74\21\64\1\0\1\64\1\0\2\64\2\0"+
|
||||
"\3\64\1\0\20\64\1\75\12\64\1\0\1\64\1\0"+
|
||||
"\2\64\2\0\3\64\1\0\24\64\1\76\6\64\1\0"+
|
||||
"\1\64\1\0\2\64\2\0\3\64\1\0\26\64\1\77"+
|
||||
"\4\64\1\0\1\64\1\0\2\64\2\0\3\64\1\0"+
|
||||
"\31\64\1\100\1\64\1\0\1\64\1\0\1\64\1\62"+
|
||||
"\2\0\16\62\1\101\20\62\1\0\1\62\1\0\1\62"+
|
||||
"\1\64\2\0\3\64\1\0\12\64\1\102\20\64\1\0"+
|
||||
"\1\64\1\0\2\64\2\0\3\64\1\0\21\64\1\103"+
|
||||
"\11\64\1\0\1\64\1\0\2\64\2\0\3\64\1\0"+
|
||||
"\25\64\1\104\5\64\1\0\1\64\1\0\2\64\2\0"+
|
||||
"\3\64\1\0\21\64\1\105\11\64\1\0\1\64\1\0"+
|
||||
"\2\64\2\0\3\64\1\0\13\64\1\106\17\64\1\0"+
|
||||
"\1\64\1\0\1\64\1\62\2\0\15\62\1\107\21\62"+
|
||||
"\1\0\1\62\1\0\1\62\1\64\2\0\3\64\1\0"+
|
||||
"\11\64\1\110\21\64\1\0\1\64\1\0\2\64\2\0"+
|
||||
"\3\64\1\0\22\64\1\111\10\64\1\0\1\64\1\0"+
|
||||
"\2\64\2\0\3\64\1\0\22\64\1\112\10\64\1\0"+
|
||||
"\1\64\1\0\2\64\2\0\3\64\1\0\22\64\1\113"+
|
||||
"\10\64\1\0\1\64\1\0\2\64\2\0\3\64\1\0"+
|
||||
"\13\64\1\114\17\64\1\0\1\64\1\0\1\64\1\62"+
|
||||
"\2\0\17\62\1\115\17\62\1\0\1\62\1\0\1\62"+
|
||||
"\1\64\2\0\3\64\1\0\13\64\1\116\17\64\1\0"+
|
||||
"\1\64\1\0\2\64\2\0\3\64\1\0\12\64\1\117"+
|
||||
"\20\64\1\0\1\64\1\0\2\64\2\0\3\64\1\0"+
|
||||
"\27\64\1\120\3\64\1\0\1\64\1\0\2\64\2\0"+
|
||||
"\3\64\1\0\11\64\1\121\21\64\1\0\1\64\1\0"+
|
||||
"\2\64\2\0\3\64\1\0\11\64\1\122\21\64\1\0"+
|
||||
"\1\64\1\0\2\64\2\0\3\64\1\0\12\64\1\123"+
|
||||
"\20\64\1\0\1\64\1\0\2\64\2\0\3\64\1\0"+
|
||||
"\23\64\1\111\7\64\1\0\1\64\1\0\2\64\2\0"+
|
||||
"\3\64\1\0\32\64\1\124\1\0\1\64\1\0\1\64";
|
||||
|
||||
private static int [] zzUnpackTrans() {
|
||||
int [] result = new int[2220];
|
||||
int [] result = new int[2318];
|
||||
int offset = 0;
|
||||
offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
|
||||
return result;
|
||||
@@ -346,10 +358,10 @@ class _JavaDocLexer implements FlexLexer {
|
||||
private static final String ZZ_ATTRIBUTE_PACKED_0 =
|
||||
"\17\0\1\11\2\1\1\11\1\1\1\11\2\1\1\11"+
|
||||
"\5\1\5\11\1\1\1\11\1\1\1\11\4\1\1\11"+
|
||||
"\1\1\1\11\1\0\1\11\1\0\10\1\1\11\32\1";
|
||||
"\2\1\1\11\1\0\1\11\1\0\10\1\1\11\32\1";
|
||||
|
||||
private static int [] zzUnpackAttribute() {
|
||||
int [] result = new int[83];
|
||||
int [] result = new int[84];
|
||||
int offset = 0;
|
||||
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
|
||||
return result;
|
||||
|
||||
@@ -154,7 +154,8 @@ public class JavaDocLexer extends MergingLexerAdapter {
|
||||
if (myBufferIndex < myTokenEndOffset) {
|
||||
myTokenType = lf ||
|
||||
state == _JavaDocLexer.PARAM_TAG_SPACE || state == _JavaDocLexer.TAG_DOC_SPACE ||
|
||||
state == _JavaDocLexer.INLINE_TAG_NAME || state == _JavaDocLexer.DOC_TAG_VALUE_IN_PAREN
|
||||
state == _JavaDocLexer.INLINE_TAG_NAME || state == _JavaDocLexer.DOC_TAG_VALUE_IN_PAREN ||
|
||||
state == _JavaDocLexer.INDEX_COMMENT_DATA
|
||||
? myTokenTypes.space() : myTokenTypes.commentData();
|
||||
|
||||
return;
|
||||
|
||||
@@ -117,7 +117,9 @@ INLINE_TAG_IDENTIFIER=[^\ \t\f\n\r\}]+
|
||||
return myTokenTypes.space();
|
||||
}
|
||||
<INDEX_TAG_COMMENT_DATA> \" { yybegin(INDEX_COMMENT_DATA); return myTokenTypes.tagValueQuote(); }
|
||||
<INDEX_COMMENT_DATA> [^\"]+ { return myTokenTypes.tagValueToken(); }
|
||||
<INDEX_COMMENT_DATA> [^\n\"]+ { return myTokenTypes.tagValueToken(); }
|
||||
<INDEX_COMMENT_DATA> {WHITE_DOC_SPACE_CHAR}+ { return myTokenTypes.space(); }
|
||||
<INDEX_COMMENT_DATA> "*"+ { return myTokenTypes.commentLeadingAsterisks(); }
|
||||
<INDEX_COMMENT_DATA> \" { yybegin(COMMENT_DATA); return myTokenTypes.tagValueQuote(); }
|
||||
<SUMMARY_TAG_DOC_SPACE> {WHITE_DOC_SPACE_CHAR}+ { yybegin(COMMENT_DATA); return myTokenTypes.space(); }
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<html><head><base href="placeholder"></head><body><div class='definition'><pre><span style="color:#000080;font-weight:bold;">public</span> <span style="color:#000080;font-weight:bold;">class</span> <span style="color:#000000;">Main</span></pre></div><div class='content'>
|
||||
<i>start hello</i> with values
|
||||
<i>start</i> with values
|
||||
<i>end</i> index.
|
||||
start hello with values
|
||||
start with values
|
||||
end index.
|
||||
multi line value index.
|
||||
</div><table class='sections'><p></table>
|
||||
@@ -2,6 +2,9 @@
|
||||
* {@index "start hello" hello world} with values
|
||||
* {@index start hello world} with values
|
||||
* {@index end} index.
|
||||
* {@index "multi
|
||||
* line
|
||||
* value" description} index.
|
||||
*/
|
||||
public class Main {
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
* {@index "start hello" hello world} with values
|
||||
* {@index start hello world} with values
|
||||
* {@index end} index.
|
||||
* {@index "multi
|
||||
* line
|
||||
* value" description} index.
|
||||
*/
|
||||
public class Main {
|
||||
}
|
||||
@@ -43,6 +43,28 @@ PsiJavaFile:InlineTagIndex.java
|
||||
PsiDocToken:DOC_INLINE_TAG_END('}')
|
||||
PsiDocToken:DOC_COMMENT_DATA(' index.')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiDocToken:DOC_COMMENT_LEADING_ASTERISKS('*')
|
||||
PsiDocToken:DOC_COMMENT_DATA(' ')
|
||||
PsiInlineDocTag:@index
|
||||
PsiDocToken:DOC_INLINE_TAG_START('{')
|
||||
PsiDocToken:DOC_TAG_NAME('@index')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiDocToken:DOC_TAG_VALUE_QUOTE('"')
|
||||
PsiElement(DOC_TAG_VALUE_ELEMENT)
|
||||
PsiDocToken:DOC_TAG_VALUE_TOKEN('multi')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiDocToken:DOC_COMMENT_LEADING_ASTERISKS('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiDocToken:DOC_TAG_VALUE_TOKEN('line')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiDocToken:DOC_COMMENT_LEADING_ASTERISKS('*')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiDocToken:DOC_TAG_VALUE_TOKEN('value')
|
||||
PsiDocToken:DOC_TAG_VALUE_QUOTE('"')
|
||||
PsiDocToken:DOC_COMMENT_DATA(' description')
|
||||
PsiDocToken:DOC_INLINE_TAG_END('}')
|
||||
PsiDocToken:DOC_COMMENT_DATA(' index.')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiDocToken:DOC_COMMENT_END('*/')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiModifierList:public
|
||||
|
||||
Reference in New Issue
Block a user