コード例 #1
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;
         }
     }
 }
コード例 #2
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();
 }
コード例 #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();
		}