public void OnParseComplete(ParseResult result) { lock(_lock) { if(_parsedVersions.ContainsKey(result.Path)) { _parsedVersions[result.Path] = result.GetFileVersion(result.Path); } else { _parsedVersions.Add(result.Path, result.GetFileVersion(result.Path)); } } Task.Factory.StartNew(() => { // lock (_lock) { ParseEventHandler handler = TranslationUnitParsed; if (handler != null) { handler(result); } //begin indexing ProjectIndexBuilder.IndexTranslationUnit(result); OnIndexingComplete(result); } }, CancellationToken.None, TaskCreationOptions.None, JadeCore.Services.Provider.GuiScheduler); }
static public void IndexTranslationUnit(ParseResult parseResult) { parseResult.Index.UpdateParseResult(parseResult); System.Diagnostics.Debug.WriteLine("**Indexing " + parseResult.Path.FileName + " version:" + parseResult.GetFileVersion(parseResult.Path)); IndexTranslationUnit(parseResult.Index, parseResult.TranslationUnit); }