anchor.diff:                          let col = editor.CaretColumn
                           editor.ReplaceText(0, input.Length, result)
                           editor.SetCaretLocation (line, col, false))
  -                    result
  +                    StringTextSource (result)
                   with exn -> 
                       LoggingService.LogError("Error occured: {0}", exn.Message)
  -                    null
  -            output
  +                    StringTextSource.Empty
  +            output :> ITextSource
   
           | Selection(fromOffset, toOffset) ->
               // Convert from offsets to line and column position
  
positive.code:             match project.Policies with 
              | null -> PolicyService.DefaultPolicies
              | policyBag -> policyBag  :> PolicyContainer
  
          let mimeTypeChain = DesktopService.GetMimeTypeInheritanceChain (FSharpFormatter.MimeType)
          let input = editor.Text
          if fromOffset = 0 && toOffset = String.length input then 
              formatText (Some editor) policyParent mimeTypeChain input Document
              |> ignore
          else 
              formatText (Some editor) policyParent mimeTypeChain input (Selection(fromOffset, toOffset))
              |> ignore
  
      override x.FormatText(policyParent, mimeTypeChain, input, fromOffset, toOffset) = 
          if fromOffset = 0 && toOffset = String.length input then 
              formatText None policyParent mimeTypeChain input Document
          else 
              formatText None policyParent mimeTypeChain input (Selection(fromOffset, toOffset))
negative.code:         if trimLinefeed then output.TrimEnd('\n') 
          else output
                      
      let format (editor : Editor.TextEditor option) style formatting input options : ITextSource =
          let isFsiFile = 
              match editor with 
              | Some d -> d.FileName.Extension.Equals(".fsi", StringComparison.OrdinalIgnoreCase)
  