package org.fxmisc.richtext;

public class RichTextChange<S, PS> extends TextChange<StyledDocument<S, PS>, RichTextChange<S, PS>> {

    public RichTextChange(int position, StyledDocument<S, PS> removed, StyledDocument<S, PS> inserted) {
        super(position, removed, inserted);
    }

    @Override
    protected int removedLength() {
        return removed.length();
    }

    @Override
    protected int insertedLength() {
        return inserted.length();
    }

    @Override
    protected final StyledDocument<S, PS> concat(StyledDocument<S, PS> a, StyledDocument<S, PS> b) {
        return a.concat(b);
    }

    @Override
    protected final StyledDocument<S, PS> sub(StyledDocument<S, PS> doc, int from, int to) {
        return doc.subSequence(from, to);
    }

    @Override
    protected final RichTextChange<S, PS> create(int position, StyledDocument<S, PS> removed, StyledDocument<S, PS> inserted) {
        return new RichTextChange<>(position, removed, inserted);
    }
}

@@ -983,11 +983,294 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public final String toString() %7B%0A        return%0A                %22RichTextChange%7B%5Cn%22 +%0A                %22%5Ctposition: %22 + position + %22%5Cn%22 +%0A                %22%5Ctremoved: %22 + removed + %22%5Cn%22 +%0A                %22%5Ctinserted: %22 + inserted + %22%5Cn%22 +%0A                %22%7D%22;%0A    %7D
 %0A%7D%0A

Add meaningful toString() to RichTextChange.