Package com.google.gerrit.server.comment
Class CommentContextLoader
- java.lang.Object
-
- com.google.gerrit.server.comment.CommentContextLoader
-
public class CommentContextLoader extends Object
Computes the list ofContextLineInfo
for a given comment, that is, the lines of the source file surrounding and including the area where the comment was written.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CommentContextLoader.Factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<com.google.gerrit.server.comment.CommentContextLoader.ContextInput,CommentContext>
getContext(Collection<com.google.gerrit.server.comment.CommentContextLoader.ContextInput> contextInputs)
Load the comment context for multiple contextInputs at once.
-
-
-
Method Detail
-
getContext
public Map<com.google.gerrit.server.comment.CommentContextLoader.ContextInput,CommentContext> getContext(Collection<com.google.gerrit.server.comment.CommentContextLoader.ContextInput> contextInputs) throws IOException
Load the comment context for multiple contextInputs at once. This method will open the repository and read the source files for all necessary contextInputs' file paths.- Parameters:
contextInputs
- a list of contextInputs.- Returns:
- a Map where all entries consist of the input contextInputs and the values are their
corresponding
CommentContext
. - Throws:
IOException
-
-