anchor.diff:     * Replace the editor's contents with the given text. Make sure that we don't
      * fire a change event.
      */
  -  void _replaceContents(String newContents) {
  +  Future _replaceContents(String newContents, [String fileContents = null]) {
       _aceSubscription.cancel();
   
       try {
  
positive.code:       _session.scrollTop = scrollTop;
        if (cursorPos != null) {
          aceManager.cursorPosition = cursorPos;
        }
      } finally {
        _aceSubscription = _session.onChange.listen((_) => dirty = true);
  
negative.code:     // notification (in fileContentsChanged()), we compare the last write to the
      // contents on disk.
      if (_dirty) {
        String fileText;
  
        // Remove the trailing whitespace if asked to do so.
        // TODO(ericarnold): Can't think of an easy way to share this preference,
        //           but it might be a good idea to do so rather than passing it.
        if (stripWhitespace)  {
          fileText = _stripWhitespace();
        } else {
          fileText = _session.value;
        }
  
        Future returnFuture = _replaceContents(_session.value, fileText);
  
        // TODO(ericarnold): Need to cache or re-analyze on file switch.
        // TODO(ericarnold): Need to analyze on initial file load.
        aceManager.buildOutline();
  
        return returnFuture;
      } else {
        return new Future.value();
      }
  