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); } }
public virtual void Dispose() { var root = GlobalParseCache.GetRootPackage(FileName); if (root != null) { root.UfcsCache.RemoveModuleMethods(this); } }
public void Add(IEnumerable <string> roots) { RootPackage rp; foreach (var r in roots) { if ((rp = GlobalParseCache.GetRootPackage(r)) != null && !packs.Contains(rp)) { packs.Add(rp); } } }
static void Add(ISet <RootPackage> results, IEnumerable <string> paths) { RootPackage pack; foreach (var p in paths) { if ((pack = GlobalParseCache.GetRootPackage(p)) != null) { results.Add(pack); } } }
public override Task <ISearchDataSource> GetResults(SearchPopupSearchPattern s, int resultsCount, CancellationToken token) { return(Task.Factory.StartNew(delegate { var l = new List <INode>(); foreach (var project in IdeApp.Workspace.GetAllProjects()) { var dprj = project as AbstractDProject; if (dprj == null) { continue; } ModulePackage pack; foreach (var p in dprj.GetSourcePaths()) { if ((pack = GlobalParseCache.GetRootPackage(p)) != null) { foreach (DModule m in pack) { SearchResultsIn(m, s.Pattern, l, resultsCount); } } } foreach (var p in dprj.IncludePaths) { if ((pack = GlobalParseCache.GetRootPackage(p)) != null) { foreach (DModule m in pack) { SearchResultsIn(m, s.Pattern, l, resultsCount); } } } } return (ISearchDataSource) new DSearchDataSource(l) { SearchPattern = s.Pattern }; }, token)); }