Beispiel #1
0
 bool OutputDispatchHandler()
 {
     lock (updates) {
         lastTextWrite = null;
         if (updates.Count == 0)
         {
             outputDispatcherRunning = false;
             return(false);
         }
         else if (!outputDispatcherRunning)
         {
             updates.Clear();
             return(false);
         }
         else
         {
             while (updates.Count > 0)
             {
                 QueuedUpdate up = updates.Dequeue();
                 up.Execute(this);
             }
         }
     }
     return(true);
 }
Beispiel #2
0
 public void Clear()
 {
     lock (updates) {
         updates.Clear();
         lastTextWrite           = null;
         outputDispatcherRunning = false;
     }
     outputModel.Clear();
 }
Beispiel #3
0
 public void Clear()
 {
     lock (updates) {
         updates.Clear();
         lastTextWrite = null;
         outputDispatcherRunning = false;
     }
     outputModel.Clear();
 }
Beispiel #4
0
        protected override void OnDestroyed()
        {
            base.OnDestroyed();

            lock (updates) {
                updates.Clear();
                lastTextWrite = null;
            }
            IdeApp.Preferences.CustomOutputPadFontChanged -= HandleCustomFontChanged;
        }
Beispiel #5
0
        public void WriteTask(object task, string name, string status, List <TaskMessage> error, bool clearOutput)
        {
            if (clearOutput)
            {
                Clear();
            }

            QueuedTextWrite qtw = new QueuedTextWrite(error);

            AddQueuedUpdate(qtw);
        }
Beispiel #6
0
        public void WriteTask_II(object task, string name, string status, List <TaskMessage> error, bool clearOutput)
        {
            if (clearOutput)
            {
                Clear();
            }
            TaskResult      tr  = new TaskResult(name, status, error);
            QueuedTextWrite qtw = new QueuedTextWrite(tr);

            AddQueuedUpdate(qtw);
        }
Beispiel #7
0
 //**//
 void AddQueuedUpdate(QueuedUpdate update)
 {
     lock (updates) {
         updates.Enqueue(update);
         if (!outputDispatcherRunning)
         {
             GLib.Timeout.Add(50, outputDispatcher);
             outputDispatcherRunning = true;
         }
         lastTextWrite = update as QueuedTextWrite;
     }
 }
Beispiel #8
0
        public void WriteConsoleLogText(string text)
        {
            lock (updates) {
                if (lastTextWrite != null && lastTextWrite.Tag == consoleLogTag)
                {
                    lastTextWrite.Write(text);
                    return;
                }
            }
            QueuedTextWrite w = new QueuedTextWrite(text, consoleLogTag);

            addQueuedUpdate(w);
        }
Beispiel #9
0
        public void WriteConsoleLogText(LogViewProgressMonitor monitor, string text)
        {
            lock (updates) {
                if (lastTextWrite != null && lastTextWrite.Tag == consoleLogTag)
                {
                    lastTextWrite.Write(text);
                    return;
                }
            }

            var w = new QueuedTextWrite(monitor, text, consoleLogTag);

            addQueuedUpdate(w);
        }
Beispiel #10
0
        public void Clear()
        {
            unchecked {
                Cookie++;
            }

            lock (updates) {
                updates.Clear();
                lastTextWrite           = null;
                outputDispatcherRunning = false;
            }

            buffer.Clear();
        }
Beispiel #11
0
        protected override void OnDestroyed()
        {
            base.OnDestroyed();

            lock (updates) {
                updates.Clear();
                lastTextWrite = null;
            }
            //IdeApp.Preferences.CustomOutputPadFontChanged -= HandleCustomFontChanged;
            if (customFont != null)
            {
                customFont.Dispose();
                customFont = null;
            }
        }
Beispiel #12
0
        public void WriteText(string text)
        {
            //raw text has an extra optimisation here, as we can append it to existing updates
            lock (updates) {
                if (lastTextWrite != null)
                {
                    if (lastTextWrite.Tag == null)
                    {
                        lastTextWrite.Write(text);
                        return;
                    }
                }
            }
            QueuedTextWrite qtw = new QueuedTextWrite(text, null);

            addQueuedUpdate(qtw);
        }
Beispiel #13
0
        public void WriteText(LogViewProgressMonitor monitor, string text)
        {
            text = SanitizeConsoleText(text);

            //raw text has an extra optimisation here, as we can append it to existing updates
            lock (updates) {
                if (lastTextWrite != null)
                {
                    if (lastTextWrite.Tag == null)
                    {
                        lastTextWrite.Write(text);
                        return;
                    }
                }
            }

            var qtw = new QueuedTextWrite(monitor, text, null);

            addQueuedUpdate(qtw);
        }
