mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
JavaFolding: added inferred contracts (IDEA-214755)
GitOrigin-RevId: a16063e60b16c0682eb5ef39f532ba9c8fb4c4f6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
54d5208c02
commit
b7d2fb070a
@@ -13,6 +13,7 @@ import com.intellij.psi.PsiComment;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.TokenType;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -263,12 +264,15 @@ public final class CommentFoldingUtil {
|
||||
return "";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Contract("_, _ -> new")
|
||||
private static TextRange getLineRange(@NotNull Document document, int nLine) {
|
||||
int startOffset = document.getLineStartOffset(nLine);
|
||||
int endOffset = document.getLineEndOffset(nLine);
|
||||
return new TextRange(startOffset, endOffset);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getCommentLine(@NotNull Document document,
|
||||
@NotNull TextRange lineRange,
|
||||
@NotNull String prefix,
|
||||
|
||||
Reference in New Issue
Block a user