~bratsche/ubuntu/maverick/monodevelop/disable-appmenu

« back to all changes in this revision

Viewing changes to src/addins/AspNetAddIn/MonoDevelop.AspNet/CodeBehind.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields, Jo Shields, Iain Lane
  • Date: 2009-04-02 20:50:18 UTC
  • mfrom: (1.2.3 upstream) (1.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20090402205018-2ehhq89bo5eeajli
Tags: 2.0+dfsg-1~ubuntu1
[ Jo Shields ]
* New upstream release
* DFSG version of MonoDevelop 2.0
  (deleted all pre-compiled binaries from the tarball)
  + For the record here a list of the deleted files:
    src/addins/NUnit/lib/nunit.framework.dll
    src/addins/NUnit/lib/nunit.core.dll
    src/addins/NUnit/lib/nunit.util.dll
    src/addins/NUnit/lib/nunit.core.interfaces.dll
* debian/control:
  + Tweak build-deps to allow building against libgconf2.24-cil due to 
    broken ABI bump in Ubuntu
* debian/patches/update_templates_for_gtk-sharp_2.10.dpatch,
  debian/patches/update_templates_for_gtk-sharp_2.12.dpatch:
  + Refresh patch to ensure new projects are created using the correct
    version of GTK#

[ Iain Lane ]
* Upload from pkg-cli-apps SVN into Ubuntu; delayed in sid due to transition
  constraints. (LP: #353300)

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
                        MonoDevelop.Core.Gui.DispatchService.GuiSyncDispatch (delegate {
245
245
                                foreach (KeyValuePair<string, string> item in filesToWrite) {
246
246
                                        try {
247
 
                                                //get an interface to edit the file
248
 
                                                MonoDevelop.Projects.Text.IEditableTextFile textFile = 
249
 
                                                        MonoDevelop.DesignerSupport.
250
 
                                                        OpenDocumentFileProvider.Instance.GetEditableTextFile (item.Key);
251
 
                                                
252
 
                                                if (textFile == null)
253
 
                                                        textFile = MonoDevelop.Projects.Text.TextFile.ReadFile (item.Key);
254
 
                                                
255
 
                                                //change the contents
256
 
                                                textFile.Text = item.Value;
257
 
                                                
258
 
                                                //save the file
259
 
                                                MonoDevelop.Projects.Text.TextFile tf = textFile as MonoDevelop.Projects.Text.TextFile;
260
 
                                                if (tf != null)
261
 
                                                        tf.Save ();
 
247
                                                
 
248
                                                bool updated = false;
 
249
                                                foreach (MonoDevelop.Ide.Gui.Document doc in MonoDevelop.Ide.Gui.IdeApp.Workbench.Documents) {
 
250
                                                        if (doc.FileName == item.Key) {
 
251
                                                                var textFile = doc.GetContent<MonoDevelop.Projects.Text.IEditableTextFile> ();
 
252
                                                                if (textFile == null)
 
253
                                                                        continue;
 
254
                                                                
 
255
                                                                //change the contents
 
256
                                                                //FIXME: Workaround for "Bug 484574 - Setting SourceEditorView.Text doesn't mark the document as dirty"
 
257
                                                                // The bug means that the docuemnt doesn't get saved or reparsed.
 
258
                                                                textFile.DeleteText (0, textFile.Length);
 
259
                                                                textFile.InsertText (0, item.Value);
 
260
                                                                
 
261
                                                                doc.Save ();
 
262
                                                                updated = true;
 
263
                                                                break;
 
264
                                                        }
 
265
                                                }
 
266
                                                
 
267
                                                if (!updated) {
 
268
                                                        var textFile = MonoDevelop.Projects.Text.TextFile.ReadFile (item.Key);
 
269
                                                        textFile.Text = item.Value;
 
270
                                                        textFile.Save ();
 
271
                                                }
262
272
                                                
263
273
                                                WrittenCount++;
264
274
                                                
267
277
                                                        GettextCatalog.GetString ("Failed to write file '{0}'.", item.Key),
268
278
                                                        ex);
269
279
                                        }
270
 
                                        
271
 
                                        //save the changes
272
 
                                        foreach (MonoDevelop.Ide.Gui.Document doc in MonoDevelop.Ide.Gui.IdeApp.Workbench.Documents)
273
 
                                                doc.Save ();
274
280
                                }
275
281
                        });
276
282