have created a guarded block over the entire document.
RangeMarker rangeMarker = document.createGuardedBlock(0, document.getTextLength());
rangeMarker.setGreedyToLeft(true);
rangeMarker.setGreedyToRight(true);
I expect this document not to be editable any more.
Yet if the cursor is at the beginning or at the end of the document, I am still able to change it. The newly introduced character(s) will be part of the readonly RangeMarker, which is an additional misbehavior.
Think that code completion should not even be active if the cursor is within the range of a guarded block.