docs: some comment and @Notnull
This commit is contained in:
@@ -67,7 +67,7 @@ public class ScalaLangDoc extends JavaLangDoc {
|
|||||||
@Override
|
@Override
|
||||||
protected <T extends SettingsInfo> void appendTag(@NotNull T info, @NotNull StringBuilder tagStrBuilder,
|
protected <T extends SettingsInfo> void appendTag(@NotNull T info, @NotNull StringBuilder tagStrBuilder,
|
||||||
@NotNull PsiDocComment psiDocComment, @NotNull String name) {
|
@NotNull PsiDocComment psiDocComment, @NotNull String name) {
|
||||||
String key = "@" + name;
|
@NotNull String key = "@" + name;
|
||||||
@NotNull PsiDocTag[] tags = psiDocComment.findTagsByName(key);
|
@NotNull PsiDocTag[] tags = psiDocComment.findTagsByName(key);
|
||||||
for (@NotNull PsiDocTag tag : tags) {
|
for (@NotNull PsiDocTag tag : tags) {
|
||||||
if (tag instanceof ScDocTag) {
|
if (tag instanceof ScDocTag) {
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ public abstract class BaseLangDoc extends EditorLinePainter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* skip english and text
|
||||||
* Override like SQL
|
* Override like SQL
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -146,6 +147,9 @@ public abstract class BaseLangDoc extends EditorLinePainter {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* static! byte to src, by language
|
||||||
|
*/
|
||||||
public static @Nullable <T extends SettingsInfo> String resolveDoc(@NotNull T info,
|
public static @Nullable <T extends SettingsInfo> String resolveDoc(@NotNull T info,
|
||||||
@NotNull PsiElement psiElement) {
|
@NotNull PsiElement psiElement) {
|
||||||
try {
|
try {
|
||||||
@@ -166,6 +170,7 @@ public abstract class BaseLangDoc extends EditorLinePainter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* line and delete /*#, filter by pattern
|
||||||
* Override like Java/Kotlin/Python
|
* Override like Java/Kotlin/Python
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -183,6 +188,7 @@ public abstract class BaseLangDoc extends EditorLinePainter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* LineEnd and LineUp
|
||||||
* Override like JS/Go
|
* Override like JS/Go
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ public class DocFilter {
|
|||||||
"|^ */\\*++ *+" +
|
"|^ */\\*++ *+" +
|
||||||
// ****/ xx block end, not only line start and must before ****
|
// ****/ xx block end, not only line start and must before ****
|
||||||
"| *\\*++/.*" +
|
"| *\\*++/.*" +
|
||||||
// **** xx block body
|
// **** xx block body
|
||||||
"|^ *\\*++ *+" +
|
"|^ *\\*++ *+" +
|
||||||
// #### xx python and shell start
|
// #### xx python and sh start
|
||||||
"|^ *#++ *+" +
|
"|^ *#++ *+" +
|
||||||
// -- xx SQL
|
// -- xx SQL
|
||||||
"|^ *--++ *+"
|
"|^ *--++ *+"
|
||||||
@@ -31,7 +31,7 @@ public class DocFilter {
|
|||||||
private static final Pattern LINE_SEPARATOR_PATTERN = Pattern.compile("[\r\n]");
|
private static final Pattern LINE_SEPARATOR_PATTERN = Pattern.compile("[\r\n]");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* delete / * # in resolveDocPrint()
|
* line and delete /*# in resolveDocPrint()
|
||||||
* end with space
|
* end with space
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user