コード例 #1
0
 /******************************/
 public IProgressMonitor GetBuildProgressMonitor()
 {
     bool front = (bool) Runtime.Properties.GetProperty ("SharpDevelop.ShowOutputWindowAtBuild", true);
     AggregatedProgressMonitor mon = new AggregatedProgressMonitor (GetOutputProgressMonitor ("Build Output", MonoDevelop.Gui.Stock.BuildCombine, front, true));
     mon.AddSlaveMonitor (GetStatusProgressMonitor ("Building...", MonoDevelop.Gui.Stock.BuildCombine, false));
     return mon;
 }
コード例 #2
0
        public override void Execute(IProgressMonitor monitor, ExecutionContext context)
        {
            if (singleStartup) {
                if (StartupEntry != null)
                    StartupEntry.Execute (monitor, context);
            } else {
                ArrayList list = new ArrayList ();
                monitor.BeginTask ("Executing projects", 1);

                SynchronizedProgressMonitor syncMonitor = new SynchronizedProgressMonitor (monitor);

                foreach (CombineExecuteDefinition ced in combineExecuteDefinitions) {
                    if (ced.Type != EntryExecuteType.Execute) continue;

                    AggregatedProgressMonitor mon = new AggregatedProgressMonitor ();
                    mon.AddSlaveMonitor (syncMonitor, MonitorAction.ReportError | MonitorAction.ReportWarning | MonitorAction.SlaveCancel);

                    EntryStartData sd = new EntryStartData ();
                    sd.Monitor = mon;
                    sd.Context = context;
                    sd.Entry = ced.Entry;

                    Runtime.DispatchService.ThreadDispatch (new StatefulMessageHandler (ExecuteEntryAsync), sd);
                    list.Add (sd.Monitor.AsyncOperation);
                }
                foreach (IAsyncOperation op in list)
                    op.WaitForCompleted ();

                monitor.EndTask ();
            }
        }