public static TextDocument CreateImmutableDocument (string text, bool suppressHighlighting = true) { return new TextDocument (new ImmutableText (text), new PrimitiveLineSplitter ()) { SuppressHighlightUpdate = suppressHighlighting, Text = text, ReadOnly = true }; }