~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Deployment/WebDeployService.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-10 16:54:48 UTC
  • mfrom: (19.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100910165448-0rybfk25zd4o9431
Tags: 2.4+dfsg-2
* debian/patches/inject_Mono.Debugger.Soft_source.patch,
  debian/patches/use_system_Mono.Debugger.Soft.patch,
  debian/control:
  + Build against system Soft Debugger, since we now have a new
    enough Mono to match MonoDevelop's required API

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
using Gtk;
31
31
 
32
32
using MonoDevelop.Core;
33
 
using MonoDevelop.Core.Gui.ProgressMonitoring;
 
33
using MonoDevelop.Ide.ProgressMonitoring;
34
34
using MonoDevelop.Deployment;
35
35
using MonoDevelop.Deployment.Gui;
36
36
using MonoDevelop.AspNet;
37
37
using MonoDevelop.Projects;
 
38
using MonoDevelop.Ide;
38
39
 
39
40
namespace MonoDevelop.AspNet.Deployment
40
41
{
53
54
                static public void Deploy (AspNetAppProject project, ICollection<WebDeployTarget> targets, ConfigurationSelector configuration)
54
55
                {
55
56
                        //project needs to be built before it can be deployed
56
 
                        MonoDevelop.Ide.Gui.IdeApp.ProjectOperations.Build (project);
 
57
                        IdeApp.ProjectOperations.Build (project);
57
58
                        
58
59
                        //set up and launch a copying thread
59
60
                        DeployThreadParams threadParams = new DeployThreadParams ();
103
104
                                }
104
105
                        } catch (Exception e) {
105
106
                                MonoDevelop.Core.LoggingService.LogError ("Unhandled exception in the web deploy thread", e);
106
 
                                MonoDevelop.Core.Gui.MessageService.ShowException (e, "Web deploy failed due to unhandled exception");
 
107
                                 MonoDevelop.Ide.MessageService.ShowException (e, "Web deploy failed due to unhandled exception");
107
108
                        } finally {
108
109
                                threadParams.Monitor.Dispose ();
109
110
                        }
111
112
                
112
113
                static public void DeployDialog (AspNetAppProject project)
113
114
                {
114
 
                        WebDeployLaunchDialog dialog = new WebDeployLaunchDialog (project);
115
 
                        Gtk.Window rootWindow = MonoDevelop.Core.Gui.MessageService.RootWindow as Gtk.Window;
116
 
                        dialog.TransientFor = rootWindow;
117
 
                        dialog.Modal = true;
 
115
                        var dialog = new WebDeployLaunchDialog (project) {
 
116
                                Modal = true,
 
117
                        };
118
118
                        dialog.Show ();
119
119
                        
120
120
                        ICollection<WebDeployTarget> targets = null;
121
121
                        
122
 
                        ResponseType response = Gtk.ResponseType.None;
 
122
                        var response = ResponseType.None;
123
123
                        do {
124
 
                                response = (ResponseType) dialog.Run ();
125
 
                        } while (response != Gtk.ResponseType.Ok && response != Gtk.ResponseType.Cancel && response != Gtk.ResponseType.DeleteEvent);
 
124
                                response = (ResponseType) MessageService.RunCustomDialog (dialog, MessageService.RootWindow);
 
125
                        } while (response != ResponseType.Ok && response != ResponseType.Cancel && response != ResponseType.DeleteEvent);
126
126
                        
127
127
                        if (response == Gtk.ResponseType.Ok)
128
128
                                targets = dialog.GetSelectedTargets ();
130
130
                        dialog.Destroy ();
131
131
                        
132
132
                        if (targets != null && targets.Count > 0)
133
 
                                Deploy (project, targets, MonoDevelop.Ide.Gui.IdeApp.Workspace.ActiveConfiguration);
 
133
                                Deploy (project, targets, IdeApp.Workspace.ActiveConfiguration);
134
134
                }
135
135
                
136
136
                class DeployThreadParams