Class QDiffNormalGenerator

    • Field Detail

      • myGeneratorsCache

        private java.util.Map myGeneratorsCache
    • Constructor Detail

      • QDiffNormalGenerator

        private QDiffNormalGenerator​(java.util.Map properties)
      • QDiffNormalGenerator

        private QDiffNormalGenerator()
    • Method Detail

      • setup

        public static void setup()
      • generateDiffHeader

        public void generateDiffHeader​(java.lang.String item,
                                       java.lang.String leftInfo,
                                       java.lang.String rightInfo,
                                       java.io.Writer output)
                                throws java.io.IOException
        Specified by:
        generateDiffHeader in interface QDiffGenerator
        Throws:
        java.io.IOException
      • processBlock

        protected void processBlock​(int sourceStartLine,
                                    int sourceEndLine,
                                    QSequenceLineCache sourceLines,
                                    int targetStartLine,
                                    int targetEndLine,
                                    QSequenceLineCache targetLines,
                                    java.lang.String encoding,
                                    java.io.Writer output)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • displayWhiteSpace

        protected java.lang.String displayWhiteSpace​(java.lang.String s)
      • delete

        protected void delete​(int deleteAt,
                              int deleteStart,
                              int deleteEnd,
                              QSequenceLineCache deleteLines,
                              java.lang.String encoding,
                              java.io.Writer output)
                       throws java.io.IOException
        Handles a delete of lines from the target.
        Parameters:
        deleteAt - the line where the lines would have appeared in the source (0 based)
        deleteStart - first line deleted from target (0 based).
        deleteEnd - last line deleted from target (0 based).
        deleteLines - all the lines from the target file. Could be accessed with deleteStart and deleteEnd to identify the deleted lines.
        Throws:
        java.io.IOException
      • add

        protected void add​(int addAt,
                           int addStart,
                           int addEnd,
                           QSequenceLineCache addLines,
                           java.lang.String encoding,
                           java.io.Writer output)
                    throws java.io.IOException
        Handles the addition of lines to source.
        Parameters:
        addAt - the line where the new lines would be added to target (0 based)
        addStart - the first line added from source (0 based)
        addEnd - the last line added from source (0 based)
        addLines - all the lines from the source file. Could be accessed with addStart and addEnd to identify the added lines.
        Throws:
        java.io.IOException
      • change

        protected void change​(int replaceStart,
                              int replaceEnd,
                              QSequenceLineCache replaceLines,
                              int replaceWithStart,
                              int replaceWithEnd,
                              QSequenceLineCache replaceWithLines,
                              java.lang.String encoding,
                              java.io.Writer output)
                       throws java.io.IOException
        Handles a change of a range of lines in target to a range of lines in source.
        Parameters:
        replaceStart - the first line in target that will be replaced (0 based)
        replaceEnd - the last line in target that will be replaced (0 based)
        replaceLines - all the lines in target
        replaceWithStart - the first line in source to that will replace the lines in target (0 based)
        replaceWithEnd - the last line in source to that will replace the lines in target (0 based)
        replaceWithLines - all the lines in source
        Throws:
        java.io.IOException