Exemple #1
0
 private void OnIterationChanged(IterationChangedEventArgs e)
 {
     var handler = this.IterationChanged;
     if (handler != null)
         handler (this, e);
 }
		private void OnIterationChanged (object sender, IterationChangedEventArgs args)
		{
			LoopIteration iteration = args.PreviousIteration;
			if (iteration != null)
			{
				HashSet<int> removes = new HashSet<int>();
				foreach (Operation op in iteration.Operations)
				{
					if (removes.Contains (op.Id))
						continue;

					ViewCache cache = this.views[op.GetType()];
					InstantView opAdorner = cache.GetView (op.Id);
					if (opAdorner != null)
						this.layer.RemoveAdornment (opAdorner);
				}
			}

			AdornCode (this.view.TextSnapshot, GetCancelSource (current: true).Token);

			//ITextSnapshot s = this.view.TextSnapshot;

			//var map = this.context.LineMap ?? await LineMap.ConstructAsync (this.view.TextSnapshot, this.context.Span.GetText (s), GetCancelSource (current: true).Token);
			//AdornOperationContainer (args.NewIteration, s, map, GetCancelSource (current: true).Token);
		}