Package com.google.gerrit.entities
Class CommentContext
java.lang.Object
com.google.gerrit.entities.CommentContext
An entity class representing all context lines of a comment.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Content type of the source file.static CommentContext
static CommentContext
empty()
lines()
Map of {line number, line text} of the context lines of a comment
-
Constructor Details
-
CommentContext
public CommentContext()
-
-
Method Details
-
create
public static CommentContext create(com.google.common.collect.ImmutableMap<Integer, String> lines, String contentType) -
lines
Map of {line number, line text} of the context lines of a comment -
contentType
Content type of the source file. Useful for syntax highlighting.- Returns:
- text/x-gerrit-commit-message if the file is a commit message.
text/x-gerrit-merge-list if the file is a merge list.
The content/mime type, e.g. text/x-c++src otherwise.
-
empty
-