~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/Change.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
                        
126
126
                        TextEditorData textEditorData = this.TextEditorData;
127
127
                        bool saveEditor = false;
 
128
                        bool hadBom = true;
 
129
                        System.Text.Encoding encoding = System.Text.Encoding.UTF8;
 
130
 
128
131
                        if (textEditorData == null) {
129
 
                                textEditorData = TextFileProvider.Instance.GetTextEditorData (FileName);
 
132
                                bool open;
 
133
                                textEditorData = TextFileProvider.Instance.GetTextEditorData (FileName, out hadBom, out encoding, out open);
130
134
                                saveEditor = true;
131
135
                        }
132
136
                
145
149
                        }
146
150
                        
147
151
                        if (saveEditor)
148
 
                                System.IO.File.WriteAllText (FileName, textEditorData.Text);
 
152
                                Mono.TextEditor.Utils.TextFileUtility.WriteText (FileName, textEditorData.Text, encoding, hadBom);
149
153
                }
150
154
                
151
155
                public override string ToString ()