Class CommentContextLoader


  • public class CommentContextLoader
    extends Object
    Computes the list of ContextLineInfo for a given comment, that is, the lines of the source file surrounding and including the area where the comment was written.
    • 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