private static void OnParsingFinished(object sender, CommonInterfaces.ParsingFinishedArgs args) { string lang = args.Lang; if (!parsedSppf.ContainsKey(lang)) { parsedSppf.Add(lang, 0); } else { parsedSppf[lang]++; } Action action = () => { var isEnd = false; while (!isEnd) { Tuple <ITreeNode, bool> res = YcProcessor.GetNextTree(lang, parsedSppf[lang]); ExistingTreeNodes.AddTree(res.Item1); isEnd = res.Item2; } }; using (TaskBarrier fibers = Process.DaemonProcess.CreateFibers()) { fibers.EnqueueJob(action); } }
public void Execute(Action <DaemonStageResult> commiter) { if (CSharpFile == null) { return; } myCommiter = commiter; UpdateHandler(); ExistingTreeNodes.ClearExistingTree(DaemonProcess.Document); var errors = YcProcessor.Process(CSharpFile); OnErrors(errors); // remove all old highlightings //if (DaemonProcess.FullRehighlightingRequired) //myCommiter(new DaemonStageResult(EmptyArray<HighlightingInfo>.Instance)); }