Beispiel #14
0
        public void WriteTask_II(object task, string name, string status, List <TaskMessage> error, bool clearOutput)
        {
            if (clearOutput)
            {
                Clear();
            }
            TaskResult tr = new TaskResult(name, status, error);
            //raw text has an extra optimisation here, as we can append it to existing updates

            /*lock (updates) {
             *                  if (lastTextWrite != null) {
             * if (lastTextWrite.Tag == null) {
             * lastTextWrite.Write(tr);
             * return;
             * }
             *                  }
             *          }*/
            QueuedTextWrite qtw = new QueuedTextWrite(tr);

            AddQueuedUpdate(qtw);
        }
Beispiel #15
0
        public void WriteError(string text)
        {
            QueuedTextWrite w = new QueuedTextWrite(text, errorTag);

            addQueuedUpdate(w);
        }
		protected override void OnDestroyed ()
		{
			base.OnDestroyed ();
			
			lock (updates) {
				updates.Clear ();
				lastTextWrite = null;
			}
			IdeApp.Preferences.CustomOutputPadFont.Changed -= HandleCustomFontChanged;
		}
		public void WriteError (string text)
		{
			var w = new QueuedTextWrite (text, errorTag);
			addQueuedUpdate (w);
		}
		public void WriteConsoleLogText (string text)
		{
			lock (updates) {
				if (lastTextWrite != null && lastTextWrite.Tag == consoleLogTag) {
					lastTextWrite.Write (text);
					return;
				}
			}

			var w = new QueuedTextWrite (text, consoleLogTag);
			addQueuedUpdate (w);
		}
		public void WriteText (string text)
		{
			//raw text has an extra optimisation here, as we can append it to existing updates
			lock (updates) {
				if (lastTextWrite != null) {
					if (lastTextWrite.Tag == null) {
						lastTextWrite.Write (text);
						return;
					}
				}
			}

			var qtw = new QueuedTextWrite (text, null);
			addQueuedUpdate (qtw);
		}
Beispiel #20
0
        public void WriteTask(object task, string name, string status, List<TaskMessage> error, bool clearOutput)
        {
            if (clearOutput)
                Clear();

            QueuedTextWrite qtw = new QueuedTextWrite(error);
            AddQueuedUpdate(qtw);
        }
Beispiel #21
0
        public void WriteError(LogViewProgressMonitor monitor, string text)
        {
            var w = new QueuedTextWrite(monitor, text, errorTag);

            addQueuedUpdate(w);
        }
Beispiel #22
0
 public void WriteTask_II(object task, string name, string status, List<TaskMessage> error, bool clearOutput)
 {
     if (clearOutput)
         Clear();
     TaskResult tr = new TaskResult(name, status, error);
     //raw text has an extra optimisation here, as we can append it to existing updates
                 /*lock (updates) {
         if (lastTextWrite != null) {
             if (lastTextWrite.Tag == null) {
                 lastTextWrite.Write(tr);
                 return;
             }
         }
     }*/
     QueuedTextWrite qtw = new QueuedTextWrite(tr);
     AddQueuedUpdate(qtw);
 }
		//mechanism to to batch copy text when large amounts are being dumped
		bool outputDispatchHandler ()
		{
			lock (updates) {
				lastTextWrite = null;
				if (updates.Count == 0) {
					outputDispatcherRunning = false;
					return false;
				}

				if (!outputDispatcherRunning) {
					updates.Clear ();
					return false;
				}

				while (updates.Count > 0) {
					var up = updates.Dequeue ();
					up.Execute (this);
				}
			}
			return true;
		}
Beispiel #24
0
        protected override void OnDestroyed()
        {
            base.OnDestroyed();

            lock (updates) {
                updates.Clear();
                lastTextWrite = null;
            }
            //IdeApp.Preferences.CustomOutputPadFontChanged -= HandleCustomFontChanged;
            if (customFont != null) {
                customFont.Dispose();
                customFont = null;
            }
        }
		void addQueuedUpdate (QueuedUpdate update)
		{
			lock (updates) {
				updates.Enqueue (update);
				if (!outputDispatcherRunning) {
					GLib.Timeout.Add (50, outputDispatcher);
					outputDispatcherRunning = true;
				}
				lastTextWrite = update as QueuedTextWrite;
			}
		}
        public void WriteWarning(LogViewProgressMonitor monitor, string text)
        {
            var w = new QueuedTextWrite(monitor, text, warningTag);

            addQueuedUpdate(w);
        }