diff options
author | Matt Ward <matt.ward@xamarin.com> | 2016-11-23 19:57:59 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2016-11-23 19:57:59 +0300 |
commit | 899cab2b8aae700831cc57416f58c233c68badb6 (patch) | |
tree | 76f22aae4e947d6d7869e45cf2d969130d15e59f /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components | |
parent | 15fb5067e148f7159bffd15835c00a0e52d6e176 (diff) |
[Ide] Provide a way to prevent the output monitor pad being cleared
This allows another progress monitor to be created and not clear
the existing text shown in the log view output pad. By default
the behaviour is to clear the output pad's messages when a new
progress monitor is created.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs index 0ebcb0e691..8205591f5b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs @@ -479,7 +479,12 @@ namespace MonoDevelop.Ide.Gui.Components public OutputProgressMonitor GetProgressMonitor () { - return new LogViewProgressMonitor (this); + return GetProgressMonitor (clearConsole: true); + } + + internal OutputProgressMonitor GetProgressMonitor (bool clearConsole) + { + return new LogViewProgressMonitor (this, clearConsole); } public void Clear () @@ -751,10 +756,11 @@ namespace MonoDevelop.Ide.Gui.Components get { return outputPad; } } - internal LogViewProgressMonitor (LogView pad): base (Runtime.MainSynchronizationContext) + internal LogViewProgressMonitor (LogView pad, bool clearConsole): base (Runtime.MainSynchronizationContext) { outputPad = pad; - outputPad.Clear (); + if (clearConsole) + outputPad.Clear (); internalLogger.TextWritten += outputPad.WriteConsoleLogText; console = new LogViewProgressConsole (this); } |