public class CodeDocumentationUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CodeDocumentationUtil.CommentContext
Utility class that contains information about current comment context.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createDocCommentLine(java.lang.String lineData,
Project project,
CodeDocumentationAwareCommenter commenter)
Deprecated.
Use createDocCommentLine(lineData,file,commenter) instead.
|
static java.lang.String |
createDocCommentLine(java.lang.String lineData,
PsiFile file,
CodeDocumentationAwareCommenter commenter) |
static java.lang.String |
getIndentInsideJavadoc(Document document,
int offset)
Utility method that does the following:
|
static CodeDocumentationUtil.CommentContext |
tryParseCommentContext(PsiFile file,
java.lang.CharSequence chars,
int offset,
int lineStartOffset)
Analyzes position at the given offset at the given text and returns information about comments presence and kind there if any.
|
@Deprecated public static java.lang.String createDocCommentLine(java.lang.String lineData, Project project, CodeDocumentationAwareCommenter commenter)
public static java.lang.String createDocCommentLine(java.lang.String lineData, PsiFile file, CodeDocumentationAwareCommenter commenter)
public static java.lang.String getIndentInsideJavadoc(Document document, int offset)
- Checks if target document line that contains given offset starts with '*';
- Returns document text located between the '*' and first non-white space symbols after it if the check above is successful;
document
- target documentoffset
- target offset that identifies line to check and max offset to use during scanningpublic static CodeDocumentationUtil.CommentContext tryParseCommentContext(PsiFile file, java.lang.CharSequence chars, int offset, int lineStartOffset)
file
- target file being edited (necessary for language recognition at target offset. Language is necessary
to get information about specific comment syntax)chars
- target textoffset
- target offset at the given textlineStartOffset
- start offset of the line that contains given offset