summaryrefslogtreecommitdiff
path: root/Source/DafnyMenu
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2014-04-21 16:07:47 +0200
committerGravatar wuestholz <unknown>2014-04-21 16:07:47 +0200
commit6fe4e73ffcc88953e3b19f5e56d176d67ac9547e (patch)
tree2db08b5bc061140d3655d55ce7f9c98b31fd8d8e /Source/DafnyMenu
parentf6549ab8d0c6a93afeadbea6ba06694805fc3a6d (diff)
DafnyExtension: Made it display the compilation output in the VS output pane.
Diffstat (limited to 'Source/DafnyMenu')
-rw-r--r--Source/DafnyMenu/DafnyMenuPackage.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/DafnyMenu/DafnyMenuPackage.cs b/Source/DafnyMenu/DafnyMenuPackage.cs
index 2ceaa91d..114ddf10 100644
--- a/Source/DafnyMenu/DafnyMenuPackage.cs
+++ b/Source/DafnyMenu/DafnyMenuPackage.cs
@@ -3,6 +3,7 @@ using System.ComponentModel.Design;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
+using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.ComponentModelHost;
@@ -281,14 +282,26 @@ namespace DafnyLanguage.DafnyMenu
toggleBVDCommand.Text = (BVDDisabled ? "Enable" : "Disable") + " BVD";
}
- public void ExecuteAsCompiling(Action action)
+ public void ExecuteAsCompiling(Action action, TextWriter outputWriter)
{
IVsStatusbar statusBar = (IVsStatusbar)GetGlobalService(typeof(SVsStatusbar));
uint cookie = 0;
statusBar.Progress(ref cookie, 1, "Compiling...", 0, 0);
+ var gowp = (IVsOutputWindowPane)GetService(typeof(SVsGeneralOutputWindowPane));
+ if (gowp != null)
+ {
+ gowp.Clear();
+ }
+
action();
+ if (gowp != null)
+ {
+ gowp.OutputStringThreadSafe(outputWriter.ToString());
+ gowp.Activate();
+ }
+
statusBar.Progress(ref cookie, 0, "", 0, 0);
}