void parsingFinished(ParsingFinishedEventArgs ea) { // Update UFCS cache var pcw = GenParseCacheView(); foreach (var path in IncludePaths) { var r = GlobalParseCache.GetRootPackage(path); //HACK: Ensure that the includes list won't get changed during parsing if (r == null) { throw new ArgumentNullException("Root package must not be null - either a parse error occurred or the list was changed in between"); } //TODO: Supply global condition flags? -- At least the vendor id r.UfcsCache.BeginUpdate(pcw); } HadInitialParse = true; if (FinishedParsing != null) { FinishedParsing(ea); } }
void parsedSources(ParsingFinishedEventArgs pfd) { InitialParsingDone = true; if (ParsingFinished != null) { ParsingFinished(); } var pcw = new ParseCacheView(tempImports); // Output parse time stats if (pfd != null) { ErrorLogger.Log("Parsed " + pfd.FileAmount + " files in [" + string.Join(",", tempImports) + "] in " + Math.Round(pfd.ParseDuration / 1000.0, 2).ToString() + "s (~" + Math.Round(pfd.FileParseDuration, 3).ToString() + "ms per file)", ErrorType.Information, ErrorOrigin.Parser); } // For debugging purposes dump all parse results (errors etc.) to a log file. /*try * { * ParseLog.Write(ASTCache, IDEInterface.ConfigDirectory + "\\" + Version.ToString() + ".GlobalParseLog.log"); * } * catch (Exception ex) * { * ErrorLogger.Log(ex, ErrorType.Warning, ErrorOrigin.System); * }*/ }
void GlobalParseCacheFilled(ParsingFinishedEventArgs ea) { var GuiDoc = GuiDocument; if (GuiDoc != null && Document != null && ea.Package != null && GuiDoc.ParsedDocument is ParsedDModule) { var root = ea.Package.Root; if (root == null) { return; } var mod = (GuiDoc.ParsedDocument as ParsedDModule).DDom; if (mod == null) { return; } var pcl = MonoDevelop.D.Resolver.DResolverWrapper.CreateParseCacheView(GuiDoc); if (pcl.EnumRootPackagesSurroundingModule(mod).Contains(root)) { HandleDocumentParsed(this, EventArgs.Empty); } } }
void parsingFinished(ParsingFinishedEventArgs ea) { HadInitialParse = true; if (FinishedParsing != null) { FinishedParsing(ea); } }
private void ParseTaskFinished(ParsingFinishedEventArgs ea) { Console.WriteLine("Parse task finished: " + ea.Directory); if (!ea.Directory.StartsWith(_subFolder)) { Assert.Warn("Received ParseTaskFinished-Event for wrong directory (" + ea.Directory + ")"); return; } var moduleFiles = GlobalParseCache.EnumModulesRecursively(_subFolder).ConvertAll(module => module.FileName); CollectionAssert.AreEquivalent(moduleFiles, ModuleFileNames); _parseFinishedSemaphore.Set(); }
private void OnNUIClockUpdaterParsingFinished(object sender, ParsingFinishedEventArgs pfea) { System.Windows.Application.Current.Dispatcher.BeginInvoke( ((System.Action)(() => { if (pfea.Result == ParsingResult.Success) { Updater.ShowOutput(); } SetControlAvailability(true); _parsingThread.Abort(); _parsingThread = new Thread(Updater.BeginParsing); _parsingThread.Name = PARSING_THREAD_NAME; }))); }
void GlobalParseCacheFilled(ParsingFinishedEventArgs ea) { var GuiDoc = GuiDocument; if (GuiDoc != null && Document != null && ea.Package != null) { var root = ea.Package.Root; if (root == null) { return; } var pcl = MonoDevelop.D.Resolver.DResolverWrapper.CreateCacheList(GuiDoc); if (pcl.Contains(root)) { HandleDocumentParsed(this, EventArgs.Empty); } } }
static void pc_FinishedParsing(ParsingFinishedEventArgs ppd) { Trace.WriteLine(string.Format("Parsed {0} files in {1}; {2}ms/file", ppd.FileAmount, ppd.Directory, ppd.FileDuration), "ParserTests"); }
void compilerCacheUpdated(ParsingFinishedEventArgs ea) { base.InformGlobalParseCacheFilled(); }