void ColorizeInvalidated()
 {
     foreach (var item in highlightCache.ToArray())
     {
         if (item.Key.IsDeleted)
         {
             highlightCache.Remove(item.Key);
             continue;
         }
         if (item.Value.Invalid)
         {
             var newTask = new HighlightTask(this.Editor, item.Key, this.TextView, item.Value.GetResults());
             newTask.Start();
             highlightCache[item.Key] = newTask;
         }
     }
 }
 protected override void ColorizeLine(DocumentLine line)
 {
     if (!highlightCache.ContainsKey(line))
     {
         HighlightTask task = new HighlightTask(this.Editor, line, this.TextView);
         task.Start();
         highlightCache.Add(line, task);
     }
     else
     {
         HighlightTask task    = highlightCache[line];
         var           results = task.GetResults();
         if (results != null)
         {
             foreach (var result in results)
             {
                 ColorizeMember(result.Info, line, result.Member);
             }
         }
     }
     ColorizeInvalidated();
 }
示例#3
0
		void ColorizeInvalidated()
		{
			foreach (var item in highlightCache.ToArray()) {
				if (item.Key.IsDeleted) {
					highlightCache.Remove(item.Key);
					continue;
				}
				if (item.Value.Invalid) {
					var newTask = new HighlightTask(this.Editor, item.Key, this.TextView, item.Value.GetResults());
					newTask.Start();
					highlightCache[item.Key] = newTask;
				}
			}
		}
示例#4
0
		protected override void ColorizeLine(DocumentLine line)
		{
			if (!highlightCache.ContainsKey(line)) {
				HighlightTask task = new HighlightTask(this.Editor, line, this.TextView);
				task.Start();
				highlightCache.Add(line, task);
			} else {
				HighlightTask task = highlightCache[line];
				var results = task.GetResults();
				if (results != null) {
					foreach (var result in results) {
						ColorizeMember(result.Info, line, result.Member);
					}
				}
			}
			ColorizeInvalidated();
		}